Horizon Official Technical Documentation
GridReference< OBJECT > Class Template Reference

GridReference is a reference to an object in GridRefManager. It is used to link objects. More...

#include <GridReference.hpp>

+ Inheritance diagram for GridReference< OBJECT >:
+ Collaboration diagram for GridReference< OBJECT >:

Public Member Functions

 GridReference ()
 
 ~GridReference () override
 
GridReferencenext ()
 
- Public Member Functions inherited from Horizon::Structures::LinkedList::Reference< GridRefManager< OBJECT >, OBJECT >
 Reference ()
 
virtual ~Reference ()
 
void link (GridRefManager< OBJECT > *toObj, OBJECT *fromObj)
 Links the Reference to the specified object by adding it to the front of the list. More...
 
void remove ()
 
void invalidate ()
 
bool is_valid () const
 
Reference< GridRefManager< OBJECT >, OBJECT > * next ()
 
Reference< GridRefManager< OBJECT >, OBJECT > const * next () const
 
Reference< GridRefManager< OBJECT >, OBJECT > * prev ()
 
Reference< GridRefManager< OBJECT >, OBJECT > const * prev () const
 
Reference< GridRefManager< OBJECT >, OBJECT > * nocheck_next ()
 
Reference< GridRefManager< OBJECT >, OBJECT > const * nocheck_next () const
 
Reference< GridRefManager< OBJECT >, OBJECT > * nocheck_prev ()
 
Reference< GridRefManager< OBJECT >, OBJECT > const * nocheck_prev () const
 
GridRefManager< OBJECT > * operator-> () const
 
GridRefManager< OBJECT > * target () const
 
OBJECT * source () const
 
- Public Member Functions inherited from Horizon::Structures::LinkedList::Element
 Element ()
 
bool has_next () const
 Returns true if this Element has a next Element in the list. More...
 
bool has_prev () const
 Returns true if this Element has a previous Element in the list. More...
 
bool is_in_list () const
 Returns true if this Element is in a list. More...
 
Elementnext ()
 Returns the next Element in the list. More...
 
Element const * next () const
 
Elementprev ()
 Returns the previous Element in the list. More...
 
Element const * prev () const
 
Elementnocheck_next ()
 Returns the next Element in the list without checking if it exists. More...
 
Element const * nocheck_next () const
 
Elementnocheck_prev ()
 Returns the previous Element in the list without checking if it exists. More...
 
Element const * nocheck_prev () const
 
void delink ()
 Removes this Element from the list. More...
 
void push_before (Element *pElem)
 Pushes this Element before the given Element. More...
 
void push_after (Element *pElem)
 Pushes this Element after the given Element. More...
 

Protected Member Functions

void target_object_build_link () override
 
void target_object_destroy_link () override
 
void source_object_destroy_link () override
 
virtual void target_object_build_link ()=0
 
virtual void target_object_destroy_link ()=0
 
virtual void source_object_destroy_link ()=0
 
- Protected Member Functions inherited from Horizon::Structures::LinkedList::Element
 ~Element ()
 

Detailed Description

template<class OBJECT>
class GridReference< OBJECT >

GridReference is a reference to an object in GridRefManager. It is used to link objects.

Template Parameters
OBJECTThe type of object to be linked.

Constructor & Destructor Documentation

◆ GridReference()

template<class OBJECT >
GridReference< OBJECT >::GridReference ( )
inline

◆ ~GridReference()

template<class OBJECT >
GridReference< OBJECT >::~GridReference ( )
inlineoverride

Member Function Documentation

◆ next()

template<class OBJECT >
GridReference * GridReference< OBJECT >::next ( )
inline
53 {
55 }
GridReference is a reference to an object in GridRefManager. It is used to link objects.
Definition: GridReference.hpp:43
GridReference * next()
Definition: GridReference.hpp:52

References GridReference< OBJECT >::next().

Referenced by GridReference< OBJECT >::next().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ source_object_destroy_link()

template<class OBJECT >
void GridReference< OBJECT >::source_object_destroy_link ( )
inlineoverrideprotectedvirtual

Implements Horizon::Structures::LinkedList::Reference< GridRefManager< OBJECT >, OBJECT >.

73 {
74 // called from invalidate()
75 this->target()->dec_size();
76 }
GridRefManager< OBJECT > * target() const
Definition: Reference.hpp:100

References Horizon::Structures::LinkedList::Reference< GridRefManager< OBJECT >, OBJECT >::target().

+ Here is the call graph for this function:

◆ target_object_build_link()

template<class OBJECT >
void GridReference< OBJECT >::target_object_build_link ( )
inlineoverrideprotectedvirtual

Implements Horizon::Structures::LinkedList::Reference< GridRefManager< OBJECT >, OBJECT >.

59 {
60 // called from link()
61 this->target()->push_front(this);
62 this->target()->inc_size();
63 }

References Horizon::Structures::LinkedList::Reference< GridRefManager< OBJECT >, OBJECT >::target().

+ Here is the call graph for this function:

◆ target_object_destroy_link()

template<class OBJECT >
void GridReference< OBJECT >::target_object_destroy_link ( )
inlineoverrideprotectedvirtual

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