TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod > Class Template Reference

Public Member Functions

 SharedAccessor (const shared_ptr< T > &object, GetMethod getMethod, SetMethod setMethod)
 
virtual void set (ValueType v)
 
virtual ValueType get () const
 
virtual Interfaceclone () const
 
virtual bool isNull () const
 
- Public Member Functions inherited from G3D::Pointer< ValueType >::Interface
virtual ~Interface ()
 

Private Attributes

shared_ptr< T > object
 
GetMethod getMethod
 
SetMethod setMethod
 

Constructor & Destructor Documentation

template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::SharedAccessor ( const shared_ptr< T > &  object,
GetMethod  getMethod,
SetMethod  setMethod 
)
inline
180 
181  debugAssert(object != NULL);
182  }
SetMethod setMethod
Definition: Pointer.h:172
arena_t NULL
Definition: jemalloc_internal.h:624
#define debugAssert(exp)
Definition: debugAssert.h:160
GetMethod getMethod
Definition: Pointer.h:171
shared_ptr< T > object
Definition: Pointer.h:170

+ Here is the caller graph for this function:

Member Function Documentation

template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
virtual Interface* G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::clone ( ) const
inlinevirtual

Implements G3D::Pointer< ValueType >::Interface.

194  {
195  return new SharedAccessor(object, getMethod, setMethod);
196  }
SetMethod setMethod
Definition: Pointer.h:172
SharedAccessor(const shared_ptr< T > &object, GetMethod getMethod, SetMethod setMethod)
Definition: Pointer.h:177
GetMethod getMethod
Definition: Pointer.h:171

+ Here is the call graph for this function:

template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
virtual ValueType G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::get ( ) const
inlinevirtual

Implements G3D::Pointer< ValueType >::Interface.

190  {
191  return (object.get()->*getMethod)();
192  }
GetMethod getMethod
Definition: Pointer.h:171
template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
virtual bool G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::isNull ( ) const
inlinevirtual

Implements G3D::Pointer< ValueType >::Interface.

198  {
199  return (bool)object;
200  }
shared_ptr< T > object
Definition: Pointer.h:170
template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
virtual void G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::set ( ValueType  v)
inlinevirtual

Implements G3D::Pointer< ValueType >::Interface.

184  {
185  if (setMethod) {
186  (object.get()->*setMethod)(v);
187  }
188  }
SetMethod setMethod
Definition: Pointer.h:172

Member Data Documentation

template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
GetMethod G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::getMethod
private
template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
shared_ptr<T> G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::object
private
template<typename ValueType>
template<class T , typename GetMethod , typename SetMethod >
SetMethod G3D::Pointer< ValueType >::SharedAccessor< T, GetMethod, SetMethod >::setMethod
private

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