ROSE  0.11.96.11
Public Member Functions | List of all members
Sawyer::Tree::Children Class Referencefinal

Description

Vector of parent-to-child pointers.

Each Node has a children data member that similar to a const std::vector<NodePtr> and which points to all the child nodes. This list has one element per ChildEdge data member regardless of whether that ChildEdge has a null or non-null value. Assigning a new node to a ChildEdge pointer will automatically update the corresponding element of this list.

Definition at line 337 of file Tree.h.

#include <Tree.h>

Public Member Functions

 Children (Node *container)
 
 Children (const Children &)=delete
 
Childrenoperator= (const Children &)=delete
 
size_t size () const
 Number of nodes in vector.
 
size_t max_size () const
 Maximum potential size.
 
size_t capacity () const
 Size of allocated storage.
 
bool empty () const
 Empty predicate.
 
void reserve (size_t n)
 Request change in capacity.
 
void shrink_to_fit ()
 Request container to reduce capacity.
 
const NodePtr at (size_t idx) const
 Child pointer at index, checked.
 
const NodePtr operator[] (size_t idx) const
 Child pointer at index, unchecked.
 
const NodePtr front () const
 First child pointer.
 
const NodePtr back () const
 Last child pointer.
 
const std::vector< NodePtr > & elmts () const
 The actual underlying vector of child pointers.
 
bool operator== (const Children &other) const
 Relations.
 
bool operator!= (const Children &other) const
 Relations.
 
bool operator< (const Children &other) const
 Relations.
 
bool operator<= (const Children &other) const
 Relations.
 
bool operator> (const Children &other) const
 Relations.
 
bool operator>= (const Children &other) const
 Relations.
 

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