#include <UAPBuilder.hpp>

Public Member Functions | |
| UAPBuilder (UAPNode *node) | |
| Creates a UAPBuilder and initializes it with the specified dialect translator and node. | |
| ~UAPBuilder () | |
| Destructor. | |
| void | addChild (enum UAPNode_type type, std::string name) |
| Adds a child Node to this model. | |
| void | addAttribute (std::string name, std::string value, bool allow_repeats=false) |
| Adds an attribute to this model. | |
| void | moveToParent () |
| Switch focus to the parent of the current node. | |
| UAPNode * | getCurrentNode () |
| Returns the current node. | |
| NodeVec | getSubNodesByTagName (const std::string &tagName) |
Returns a list of all the UAPNode(s) with a given tag name in the order in which they are encountered in a preorder traversal of this UAP model. | |
| UAPNode * | getChildByName (const std::string &_name) |
| Returns the first child node of the current node with the specified name. | |
| UAPNode * | getChildByName (UAPNode *beginPosition, const std::string &_name) |
| Returns the first child node of the specified node with the specified name. | |
| NodeVec | getChildrenByName (const std::string &_name) |
| Returns a list of children of the current node with the specified name. | |
| NodeVec | getChildrenByName (UAPNode *beginPosition, const std::string &_name) |
| Returns a list of children of the specified node with the specified name. | |
| UAPNode * | getSubNodeByName (const std::string &_name) |
| Returns the first sub-node node of the current node with the specified name. | |
| UAPNode * | getSubNodeByName (UAPNode *beginPosition, const std::string &_name) |
| Returns the first sub-node node of the specified node with the specified name. | |
| NodeVec | getSubNodesByName (const std::string &_name) |
| Returns a list of sub-noderen of the current node with the specified name. | |
| NodeVec | getSubNodesByName (UAPNode *beginPosition, const std::string &_name) |
| Returns a list of children of the specified node with the specified name. | |
Using this class, an application programmer can obtain a UAP model.
Once a UAP model is obtained, it can be translated into a variety of formats.
Definition at line 46 of file UAPBuilder.hpp.
| UAPBuilder::UAPBuilder | ( | UAPNode * | node | ) |
Creates a UAPBuilder and initializes it with the specified dialect translator and node.
| DialectTranslator | the dialect translator | |
| UAPNode | the root node |
Definition at line 28 of file UAPBuilder.cpp.
| UAPBuilder::~UAPBuilder | ( | ) |
| void UAPBuilder::addAttribute | ( | std::string | name, | |
| std::string | value, | |||
| bool | allow_repeats = false | |||
| ) |
Adds an attribute to this model.
This methods calls the UAPNode.addAttribute method with the specified name, value and allow_repeats arguments.
| name | the name of the attribute | |
| value | the value of the attribute | |
| allow_repeats | true to allow duplicate attributes; false if attributes must be unique. (default: false) |
string
bool
Definition at line 47 of file UAPBuilder.cpp.
| void UAPBuilder::addChild | ( | enum UAPNode_type | type, | |
| std::string | name | |||
| ) |
Adds a child Node to this model.
This methods calls the UAPNode.addChild method with the specified type and name arguments.
| type | the type of the child | |
| name | the name of the child |
string
Definition at line 37 of file UAPBuilder.cpp.
Returns the first child node of the specified node with the specified name.
Only the first level sub-nodes (the children) are searched. The search begins at the node beginPosition.
| beginPosition | the UAP node | |
| _name | The name of the node |
NULL if no node has the specified name. string
Definition at line 62 of file UAPBuilder.cpp.
| UAPNode * UAPBuilder::getChildByName | ( | const std::string & | _name | ) |
Returns the first child node of the current node with the specified name.
Only the first level sub-nodes (the children) are searched.
| _name | The name of the node. |
NULL if no node has the specified name. string
Definition at line 54 of file UAPBuilder.cpp.
| NodeVec UAPBuilder::getChildrenByName | ( | UAPNode * | beginPosition, | |
| const std::string & | _name | |||
| ) |
Returns a list of children of the specified node with the specified name.
Only the first level sub-nodes (the children) are searched.
| beginPosition | the parent of the children. | |
| _name | The name to match to. |
string
Definition at line 79 of file UAPBuilder.cpp.
| NodeVec UAPBuilder::getChildrenByName | ( | const std::string & | _name | ) |
Returns a list of children of the current node with the specified name.
Only the first level sub-nodes (the children) are searched.
| _name | the name of the node. |
string
Definition at line 70 of file UAPBuilder.cpp.
Returns the first sub-node node of the specified node with the specified name.
All sub-nodes (children and sub-children) are searched. The search begins at the node beginPosition.
| beginPosition | the UAP node | |
| _name | the name of the node |
NULL if the name is not mapped to any node in this UAP model. string
Definition at line 99 of file UAPBuilder.cpp.
| UAPNode * UAPBuilder::getSubNodeByName | ( | const std::string & | _name | ) |
Returns the first sub-node node of the current node with the specified name.
All sub-nodes (children and sub-children) are searched.
| _name | The name of the node. |
NULL if the name is not mapped to any node in this UAP model. string
Definition at line 88 of file UAPBuilder.cpp.
| NodeVec UAPBuilder::getSubNodesByName | ( | UAPNode * | beginPosition, | |
| const std::string & | _name | |||
| ) |
Returns a list of children of the specified node with the specified name.
All sub-nodes (children and sub-children) are searched.
| beginPosition | the parent of the children. | |
| _name | the name to match to. |
string
Definition at line 120 of file UAPBuilder.cpp.
| NodeVec UAPBuilder::getSubNodesByName | ( | const std::string & | _name | ) |
Returns a list of sub-noderen of the current node with the specified name.
All sub-nodes (children and sub-children) are searched.
| _name | the name of the node. |
string
Definition at line 110 of file UAPBuilder.cpp.
| NodeVec UAPBuilder::getSubNodesByTagName | ( | const std::string & | tagName | ) |
| void UAPBuilder::moveToParent | ( | ) |
1.5.7