Parser element wrapper.
More...
|
|
string | _tag |
| | Element tag.
|
| |
|
xmlNode * | _node |
| | Corresponding node in document tree.
|
| |
|
map< string, string > | _attrs |
| | Element attributes.
|
| |
|
UserData | _udata |
| | Attached user data.
|
| |
Parser element wrapper.
Data associated with a specific xmlNode.
◆ ParserElt()
| ParserElt::ParserElt |
( |
xmlNode * |
node | ) |
|
Creates a new element.
- Parameters
-
- Returns
- New ParserElt.
◆ getAttribute()
| bool ParserElt::getAttribute |
( |
const string & |
name, |
|
|
string * |
value |
|
) |
| |
Gets element attribute value.
- Parameters
-
| name | Attribute name. |
| [out] | value | Variable to store the attribute value (if any). |
- Returns
true if successful, or false otherwise.
◆ getAttributes()
| const map< string, string > * ParserElt::getAttributes |
( |
| ) |
|
Gets element attribute map.
- Returns
- Attribute map.
◆ getData()
| bool ParserElt::getData |
( |
const string & |
key, |
|
|
void ** |
value |
|
) |
| |
Gets user data attached to element.
- Parameters
-
| key | User data key. |
| [out] | value | Variable to store the user data value (if any). |
- Returns
true if successful, or false otherwise.
◆ getNode()
| xmlNode * ParserElt::getNode |
( |
| ) |
|
Gets element node.
- Returns
- Associated node.
◆ getParentNode()
| xmlNode * ParserElt::getParentNode |
( |
| ) |
|
Gets element parent node.
- Returns
- Parent of associated node.
◆ getTag()
| string ParserElt::getTag |
( |
| ) |
|
Gets element tag.
- Returns
- Tag.
◆ setAttribute()
| bool ParserElt::setAttribute |
( |
const string & |
name, |
|
|
const string & |
value |
|
) |
| |
Sets element attribute value.
- Parameters
-
| name | Attribute name. |
| value | Attribute value. |
- Returns
true if the attribute was previously unset, or false otherwise.
◆ setData()
| bool ParserElt::setData |
( |
const string & |
key, |
|
|
void * |
value, |
|
|
UserDataCleanFunc |
fn = nullptr |
|
) |
| |
Attaches user data to element.
- Parameters
-
| key | User data key. |
| value | User data value. |
| fn | Cleanup function (used to destroy data when ParserElt is destroyed or key is overwritten). |
- Returns
true if key was previously unset, or false otherwise.
The documentation for this class was generated from the following file: