Castor3D 0.16.0
Multiplatform 3D engine
Classes | Namespaces | Macros
OwnedBy.hpp File Reference

Classes

class  castor::OwnedBy< Owner >
 Class used to have an object owned by another one. More...
 

Namespaces

namespace  castor
 

Macros

#define CU_DeclareExportedOwnedBy(Export, Owner, Name)
 Helper macro to declare an exported OwnedBy specialisation.
 
#define CU_ImplementExportedOwnedBy(Owner, Name)
 Helper macro to implement an OwnedBy specialisation.
 

Macro Definition Documentation

◆ CU_DeclareExportedOwnedBy

#define CU_DeclareExportedOwnedBy ( Export,
Owner,
Name )
Value:
namespace castor\
{\
template<>\
class Export OwnedBy< Owner >\
{\
protected:\
explicit OwnedBy( Owner & owner )noexcept;\
public:\
Owner * get##Name()const noexcept;\
Owner * getOwner()const noexcept;\
private:\
Owner * m_owner;\
};\
}
Definition AnimatedObjectGroupCache.hpp:22

Helper macro to declare an exported OwnedBy specialisation.

Remarks
Must be used in global namespace.

◆ CU_ImplementExportedOwnedBy

#define CU_ImplementExportedOwnedBy ( Owner,
Name )
Value:
namespace castor\
{\
OwnedBy< Owner >::OwnedBy( Owner & owner )noexcept\
: m_owner( &owner )\
{\
}\
Owner * OwnedBy< Owner >::get##Name()const noexcept\
{\
return m_owner;\
}\
Owner * OwnedBy< Owner >::getOwner()const noexcept\
{\
return m_owner;\
}\
}
Owner * getOwner() const
Definition OwnedBy.hpp:35

Helper macro to implement an OwnedBy specialisation.

Remarks
Must be used in global namespace.