Xml::RAttribute Class Reference

#include <xml/attribute.h>

Link against: xmlframework.lib

class Xml::RAttribute
Public Member Functions
RAttribute()
IMPORT_C const RTagInfo &Attribute()
IMPORT_C voidClose()
IMPORT_C RAttributeCopy()
IMPORT_C voidOpen(const RString &, const RString &, const RString &, const TAttributeType)
IMPORT_C voidOpen(const RString &, const RString &, const RString &, const RString &, const TAttributeType)
IMPORT_C voidSetValue(const RString &)
IMPORT_C TAttributeTypeType()
IMPORT_C const RString &Value()

Detailed Description

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

See also: RAttributeArray

Constructor & Destructor Documentation

RAttribute ( )

IMPORT_CRAttribute()

Default constructor

Member Function 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.
Return Value
The attribute's name details.

Close ( )

IMPORT_C voidClose()

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 RAttributeCopy()

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

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

IMPORT_C voidOpen(const RString &aUri,
const RString &aPrefix,
const RString &aLocalName,
const TAttributeTypeaType = 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
aUriThe URI of the namespace.
aPrefixThe prefix of the qualified name.
aLocalNameThe local name of the qualified name.
aTypeThe type associated with this attribute.

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

IMPORT_C voidOpen(const RString &aUri,
const RString &aPrefix,
const RString &aLocalName,
const RString &aValue,
const TAttributeTypeaType = 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
aUriThe URI of the namespace.
aPrefixThe prefix of the qualified name.
aLocalNameThe local name of the qualified name.
aValueThe value associated with this attribute.
aTypeThe type associated with this attribute.

SetValue ( const RString & )

IMPORT_C voidSetValue(const RString &aValue)

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

Parameters
aValueThe attributes value.

Type ( )

IMPORT_C TAttributeTypeType()const

This method returns the attribute's type.

Pre-condition
The objects members have been pre-set accordingly.
Return Value
The attribute's type.

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.
Return Value
A handle to the attribute value.