Ocean
Ocean::Rendering::SmartObjectRef< T > Class Template Reference

This class implements a smart rendering object reference. More...

Inheritance diagram for Ocean::Rendering::SmartObjectRef< T >:

Public Member Functions

 SmartObjectRef ()
 Creates an empty smart object reference. More...
 
 SmartObjectRef (const Rendering::ObjectRef &objectRef)
 Creates a new smart object reference by a given object reference. More...
 
template<typename T2 >
 SmartObjectRef (const Rendering::SmartObjectRef< T2 > &reference)
 Copies a smart object reference. More...
 
- Public Member Functions inherited from Ocean::SmartObjectRef< T, Object >
 SmartObjectRef ()=default
 Creates a new SmartObjectRef with no internal object. More...
 
 SmartObjectRef (T *object)
 Creates a new SmartObjectRef by a given object. More...
 
 SmartObjectRef (T *object, const ReleaseCallback &releaseCallback)
 Creates a new SmartObjectRef by a given object. More...
 
 SmartObjectRef (const SmartObjectRef< T, Object > &smartObjectRef)
 Copy constructor. More...
 
 SmartObjectRef (SmartObjectRef< T, Object > &&smartObjectRef)
 Move constructor. More...
 
 SmartObjectRef (const ObjectRef< Object > &objectRef)
 Creates a new SmartObjectRef by a given ObjectRef. More...
 
 SmartObjectRef (const SmartObjectRef< T2, Object > &smartObjectRef)
 Copies a SmartObjectRef object. More...
 
SmartObjectRef< T, Object > & operator= (const SmartObjectRef< T, Object > &smartObjectRef)
 Assign operator. More...
 
SmartObjectRef< T, Object > & operator= (SmartObjectRef< T, Object > &&smartObjectRef)
 Moves a smart object reference object to this smart object reference. More...
 
SmartObjectRef< T, Object > & operator= (const ObjectRef< Object > &objectRef)
 Assigns a ObjectRef to this smart object reference. More...
 
void release ()
 Releases the internal object, if any. More...
 
T * pointer () const
 Returns a pointer to the objects that is encapsulated by this wrapper. More...
 
T * operator-> () const
 Returns a point to the internal object if existing. More...
 
T & operator* () const
 Returns a reference to the internal object if existing. More...
 
- Public Member Functions inherited from Ocean::ObjectRef< Object >
 ObjectRef ()=default
 Creates an empty ObjectRef object. More...
 
 ObjectRef (const ObjectRef< Object > &objectRef)
 Copy constructor. More...
 
 ObjectRef (ObjectRef< Object > &&object) noexcept
 Move constructor. More...
 
 ObjectRef (Object *object)
 Creates a new ObjectRef holding a given object. More...
 
 ObjectRef (Object *object, const ReleaseCallback &releaseCallback)
 Creates a new ObjectRef holding and managing a given object. More...
 
 ~ObjectRef ()
 Destructs an object reference object and releases the internal object if possible. More...
 
T2 & force () const
 Returns a reference to the internal object forcing to a specified type. More...
 
Object * operator-> () const
 Returns a point to the internal object if existing. More...
 
Object & operator* () const
 Returns a reference to the internal object if existing. More...
 
bool isUnique () const
 Returns whether there is no other object reference but this one. More...
 
bool isNull () const
 Returns whether this object reference holds no internal object. More...
 
void release ()
 Releases the internal object, if any. More...
 
Object * pointer () const
 Returns a pointer to the objects that is encapsulated by this wrapper. More...
 
ObjectRef< Object > & operator= (const ObjectRef< Object > &objectRef)
 Assign operator. More...
 
ObjectRef< Object > & operator= (ObjectRef< Object > &&right) noexcept
 Move operator. More...
 
bool operator== (const ObjectRef< Object > &objectRef) const
 Returns whether two object references are holds the same internal object. More...
 
bool operator!= (const ObjectRef< Object > &objectRef) const
 Returns whether two object references are not equal. More...
 
bool operator< (const ObjectRef< Object > &objectRef) const
 Returns whether the left object is less than the right one. More...
 
 operator bool () const
 Returns whether this object reference holds an internal object. More...
 

Additional Inherited Members

- Public Types inherited from Ocean::SmartObjectRef< T, Object >
typedef ObjectRef< Object >::ReleaseCallback ReleaseCallback
 Redefinition of the release callback function defined in ObjectRef. More...
 
- Public Types inherited from Ocean::ObjectRef< Object >
typedef Callback< void, const Object * > ReleaseCallback
 Definition of a release callback function. More...
 
- Static Protected Member Functions inherited from Ocean::ObjectRef< Object >
static void destroyObject (Object *object)
 Destroys the object located in the ObjectHolder object. More...
 
- Protected Attributes inherited from Ocean::SmartObjectRef< T, Object >
T * objectPointer_
 Pointer to the internal object. More...
 
- Protected Attributes inherited from Ocean::ObjectRef< Object >
ObjectHolder * objectHolder_
 Pointer to the object holder. More...
 

Detailed Description

template<typename T>
class Ocean::Rendering::SmartObjectRef< T >

This class implements a smart rendering object reference.

Template Parameters
TType of the derived object that has to be encapsulated by the smart reference object

Constructor & Destructor Documentation

◆ SmartObjectRef() [1/3]

template<typename T >
Ocean::Rendering::SmartObjectRef< T >::SmartObjectRef

Creates an empty smart object reference.

◆ SmartObjectRef() [2/3]

template<typename T >
Ocean::Rendering::SmartObjectRef< T >::SmartObjectRef ( const Rendering::ObjectRef objectRef)

Creates a new smart object reference by a given object reference.

Parameters
objectRefObject reference to copy

◆ SmartObjectRef() [3/3]

template<typename T >
template<typename T2 >
Ocean::Rendering::SmartObjectRef< T >::SmartObjectRef ( const Rendering::SmartObjectRef< T2 > &  reference)

Copies a smart object reference.

Parameters
referenceReference to copy

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