Abstract base class for implementing mutually-connected pointers. More...
#include <Mutual_ptr.hpp>
Public Member Functions | |
virtual T & | mine ()=0 |
Obtain the object I am permanently associated with. | |
virtual const T & | mine () const =0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Protected Member Functions | |
virtual void | connect_self (Ptr_base< U, T > *)=0 |
Do whatever I need to do to connect myself to this Ptr_base without worrying about the other side. | |
virtual void | disconnect_self (Ptr_base< U, T > *)=0 |
Do whatever I need to do to disconnect myself from this Ptr_base without worrying about the other side. | |
void | connect (Ptr_base< U, T > *other) |
Mutually connect us by calling both our connect_self . | |
void | disconnect (Ptr_base< U, T > *other) |
Mutually disconnect us by calling both our disconnect_self . | |
Friends | |
class | Ptr_base< U, T > |
Abstract base class for implementing mutually-connected pointers.
Specifies an interface that has a reference to a T
(mine()
), as well as a mechanism to connect with and disconnect from a Ptr_base<T, U>
. Implements the mechanics of mutual connection and disconnection. Derived classes should implement mine()
, connect_self(Ptr_base<U, T>*)
, and disconnect_self(Ptr_base<U, T>*)
and then implement their own interface that calls connect(Ptr_base<U, T>*)
and disconnect(Ptr_base<U, T>*)
.
|
protectedpure virtual |
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in hexed::Multiple_ptr< T, U >, hexed::Mutual_ptr< T, U >, hexed::Mutual_ptr< hexed::Element, hexed::Tree >, hexed::Mutual_ptr< hexed::Element_new, hexed::Tree >, hexed::Mutual_ptr< hexed::Face, hexed::Connection_new >, hexed::Mutual_ptr< hexed::Face, hexed::Hanging >, hexed::Mutual_ptr< hexed::Hanging, hexed::Face >, and hexed::Mutual_ptr< hexed::Tree, hexed::Element >.
|
pure virtual |
Obtain the object I am permanently associated with.
Implemented in hexed::Multiple_ptr< T, U >, hexed::Mutual_ptr< T, U >, hexed::Mutual_ptr< hexed::Element, hexed::Tree >, hexed::Mutual_ptr< hexed::Element_new, hexed::Tree >, hexed::Mutual_ptr< hexed::Face, hexed::Connection_new >, hexed::Mutual_ptr< hexed::Face, hexed::Hanging >, hexed::Mutual_ptr< hexed::Hanging, hexed::Face >, and hexed::Mutual_ptr< hexed::Tree, hexed::Element >.