Home · Overviews · Reference · Classes codeless banner

QMakeObject Class Reference

The QMakeObject class represents a node in the QBuild project tree. More...

    #include <QMakeObject>

Inherited by Project and StartupFile.

Public Types

Public Functions

Static Public Members


Detailed Description

The QMakeObject class represents a node in the QBuild project tree.

This class is NOT generally threadsafe. Once QMakeObject::setReadOnly() has been called the object and its internal structure can no longer change and thus can be freely accessed concurrently from multiple threads.

QMakeObject is reenterent.

This class represents an object in QBuild. At it's simplest, an object can be created like this.

    foo.bar=1
    foo.baz=2

This causes an object with path foo to be created. It has properties bar and baz. Objects can be nested. All QBuild variables are objects so QMakeObject is used to represent variables.


Member Function Documentation

QString QMakeObject::absoluteName () const

Returns the fully-qualified name of the object.

void QMakeObject::addValue ( const QStringList & value, TraceContext * ctxt = 0 )

Append value to the items the object represents. The ctxt object is for debugging purposes.

bool QMakeObject::isProperty ( const QString & property ) const

Returns true if the object has a property called property.

QString QMakeObject::name () const

Returns the name of the object relative to its parent.

See also setName().

QMakeObject * QMakeObject::object ( const QString & path, Project * ctxt )   [static]

Returns an object specified by the absolute path path.

path is in the form [<project path>/]<object path> where <project path> is / deliminated and <object path> is . deliminated. Absence of the project path means the current project.

Returns 0 if no such object. The ctxt object is for debugging.

QMakeObject * QMakeObject::parent () const

Returns the parent object.

QStringList QMakeObject::properties () const

Returns a list of the properties the object has.

QMakeObject * QMakeObject::property ( const QString & property ) const

Returns an object representing property property.

QMakeObject * QMakeObject::root () const

Walks up the tree and returns the top parent.

QString QMakeObject::rootPath () const

Walks up the tree and returns the name of the top parent.

void QMakeObject::setName ( const QString & path )

Set the name of the variable to path. This does not reposition the object in the heirachy, it will still have the same parent.

See also name().

void QMakeObject::setValue ( const QStringList & value, TraceContext * ctxt = 0 )

Set the items the object represents to value. The ctxt object is for debugging purposes.

See also value().

void QMakeObject::subtractValue ( const QStringList & value, TraceContext * ctxt = 0 )

For every item in value, remove that item from the items the object represents. The ctxt object is for debugging purposes.

void QMakeObject::uniteValue ( const QStringList & value, TraceContext * ctxt = 0 )

For every item in value, append that item to the items the object represents unless it already exists. The ctxt object is for debugging purposes.

QStringList QMakeObject::value () const

Returns the items the object represents.

See also setValue().

int QMakeObject::valueCount () const

Returns the number of items the object represents.

void QMakeObject::watch ( const QString & function )

Call function when this object changes.


Copyright © 2009 Nokia
Qt Extended - QBuild Maintainer Guide