This class represents one single instance in the object tree of the parsed OpenDDL-file. More...
#include <DDLNode.h>
Public Types | |
typedef std::vector< DDLNode * > | DllNodeList |
The child-node-list type. | |
Public Member Functions | |
~DDLNode () | |
The class destructor. | |
void | attachParent (DDLNode *parent) |
Will attach a parent node instance, an older one will be released. More... | |
void | detachParent () |
Will try to detach a parent node instance, if there is any. | |
DDLNode * | getParent () const |
Returns the assigned parent node instance, will return ddl_nullptr id no parent is assigned. More... | |
const DllNodeList & | getChildNodeList () const |
Returns the child node list. More... | |
void | setType (const std::string &type) |
const std::string & | getType () const |
Returns the type of the DDLNode instance. More... | |
void | setName (const std::string &name) |
const std::string & | getName () const |
Returns the name of the DDLNode instance. More... | |
void | setProperties (Property *prop) |
Set a new property set. More... | |
Property * | getProperties () const |
Returns the first element of the assigned property set. More... | |
bool | hasProperty (const std::string &name) |
Looks for a given property. More... | |
Property * | findPropertyByName (const std::string &name) |
Search for a given property and returns it. Will return ddl_nullptr if no property was found. More... | |
void | setValue (Value *val) |
Set a new value set. More... | |
Value * | getValue () const |
Returns the first element of the assigned value set. More... | |
void | setDataArrayList (DataArrayList *dtArrayList) |
Set a new DataArrayList. More... | |
DataArrayList * | getDataArrayList () const |
Returns the DataArrayList. More... | |
void | setReferences (Reference *refs) |
Set a new Reference set. More... | |
Reference * | getReferences () const |
Returns the first element of the assigned Reference set. More... | |
Static Public Member Functions | |
static DDLNode * | create (const std::string &type, const std::string &name, DDLNode *parent=ddl_nullptr) |
The creation method. More... | |
Friends | |
class | OpenDDLParser |
This class represents one single instance in the object tree of the parsed OpenDDL-file.
A DDLNode represents one leaf in the OpenDDL-node tree. It can have one parent node and multiple children. You can assign special properties to a single DDLNode instance. A node instance can store values via a linked list. You can get the first value from the DDLNode. A node can store data-array-lists and references as well.
void DDLNode::attachParent | ( | DDLNode * | parent | ) |
Will attach a parent node instance, an older one will be released.
parent | [in] The parent node instance. |
Property* DDLNode::findPropertyByName | ( | const std::string & | name | ) |
Search for a given property and returns it. Will return ddl_nullptr if no property was found.
name | [in] The name for the property to look for. |
const DllNodeList& DDLNode::getChildNodeList | ( | ) | const |
Returns the child node list.
DataArrayList* DDLNode::getDataArrayList | ( | ) | const |
Returns the DataArrayList.
const std::string& DDLNode::getName | ( | ) | const |
DDLNode* DDLNode::getParent | ( | ) | const |
Returns the assigned parent node instance, will return ddl_nullptr id no parent is assigned.
Property* DDLNode::getProperties | ( | ) | const |
Returns the first element of the assigned property set.
Reference* DDLNode::getReferences | ( | ) | const |
const std::string& DDLNode::getType | ( | ) | const |
Value* DDLNode::getValue | ( | ) | const |
Returns the first element of the assigned value set.
bool DDLNode::hasProperty | ( | const std::string & | name | ) |
Looks for a given property.
name | [in] The name for the property to look for. |
void DDLNode::setDataArrayList | ( | DataArrayList * | dtArrayList | ) |
Set a new DataArrayList.
val | [in] The DataArrayList instance. |
void DDLNode::setName | ( | const std::string & | name | ) |
Set the name of the DDLNode instance.
type | [in] The name. |
void DDLNode::setProperties | ( | Property * | prop | ) |
Set a new property set.
prop | [in] The first element of the property set. |
void DDLNode::setReferences | ( | Reference * | refs | ) |
void DDLNode::setType | ( | const std::string & | type | ) |
Set the type of the DDLNode instance.
type | [in] The type. |
void DDLNode::setValue | ( | Value * | val | ) |
Set a new value set.
val | [in] The first value instance of the value set. |