Xml::RAttribute Class Reference

class Xml::RAttribute

The RAttribute class holds an attribute's description belonging to an element. RAttributeArray

Public Member Functions
RAttribute ()
IMPORT_C const RTagInfo & Attribute ()
IMPORT_C void Close ()
IMPORT_C RAttribute Copy ()
IMPORT_C void Open (const RString &, const RString &, const RString &, const TAttributeType )
IMPORT_C void Open (const RString &, const RString &, const RString &, const RString &, const TAttributeType )
IMPORT_C void SetValue (const RString &)
IMPORT_C TAttributeType Type ()
IMPORT_C const RString & Value ()
Private Attributes
RTagInfo iAttribute
TAttributeType iType
RString iValue

Constructor & Destructor Documentation

RAttribute()

IMPORT_C RAttribute ( )

Default constructor

Member Functions Documentation

Attribute()

IMPORT_C const RTagInfo & Attribute ( ) const

This method returns a handle to the attribute's name details.

Pre-condition
The objects members have been pre-set accordingly.

Close()

IMPORT_C void Close ( )

This method cleans up the object before destruction. It releases all resources in accordance to the R Class pattern.

Post-condition
This object may be allowed to go out of scope.

Copy()

IMPORT_C RAttribute Copy ( )

Copy method. The original and copy must be closed seperately.

Open(const RString &, const RString &, const RString &, const TAttributeType)

IMPORT_C void Open ( const RString & aUri,
const RString & aPrefix,
const RString & aLocalName,
const TAttributeType aType = EAttributeType_NONE
)

This method sets the attribute's contents, taking ownership of the RStrings.

Pre-condition
The object has just been constructed and no other values have been set.
Post-condition
The objects members have been set to the values given.

Parameters

const RString & aUri The URI of the namespace.
const RString & aPrefix The prefix of the qualified name.
const RString & aLocalName The local name of the qualified name.
const TAttributeType aType = EAttributeType_NONE The type associated with this attribute.

Open(const RString &, const RString &, const RString &, const RString &, const TAttributeType)

IMPORT_C void Open ( const RString & aUri,
const RString & aPrefix,
const RString & aLocalName,
const RString & aValue,
const TAttributeType aType = EAttributeType_NONE
)

This method sets all the attribute's contents, taking ownership of the RStrings.

Pre-condition
The object has just been constructed and no other values have been set.
Post-condition
The objects members have been set to the values given.

Parameters

const RString & aUri The URI of the namespace.
const RString & aPrefix The prefix of the qualified name.
const RString & aLocalName The local name of the qualified name.
const RString & aValue The value associated with this attribute.
const TAttributeType aType = EAttributeType_NONE The type associated with this attribute.

SetValue(const RString &)

IMPORT_C void SetValue ( const RString & aValue )

This method sets the attribute's value, taking ownership of the RString .

Parameters

const RString & aValue The attributes value.

Type()

IMPORT_C TAttributeType Type ( ) const

This method returns the attribute's type.

Pre-condition
The objects members have been pre-set accordingly.

Value()

IMPORT_C const RString & Value ( ) const

This method returns a handle to the attribute value. If the attribute value is a list of tokens (IDREFS, ENTITIES or NMTOKENS), the tokens will be concatenated into a single RString with each token separated by a single space.

Pre-condition
The objects members have been pre-set accordingly.

Member Data Documentation

RTagInfo iAttribute

RTagInfo iAttribute [private]

Holds information about the attribute.

TAttributeType iType

TAttributeType iType [private]

Holds the attribute's type.

RString iValue

RString iValue [private]

Holds the attribute's value.