ROSE 0.11.145.192
|
Points from a child to a parent in the tree.
This is the pointer type that points from a child vertex to its parent vertex if the child has a parent. Its value is adjusted automatically when the child vertex is inserted or erased as a child of some other vertex. The term "edge" is used instead of "pointer" because the relationship between child and parent is bidirectional.
A reverse edge is always a data member of a vertex and never instantiated in other circumstances. Thus users don't normally instantiate these directly, but they do interact with them through the parent
data member that exists for all vertex types.
#include <Sawyer/Tree.h>
Public Member Functions | |
ReverseEdge (const ReverseEdge &)=delete | |
ReverseEdge & | operator= (const ReverseEdge &)=delete |
ReverseEdge (Vertex &child) | |
operator bool () const | |
True if parent is not null. | |
UserBasePtr | operator() () const |
Return the parent if there is one, else null. | |
UserBasePtr | operator-> () const |
Return the parent if there is one, else null. | |
bool | operator== (const UserBasePtr &) const |
Compare the parent pointer to another pointer. | |
bool | operator!= (const UserBasePtr &) const |
Compare the parent pointer to another pointer. | |
bool | operator== (const ReverseEdge &) const |
Compare the parent pointer to another pointer. | |
bool | operator!= (const ReverseEdge &) const |
Compare the parent pointer to another pointer. | |
template<class T > | |
bool | operator== (const Edge< T > &) const |
Compare the parent pointer to another pointer. | |
template<class T > | |
bool | operator!= (const Edge< T > &) const |
Compare the parent pointer to another pointer. | |
Sawyer::Tree::Vertex< B >::ReverseEdge::~ReverseEdge | ( | ) |
|
explicit |
Vertex< B >::UserBasePtr Sawyer::Tree::Vertex< B >::ReverseEdge::operator() | ( | ) | const |
Return the parent if there is one, else null.
Definition at line 1130 of file Tree.h.
References Sawyer::Tree::Vertex< B >::pointer().
Vertex< B >::UserBasePtr Sawyer::Tree::Vertex< B >::ReverseEdge::operator-> | ( | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== | ( | const UserBasePtr & | ptr | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= | ( | const UserBasePtr & | ptr | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== | ( | const ReverseEdge & | other | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= | ( | const ReverseEdge & | other | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== | ( | const Edge< T > & | other | ) | const |
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= | ( | const Edge< T > & | other | ) | const |
|
inlineexplicit |