Home · Overviews · Reference · Classes codeless banner

FunctionProvider Class Reference

The FunctionProvider class exports functions into the QBuild environment. More...

    #include <FunctionProvider>

Inherited by BuiltinFunctions and QtScriptFunctions.

Public Functions

Static Public Members


Detailed Description

The FunctionProvider class exports functions into the QBuild environment.

Function providers are typically instantiated like this.

    static MyFunctionProvider myFunctionProvider;

Member Function Documentation

FunctionProvider::FunctionProvider ( const QString & type, int priority = 0 )

Construct a FunctionProvider with the specified type and priority. Higher priority values take precedence over lower priority values. Valid priority values are positive numbers greater than 0. If an invalid priority is passed, the provider is added at the end of the list.

FunctionProvider::~FunctionProvider ()   [virtual]

Destruct the FunctionProvider, removing it from the list of providers.

void FunctionProvider::addExtensionsPath ( const QString & path )   [static]

Add path to the list of paths that extensions can be found in.

bool FunctionProvider::callFunction ( Project * project, QStringList & rv, const QString & function, const QStringLists & arguments )   [pure 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.

bool FunctionProvider::evalFunction ( Project * project, QStringList & rv, const QString & function, const QStringLists & arguments )   [static]

Attempt to execute function function with arguments arguments. The function providers are queried in order. They are passed the project. The return value is set via rv. Returns true if the function was called, false otherwise.

See also callFunction().

bool FunctionProvider::evalLoad ( Project * project, const QString & name )   [static]

Load name as an extension for project. The name is either a path to a file or a name to search for in the extensions paths. Returns true if the extension was loaded, false otherwise.

QStringList FunctionProvider::extensionsPaths ()   [static]

Returns the list of paths that extensions can be found in.

QString FunctionProvider::fileExtension () const   [pure virtual]

Returns the extension of files that this FunctionProvider can load.

QList<FunctionProvider *> FunctionProvider::functionProviders ()   [static]

Returns the list of function providers ordered by priority.

bool FunctionProvider::loadFile ( const QString & file, Project * project )   [pure virtual]

Load extension file for project. Returns true if successful, false otherwise.

void FunctionProvider::reset ( Project * project )   [static]

Reset project project. The providers will clear out any associated data.

See also resetProject().

void FunctionProvider::resetProject ( Project * project )   [pure virtual]

This function is called because project has been reset. Any state associated with this project should be cleared.

QString FunctionProvider::type () const

Returns the name of the function provider.


Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide