Parser element wrapper.
More...
|
| | ParserElt (xmlNode *) |
| | Creates a new element.
|
| |
|
| ~ParserElt () |
| | Destroys element.
|
| |
| string | getTag () |
| | Gets element tag.
|
| |
| xmlNode * | getNode () |
| | Gets element node.
|
| |
| xmlNode * | getParentNode () |
| | Gets element parent node.
|
| |
| const map< string, string > * | getAttributes () |
| | Gets element attribute map.
|
| |
| bool | getAttribute (const string &, string *) |
| | Gets element attribute value.
|
| |
| bool | setAttribute (const string &, const string &) |
| | Sets element attribute value.
|
| |
| bool | getData (const string &, void **) |
| | Gets user data attached to element.
|
| |
| bool | setData (const string &, void *, UserDataCleanFunc fn=nullptr) |
| | Attaches user data to element.
|
| |
|
|
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()
| ginga::ParserElt::ParserElt |
( |
xmlNode * | node | ) |
|
|
explicit |
Creates a new element.
- Parameters
-
- Returns
- New ParserElt.
◆ getAttribute()
| bool ginga::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 > * ginga::ParserElt::getAttributes |
( |
| ) |
|
Gets element attribute map.
- Returns
- Attribute map.
◆ getData()
| bool ginga::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 * ginga::ParserElt::getNode |
( |
| ) |
|
Gets element node.
- Returns
- Associated node.
◆ getParentNode()
| xmlNode * ginga::ParserElt::getParentNode |
( |
| ) |
|
Gets element parent node.
- Returns
- Parent of associated node.
◆ getTag()
| string ginga::ParserElt::getTag |
( |
| ) |
|
Gets element tag.
- Returns
- Tag.
◆ setAttribute()
| bool ginga::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 ginga::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:
- /__w/ginga/ginga/lib/Parser.cpp