CXXR (C++ R) API
|
Directed edge in the graph whose nodes are GCNode objects. More...
#include <GCEdge.hpp>
Public Types | |
typedef T | type |
Public Member Functions | |
GCEdge (T *target) | |
Primary constructor. | |
GCEdge (const GCEdge< T > &source) | |
Copy constructor. | |
GCEdge< T > & | operator= (const GCEdge< T > &source) |
GCEdge< T > & | operator= (T *newtarget) |
T * | operator-> () const |
operator T * () const | |
Extract encapsulated pointer. | |
T * | get () const |
Access the target pointer. | |
Public Member Functions inherited from CXXR::GCEdgeBase | |
void | detach () |
Null the encapsulated pointer. |
Additional Inherited Members | |
Protected Member Functions inherited from CXXR::GCEdgeBase | |
GCEdgeBase (const GCNode *target) | |
Primary constructor. | |
GCEdgeBase (const GCEdgeBase &source) | |
Copy constructor. | |
const GCNode * | target () const |
Get target of this edge. | |
void | retarget (const GCNode *newtarget) |
Redirect the GCEdge to point at a (possibly) different node. |
Directed edge in the graph whose nodes are GCNode objects.
This class encapsulates a pointer from one GCNode to another, and carries out housekeeping required by the garbage collection scheme. The class name reflects the fact that these objects represent directed edges in the directed graph with the GCNode objects as its nodes.
Whenever an object of a type derived from GCNode needs to refer to another such object, it should do so by containing a GCEdge object, rather than by containing a pointer or reference directly.
T | GCNode or a type publicly derived from GCNode. This may be qualified by const, so for example a const String* may be encapsulated in a GCEdge using the type GCEdge<const String>. |
|
inlineexplicit |
Primary constructor.
target | Pointer to the object to which this GCEdge is to refer. A null pointer is permissible. |
|
inline |
|
inline |
Access the target pointer.
|
inline |
Extract encapsulated pointer.