38 #ifndef H_OGF_GOM_TYPES_NODE_H
39 #define H_OGF_GOM_TYPES_NODE_H
96 ogf_assert(i < get_nb_children()) ;
105 size_t get_nb_children()
const {
106 return children_.size();
126 for(
index_t k=0; k<children_.size(); ++k) {
127 if(children_[k] == n1) {
130 if(children_[k] == n2) {
135 std::swap(children_[i], children_[j]);
139 std::vector< SmartPointer<Node> > children_ ;
#define geo_assert(x)
Verifies that a condition is met.
A smart pointer with reference-counted copy semantics.
A composite object in the GOM system.
virtual void remove_child(Node *child)
Removes a child from this Node. \parma[in] child a pointer to the child to be removed.
virtual void add_child(Node *child)
Adds a child to this Node.
Node * get_parent() const
Gets the parent.
void swap_children(Node *n1, Node *n2)
Swaps two children by indices.
Node(Node *parent=nullptr)
Node constructor.
virtual ~Node()
Node destructor.
Base class for all objects in the GOM system.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
SmartPointer< Node > Node_var
An automatic reference-counted pointer to a Node.
The base class for all objects in the GOM system.
Definitions common to all include files in the gom library.