|
| Attribute () |
| Create an empty attribute object.
|
|
virtual | ~Attribute () |
| Call the destructor for a Attribute object.
|
|
virtual uint_t | Parse (InputMemoryStream *pInput) |
| Parse an XML Attribute object.
|
|
virtual uint_t | Save (OutputMemoryStream *pOutput, uint_t uDepth) const |
| Write out an XML Attribute object.
|
|
const char * | GetKey (void) const |
| Return a pointer to the key string for the attribute.
|
|
void | SetKey (const char *pInput) |
| Set a new attribute key.
|
|
void | SetKey (const String *pInput) |
| Set a new attribute key.
|
|
const char * | GetValue (void) const |
| Return a pointer to the value string for the attribute.
|
|
void | SetValue (const char *pInput) |
| Set a new attribute value.
|
|
void | SetValue (const String *pInput) |
| Set a new attribute value.
|
|
uint_t | GetBoolean (uint_t bDefault) const |
| Return a boolean.
|
|
void | SetBoolean (uint_t bValue) |
| Return a boolean.
|
|
uint_t | GetWord (uint_t uDefault, uint_t uMin=0, uint_t uMax=0xFFFFFFFFU) const |
| Return an unsigned integer value.
|
|
void | SetWord (uint_t uValue) |
| Set an unsigned integer value.
|
|
void | SetWordHex (uint_t uValue) |
| Set an unsigned integer value as hex.
|
|
int_t | GetInt (int_t iDefault, int_t iMin=(- 0x7FFFFFFF) -1, int_t iMax=0x7FFFFFFF) const |
| Return a signed integer value.
|
|
void | SetInt (int_t iValue) |
| Set a signed integer value.
|
|
float | GetFloat (float fDefault) const |
| Return a floating point value.
|
|
float | GetFloat (float fDefault, float fMin, float fMax) const |
| Return a floating point value.
|
|
void | SetFloat (float fValue) |
| Set a 32 bit floating point value.
|
|
double | GetDouble (double dDefault) const |
| Return a 64 bit floating point value.
|
|
double | GetDouble (double dDefault, double dMin, double dMax) const |
| Return a 64 bit floating point value.
|
|
void | SetDouble (double dValue) |
| Set a 64 bit floating point value.
|
|
Attribute * | Update (Root *pRoot, const char *pKey, const char *pValue) |
| Create or dispose of an attribute record.
|
|
| Generic (eType uType) |
| Initialize a generic object.
|
|
virtual | ~Generic () |
| Call the destructor for a generic object.
|
|
Generic * | GetNext (void) const |
| Get the pointer to the next object in the list.
|
|
Generic * | GetPrevious (void) const |
| Get the pointer to the previous object in the list.
|
|
eType | GetType (void) const |
| Get the enumeration of the derived class' type.
|
|
void | InsertBefore (Generic *pGeneric) |
| Insert this object before this one in the linked list.
|
|
void | InsertAfter (Generic *pGeneric) |
| Insert this object after this one in the linked list.
|
|
Element * | GetNextElement (void) const |
| Follow the linked list of items to the next Element.
|
|
Element * | GetNextElement (const char *pElementName) const |
| Follow the linked list of items to the next named Element.
|
|
Generic * | GetNextItem (void) const |
| Follow the linked list of items to the next object.
|
|
const char * | get_class_name (void) const noexcept |
| Get the name of the class.
|
|
virtual const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept |
| Get the description to the class.
|
|
virtual | ~Base () noexcept=default |
| Destructor.
|
|
XML Attribute key / value pair.
Some XML elements have attached attributes. Each attribute is attached to an element in the form of attribute="value"
For parsing, ' is valid as is ". Due to the nature of some XML files, it will parse attribute=value as long as the value has no spaces. It will write out the value with quotes in all cases.
- Note
- This will identify with eType of XML_ATTRIBUTE
- See also
- FileXML, FileXML::Generic, FileXML::Declaration or FileXML::Element
Create or dispose of an attribute record.
If a pointer to an attribute is maintained, use this function to create / delete / modify an existing attribute. If the key is NULL or an empty string or the data is NULL, the attribute will be disposed of.
If the key / value is valid and the attribute pointer is NULL, a new attribute will be created and appended to the end of the pRoot linked list. Otherwise, the current attribute will have the key/value pair updated to the new value.
Will return NULL if the attribute was disposed on, the "this" pointer on update or a new pointer if an attribute was created.
g_pAttribute = g_pAttribute->
Update(pElement->
GetRoot(),
"key",
"newvalue");
#define NULL
Define of the number 0 for pointer invalidation.
Definition burger.h:57
XML Attribute key / value pair.
Definition burger.h:23287
Attribute * Update(Root *pRoot, const char *pKey, const char *pValue)
Create or dispose of an attribute record.
Definition brfilexml.cpp:1714
XML Element object.
Definition burger.h:23368
Root * GetRoot(void)
Return the root object.
Definition burger.h:23378
- Parameters
-
pRoot | Pointer to parent's Generic linked list in the event of attribute creation. If NULL, a new item will not be added to any linked list. |
pKey | Pointer to a "C" string with the key. |
pValue | Pointer to a "C" string with the value. |
- Returns
- NULL on error or a valid Attribute record on a valid key/value pair