Horizon Official Technical Documentation
TestObject< T > Class Template Reference
+ Collaboration diagram for TestObject< T >:

Public Member Functions

virtual ~TestObject ()
 
bool valid () const
 
void add_reference (TestRefManager< T > &m)
 
void remove_reference ()
 
TestReference< T > & get_reference ()
 

Private Attributes

TestReference< T > _ref
 

Constructor & Destructor Documentation

◆ ~TestObject()

template<class T >
virtual TestObject< T >::~TestObject ( )
inlinevirtual
101{ }

Member Function Documentation

◆ add_reference()

template<class T >
void TestObject< T >::add_reference ( TestRefManager< T > &  m)
inline
104{ assert(!valid()); _ref.link(&m, (T*) this); }
void link(TO *toObj, FROM *fromObj)
Links the Reference to the specified object by adding it to the front of the list.
Definition: Reference.hpp:49
bool valid() const
Definition: ReferenceListTest.cpp:103
TestReference< T > _ref
Definition: ReferenceListTest.cpp:110

References TestObject< T >::_ref, Horizon::Structures::LinkedList::Reference< TO, FROM >::link(), and TestObject< T >::valid().

+ Here is the call graph for this function:

◆ get_reference()

template<class T >
TestReference< T > & TestObject< T >::get_reference ( )
inline
107{ return _ref; }

References TestObject< T >::_ref.

◆ remove_reference()

template<class T >
void TestObject< T >::remove_reference ( )
inline
105{ assert(valid()); _ref.invalidate(); }
void invalidate()
Definition: Reference.hpp:77

References TestObject< T >::_ref, Horizon::Structures::LinkedList::Reference< TO, FROM >::invalidate(), and TestObject< T >::valid().

+ Here is the call graph for this function:

◆ valid()

template<class T >
bool TestObject< T >::valid ( ) const
inline
103{ return _ref.is_valid(); }
bool is_valid() const
Definition: Reference.hpp:84

References TestObject< T >::_ref, and Horizon::Structures::LinkedList::Reference< TO, FROM >::is_valid().

Referenced by TestObject< T >::add_reference(), and TestObject< T >::remove_reference().

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

Member Data Documentation

◆ _ref


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