Attribute

The Attribute class stores the prototype for an SGML tag attribute. More...

Public Methods

Attribute( const QString name, ValueType valueType, Type type, QStrIList& enums, QString defaultValue );
const QStringdefaultValue( );
QStrIList&enums( );
const QStringname( );
Typetype( );
ValueTypevalueType( );

Private Data Members

QString_defaultValue;
QStrIList_enums;
QString_name;
Type_type;
ValueType_valueType;

Detailed Documentation

The Attribute class stores the prototype for an SGML tag attribute.

In SGML, all start tags may have one or more attributes associated with them. These attributes are used to modify the meaning of the element is small ways. This class is merely a container for an attribute "prototype" that can be used to validate tag attributes, and/or provide default values for tag attributes.

Public Methods Documentation

Attribute ( const QString name, ValueType valueType, Type type, QStrIList& enums, QString defaultValue );

Create a new Attribute. Name is the name of the attribute. ValueType is the data type of the value (Cdata, Number, Enum, Name, Names). Type is tells whether the value is Implied, Required, Fixed, or has a Default. Enums is the list of possible values, if the valueType was Enum. DefaultValue gives the fixed or default value for the attribute.

const QString defaultValue ( );

This is the default (string) value for the attribute if type is Default.

QStrIList& enums ( );

This is the list of allowed string values if the valueType is Enum.

const QString name ( );

The attribute name.

Type type ( );

Is the attribute value Implied, Required, Fixed, or does it have a Default?

ValueType valueType ( );

The data type of the attribute value.

Cdata
Raw SGML character data.
Number
Numeric value (i.e. 5, 2.3, 95%).
Enum
Enumerated type, only certain string values are allowed.
Name
I have no idea.
Names
I have no idea.


Return to Index.
Automatically generated on Aug 11 23:32