pwfengine
Public Member Functions | Protected Member Functions | Friends
PSchemaElement Class Reference

An explicity shared element of a schema. More...

#include <PSchemaElement.h>

Inheritance diagram for PSchemaElement:
PSchema

List of all members.

Public Member Functions

 PSchemaElement (const QDomElement &schemaElement=QDomElement())
 PSchemaElement (const PSchemaElement &other)
PSchemaElementoperator= (const PSchemaElement &other)
bool setSchemaElement (const QDomElement &schemaElement)
virtual bool isValid ()
bool isNull () const
bool isReference () const
QString type () const
QString name () const
QString attribute (const QString &attributeName) const
PSchemaElement directChild (const QString &elementType, const QString &elementName="") const
QList< PSchemaElementswitches () const
QList< PSchemaElementcases () const
QList< PSchemaElementrequires () const

Protected Member Functions

QDomElement schemaElement () const

Friends

class PSchemaElementPrivate

Detailed Description

An explicity shared element of a schema.


Member Function Documentation

QString PSchemaElement::attribute ( const QString &  attributeName) const
Returns:
the attribute of the element
PSchemaElement PSchemaElement::directChild ( const QString &  elementType,
const QString &  elementName = "" 
) const
Returns:
the specified direct child of this element, a null element if not exists.
Parameters:
elementTypethe element type, e.g. search or data
elementNamethe element name, e.g foo
QString PSchemaElement::name ( ) const
Returns:
the name of the schema element, i.e. the value of the attribute "name".

Reimplemented in PSchema.

QDomElement PSchemaElement::schemaElement ( ) const [protected]

Each PSchemaElement has an unique ID setted when the schema is created. The id can be used as an index for storing data about the schema element in other classes.

bool PSchemaElement::setSchemaElement ( const QDomElement &  schemaElement)

Set the schema element and check its validity.

QString PSchemaElement::type ( ) const
Returns:
the type of the schema element, e.g. data, search, etc.

Example: an element <foo>...</foo> will return foo


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Enumerator