ROSE 0.11.145.147
Public Member Functions | List of all members
Sawyer::Tree::Vertex< B >::ReverseEdge Class Reference

Description

template<class B>
class Sawyer::Tree::Vertex< B >::ReverseEdge

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.

Definition at line 191 of file Tree.h.

#include <Sawyer/Tree.h>

Public Member Functions

 ReverseEdge (const ReverseEdge &)=delete
 
ReverseEdgeoperator= (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.
 

Constructor & Destructor Documentation

◆ ~ReverseEdge()

template<class B >
Sawyer::Tree::Vertex< B >::ReverseEdge::~ReverseEdge ( )

Definition at line 1117 of file Tree.h.

◆ ReverseEdge()

template<class B >
Sawyer::Tree::Vertex< B >::ReverseEdge::ReverseEdge ( Vertex child)
explicit

Definition at line 1122 of file Tree.h.

Member Function Documentation

◆ operator()()

template<class B >
Vertex< B >::UserBasePtr Sawyer::Tree::Vertex< B >::ReverseEdge::operator() ( ) const

Return the parent if there is one, else null.

Definition at line 1127 of file Tree.h.

References Sawyer::Tree::Vertex< B >::pointer().

◆ operator->()

template<class B >
Vertex< B >::UserBasePtr Sawyer::Tree::Vertex< B >::ReverseEdge::operator-> ( ) const

Return the parent if there is one, else null.

Definition at line 1137 of file Tree.h.

◆ operator==() [1/3]

template<class B >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== ( const UserBasePtr ptr) const

Compare the parent pointer to another pointer.

Definition at line 1144 of file Tree.h.

◆ operator!=() [1/3]

template<class B >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= ( const UserBasePtr ptr) const

Compare the parent pointer to another pointer.

Definition at line 1150 of file Tree.h.

◆ operator==() [2/3]

template<class B >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== ( const ReverseEdge other) const

Compare the parent pointer to another pointer.

Definition at line 1156 of file Tree.h.

◆ operator!=() [2/3]

template<class B >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= ( const ReverseEdge other) const

Compare the parent pointer to another pointer.

Definition at line 1162 of file Tree.h.

◆ operator==() [3/3]

template<class B >
template<class T >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator== ( const Edge< T > &  other) const

Compare the parent pointer to another pointer.

Definition at line 1169 of file Tree.h.

◆ operator!=() [3/3]

template<class B >
template<class T >
bool Sawyer::Tree::Vertex< B >::ReverseEdge::operator!= ( const Edge< T > &  other) const

Compare the parent pointer to another pointer.

Definition at line 1176 of file Tree.h.

◆ operator bool()

template<class B >
Sawyer::Tree::Vertex< B >::ReverseEdge::operator bool ( ) const
inlineexplicit

True if parent is not null.

Definition at line 237 of file Tree.h.


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