Home · Overviews · Reference · Classes codeless banner

BuiltinFunctions Class Reference

The BuiltinFunctions class provides functions for the qmake environment. More...

    #include <BuiltinFunctions>

Inherits FunctionProvider.

Public Functions

Macros

Additional Inherited Members


Detailed Description

The BuiltinFunctions class provides functions for the qmake environment.

The functions provided are implemented using the IMPLEMENT_FUNCTION() macro.

See also QBuild Functions.


Member Function Documentation

BuiltinFunctions::BuiltinFunctions ()

Construct a BuiltinFunctions instance. This function provider has a higher priority than QtScriptFunctions so its functions override functions that are also specified in JavaScript.

bool BuiltinFunctions::callFunction ( Project * project, QStringList & rv, const QString & function, const QStringLists & arguments )   [virtual]

This runs function with arguments. The function is passed the project and returns data via rv. Returns true if the function exists, false otherwise.

Reimplemented from FunctionProvider.

See also IMPLEMENT_FUNCTION().


Macro Documentation

IMPLEMENT_FUNCTION ( x, proj, args, rv )

Define a builtin function for QBuild.

The function is called x. You can specify the name of the project variable by setting proj or you can leave it empty. You can specify the name of the arguments variable by setting args or you can leave it empty. You can specify the name of the return variable by setting rv or you can leave it empty.

For example, to define a function foo that returns data but does not take arguments or use the project you would do:

    IMPLEMENT_FUNCTION(foo,,,rv);

Note that this macro only works in builtinfunctions.cpp.

See also QBuild Functions.


Copyright © 2009 Trolltech
Qt Extended - QBuild Maintainer Guide