Assimp  v3.1.1 (June 2014)
DDLNode Class Reference

This class represents one single instance in the object tree of the parsed OpenDDL-file. More...

Public Types

typedef std::vector< DDLNode * >::iterator DDLNodeIt
 The child-node-list iterator. More...
 
typedef std::vector< DDLNode * > DllNodeList
 The child-node-list type. More...
 

Public Member Functions

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. More...
 
void dump (IOStreamBase &stream)
 Will dump the node into the stream. More...
 
PropertyfindPropertyByName (const std::string &name)
 Search for a given property and returns it. More...
 
const DllNodeListgetChildNodeList () const
 Returns the child node list. More...
 
DataArrayListgetDataArrayList () const
 Returns the DataArrayList. More...
 
const std::string & getName () const
 Returns the name of the DDLNode instance. More...
 
DDLNodegetParent () const
 Returns the assigned parent node instance, will return ddl_nullptr id no parent is assigned. More...
 
PropertygetProperties () const
 Returns the first element of the assigned property set. More...
 
ReferencegetReferences () const
 Returns the first element of the assigned Reference set. More...
 
const std::string & getType () const
 Returns the type of the DDLNode instance. More...
 
ValuegetValue () const
 Returns the first element of the assigned value set. More...
 
bool hasProperties () const
 Will return true, if any properties are assigned to the node instance. More...
 
bool hasProperty (const std::string &name)
 Looks for a given property. More...
 
void setDataArrayList (DataArrayList *dtArrayList)
 Set a new DataArrayList. More...
 
void setName (const std::string &name)
 Set the name of the DDLNode instance. More...
 
void setProperties (Property *prop)
 Set a new property set. More...
 
void setReferences (Reference *refs)
 Set a new Reference set. More...
 
void setType (const std::string &type)
 Set the type of the DDLNode instance. More...
 
void setValue (Value *val)
 Set a new value set. More...
 
 ~DDLNode ()
 The class destructor. More...
 

Static Public Member Functions

static DDLNodecreate (const std::string &type, const std::string &name, DDLNode *parent=ddl_nullptr)
 The creation method. More...
 

Friends

class OpenDDLParser
 

Detailed Description

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.

Member Typedef Documentation

◆ DDLNodeIt

typedef std::vector<DDLNode*>::iterator DDLNode::DDLNodeIt

The child-node-list iterator.

◆ DllNodeList

typedef std::vector<DDLNode*> DDLNode::DllNodeList

The child-node-list type.

Constructor & Destructor Documentation

◆ ~DDLNode()

DDLNode::~DDLNode ( )

The class destructor.

Member Function Documentation

◆ attachParent()

void DDLNode::attachParent ( DDLNode parent)

Will attach a parent node instance, an older one will be released.

Parameters
parent[in] The parent node instance.

◆ create()

DDLNode * DDLNode::create ( const std::string &  type,
const std::string &  name,
DDLNode parent = ddl_nullptr 
)
static

The creation method.

Parameters
type[in] The DDLNode type.
name[in] The name for the new DDLNode instance.
parent[in] The parent node instance or ddl_nullptr if no parent node is there.
Returns
The new created node instance.

◆ detachParent()

void DDLNode::detachParent ( )

Will try to detach a parent node instance, if there is any.

◆ dump()

void DDLNode::dump ( IOStreamBase stream)

Will dump the node into the stream.

Parameters
stream[in] The stream to write to.

◆ findPropertyByName()

Property * DDLNode::findPropertyByName ( const std::string &  name)

Search for a given property and returns it.

Will return ddl_nullptr if no property was found.

Parameters
name[in] The name for the property to look for.
Returns
The property or ddl_nullptr if no property was found.

◆ getChildNodeList()

const DDLNode::DllNodeList & DDLNode::getChildNodeList ( ) const

Returns the child node list.

Returns
The list of child nodes.

◆ getDataArrayList()

DataArrayList * DDLNode::getDataArrayList ( ) const

Returns the DataArrayList.

Returns
The DataArrayList.

◆ getName()

const std::string & DDLNode::getName ( ) const

Returns the name of the DDLNode instance.

Returns
The name of the DDLNode instance.

◆ getParent()

DDLNode * DDLNode::getParent ( ) const

Returns the assigned parent node instance, will return ddl_nullptr id no parent is assigned.

Returns
The parent node instance.

◆ getProperties()

Property * DDLNode::getProperties ( ) const

Returns the first element of the assigned property set.

Returns
The first property of the assigned property set.

◆ getReferences()

Reference * DDLNode::getReferences ( ) const

Returns the first element of the assigned Reference set.

Returns
The first property of the assigned Reference set.

◆ getType()

const std::string & DDLNode::getType ( ) const

Returns the type of the DDLNode instance.

Returns
The type of the DDLNode instance.

◆ getValue()

Value * DDLNode::getValue ( ) const

Returns the first element of the assigned value set.

Returns
The first property of the assigned value set.

◆ hasProperties()

bool DDLNode::hasProperties ( ) const

Will return true, if any properties are assigned to the node instance.

Returns
True, if properties are assigned.

◆ hasProperty()

bool DDLNode::hasProperty ( const std::string &  name)

Looks for a given property.

Parameters
name[in] The name for the property to look for.
Returns
true, if a corresponding property is assigned to the node, false if not.

◆ setDataArrayList()

void DDLNode::setDataArrayList ( DataArrayList dtArrayList)

Set a new DataArrayList.

Parameters
dtArrayList[in] The DataArrayList instance.

◆ setName()

void DDLNode::setName ( const std::string &  name)

Set the name of the DDLNode instance.

Parameters
name[in] The name.

◆ setProperties()

void DDLNode::setProperties ( Property prop)

Set a new property set.

Parameters
prop[in] The first element of the property set.

◆ setReferences()

void DDLNode::setReferences ( Reference refs)

Set a new Reference set.

Parameters
refs[in] The first value instance of the Reference set.

◆ setType()

void DDLNode::setType ( const std::string &  type)

Set the type of the DDLNode instance.

Parameters
type[in] The type.

◆ setValue()

void DDLNode::setValue ( Value val)

Set a new value set.

Parameters
val[in] The first value instance of the value set.

Friends And Related Function Documentation

◆ OpenDDLParser

friend class OpenDDLParser
friend

The documentation for this class was generated from the following files: