ROSE  0.11.145.0
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 180 of file Tree.h.

#include <util/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. More...
 
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.
 

Member Function Documentation

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

True if parent is not null.

Definition at line 226 of file Tree.h.


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