![]() |
graph 6.0.0
Graph: generic attributed relational graphs
|
Attributed tree element. More...
#include <graph/tree/tree.h>


Public Member Functions | |
| Tree (bool allowChildren=true, const std::string &str="") | |
| virtual | ~Tree () |
Public Member Functions inherited from carto::SyntaxedObject< PropertySet > | |
| SyntaxedObject (const std::string &s) | |
| SyntaxedObject (const SyntaxedObject &x) | |
| SyntaxedObject (const SyntaxedObject< PropertySet > &x) | |
| SyntaxedObject (const std::string &s) | |
| SyntaxedObject (const SyntaxedObject &x) | |
| SyntaxedObject (const SyntaxedObject< PropertySet > &x) | |
Public Member Functions inherited from BaseTree | |
| BaseTree (bool allowsChildren=true) | |
| Constructor. | |
| virtual | ~BaseTree () |
| const std::list< BaseTree * > & | children () const |
| bool | getAllowsChildren () const |
| Returns true if the receiver allows children. | |
| BaseTree * | getChildAt (unsigned childIndex) const |
Returns the child BaseTree pointer at index childIndex. | |
| int | getIndex (BaseTree *node) const |
Returns the index of node in the receivers children. | |
| BaseTree * | getParent () const |
| Returns the parent BaseTree of the receiver. | |
| BaseTree * | getTopParent () |
| Returns the top-level parent BaseTree of the receiver. | |
| const BaseTree * | getTopParent () const |
| Returns the top-level parent of the receiver (const version) | |
| bool | isLeaf () const |
| Returns true if the receiver is a leaf (terminal node) | |
| void | insert (BaseTree *child, int index=-1) |
Adds child to the receiver at index (default: end) | |
| void | remove (unsigned index) |
Removes the child at index index from the receiver. | |
| void | remove (BaseTree *node) |
Removes node from the receiver. | |
| void | removeFromParent () |
| Removes the receiver from its parent. | |
| void | setParent (BaseTree *newParent) |
Sets the parent of the receiver to newParent. | |
| void | clear () |
| Deletes all children from the tree. | |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | rend () const |
Visitor pattern | |
| virtual void | accept (TreeVisitor &visitor) |
| virtual void | const_accept (ConstTreeVisitor &visitor) const |
| virtual bool | check (const carto::SyntaxSet &syntax, std::set< std::string > &missing) const |
| std::set< Tree * > | getElementsWith (const std::string &, bool recurse=true) const |
| template<class T> | |
| std::set< Tree * > | getElementsWith (const std::string &, const T &, bool recurse=true) const |
| virtual size_t | size () const __attribute__((__deprecated__)) |
| deprecated | |
| virtual size_t | childrenSize () const |
| Returns the number of children BaseTree the receiver contains. | |
Additional Inherited Members | |
Public Types inherited from carto::SyntaxedObject< PropertySet > | |
| typedef internal::SyntaxedObjectSwitch< T, SUPERSUBCLASS(Interface, T)>::ContentType | ContentType |
Public Types inherited from BaseTree | |
| typedef std::list< BaseTree * >::iterator | iterator |
| typedef std::list< BaseTree * >::const_iterator | const_iterator |
| typedef std::list< BaseTree * >::reverse_iterator | reverse_iterator |
| typedef std::list< BaseTree * >::const_reverse_iterator | const_reverse_iterator |
|
inline |
Definition at line 102 of file tree.h.
References BaseTree::BaseTree().
Referenced by childrenSize().
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
| std::set< Tree * > Tree::getElementsWith | ( | const std::string & | , |
| bool | recurse = true ) const |
References getElementsWith().
Referenced by getElementsWith().
|
inline |
|
virtual |
deprecated
Reimplemented from BaseTree.