ROSE  0.9.11.145
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. More...
 
size_t max_size () const
 Maximum potential size. More...
 
size_t capacity () const
 Size of allocated storage. More...
 
bool empty () const
 Empty predicate. More...
 
void reserve (size_t n)
 Request change in capacity. More...
 
void shrink_to_fit ()
 Request container to reduce capacity. More...
 
const NodePtr at (size_t idx) const
 Child pointer at index, checked. More...
 
const NodePtr operator[] (size_t idx) const
 Child pointer at index, unchecked. More...
 
const NodePtr front () const
 First child pointer. More...
 
const NodePtr back () const
 Last child pointer. More...
 
const std::vector< NodePtr > & elmts () const
 The actual underlying vector of child pointers. More...
 
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.
 

Member Function Documentation

size_t Sawyer::Tree::Children::size ( void  ) const
inline

Number of nodes in vector.

Definition at line 352 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::push_back(), and Sawyer::Tree::ListNode< T >::size().

size_t Sawyer::Tree::Children::max_size ( ) const
inline

Maximum potential size.

Definition at line 357 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::max_size().

size_t Sawyer::Tree::Children::capacity ( ) const
inline

Size of allocated storage.

Definition at line 362 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::capacity().

bool Sawyer::Tree::Children::empty ( ) const
inline

Empty predicate.

Definition at line 367 of file Tree.h.

Referenced by back(), Sawyer::Tree::ListNode< T >::empty(), and front().

void Sawyer::Tree::Children::reserve ( size_t  n)
inline

Request change in capacity.

Definition at line 372 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::reserve().

void Sawyer::Tree::Children::shrink_to_fit ( )
inline

Request container to reduce capacity.

Definition at line 377 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::shrink_to_fit().

const NodePtr Sawyer::Tree::Children::at ( size_t  idx) const
inline

Child pointer at index, checked.

Definition at line 382 of file Tree.h.

Referenced by Sawyer::Tree::ListNode< T >::at().

const NodePtr Sawyer::Tree::Children::operator[] ( size_t  idx) const
inline

Child pointer at index, unchecked.

Definition at line 388 of file Tree.h.

const NodePtr Sawyer::Tree::Children::front ( ) const
inline

First child pointer.

Definition at line 394 of file Tree.h.

References empty().

Referenced by Sawyer::Tree::ListNode< T >::front().

const NodePtr Sawyer::Tree::Children::back ( ) const
inline

Last child pointer.

Definition at line 400 of file Tree.h.

References empty().

Referenced by Sawyer::Tree::ListNode< T >::back().

const std::vector<NodePtr >& Sawyer::Tree::Children::elmts ( ) const
inline

The actual underlying vector of child pointers.

Definition at line 406 of file Tree.h.


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