Class that catch XML Parser events for a specific tag and build the corresponding Object.
More...
#include <hpp/manipulation/parser/parser.hh>
Class that catch XML Parser events for a specific tag and build the corresponding Object.
Derive this class if you wish to extend the Parser. The event callbacks are called in the following order:
- Note
- The derived class must have the following construtor
{
}
ObjectFactory(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
tinyxml2::XMLElement XMLElement
Definition parser.hh:43
◆ ObjectFactoryList
◆ ObjectFactory() [1/2]
◆ ObjectFactory() [2/2]
◆ ~ObjectFactory()
◆ addChild()
◆ addTextChild()
◆ as()
Cast this class to any child class.
◆ finishAttributes()
Called when all the attributes have been processed.
- Returns
- True to continue parsing this tag, False otherwise.
◆ finishFile()
Called when parsing is finished.
◆ finishTags()
Called when all the child tags have been processed.
◆ getAttribute()
Return a given attributes.
◆ getChildOfType()
Get the ObjectFactory whose tag name is type.
- Parameters
-
| [out] | o | Set to the first element of the requested type. |
- Returns
- true if there was only element of the requested type. false if there are more than one.
- Exceptions
-
| std::invalid_argument | if no ObjectFactory of the requested type exists. |
◆ getChildrenOfType()
◆ hasAttribute()
Check if an attribute was set.
◆ hasParent()
◆ impl_setAttribute()
◆ init()
Called when the object is created.
- Returns
- True to continue parsing this tag, False otherwise.
◆ name() [1/3]
Return the content of the attribute name, or an empty string.
◆ name() [2/3]
◆ name() [3/3]
Set the name. The default value is the value of the attribute "name" of the XML tag or an empty string if this does not exist.
◆ parent()
◆ print()
◆ root()
◆ setAttribute()
Called for each attribute. A few reserved name are automatocally catched. The reserved names are "name" and "id". "name" expects a string. "id" expects an unsigned integer and can be use to define pointers to elements.
◆ tagName()
Return tag name of the element is any. Returns "No element" otherwise.
◆ XMLelement()
The documentation for this class was generated from the following file: