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

Classes

struct  castor3d::PtrCacheTraitsBaseT< ResT, KeyT >
 

Namespaces

namespace  castor3d
 

Macros

#define DECLARE_CACHE_MEMBER_MIN(memberName, className)
 
#define DECLARE_CACHE_MEMBER(memberName, className)
 
#define DECLARE_OBJECT_CACHE_MEMBER_MIN(memberName, className)
 
#define DECLARE_OBJECT_CACHE_MEMBER(memberName, className)
 
#define DECLARE_CACHE_VIEW_MEMBER(memberName, className, eventType)
 
#define DECLARE_CU_CACHE_VIEW_MEMBER(memberName, className, eventType)
 

Cache

template<typename ObjT , typename KeyT >
using castor3d::ObjectPtrT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementPtrT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectObsT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementObsT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectContT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementContT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectInitialiserT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementInitialiserT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectCleanerT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementCleanerT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectMergerT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementMergerT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectAttacherT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementAttacherT
 
template<typename ObjT , typename KeyT >
using castor3d::ObjectDetacherT = typename ObjectCacheTraitsT< ObjT, KeyT >::ElementDetacherT
 
template<typename ObjT , typename KeyT , typename TraitsT >
using castor3d::ObjectCachePtrT = castor::UniquePtr< ObjectCacheT< ObjT, KeyT, TraitsT > >
 
template<typename CacheT , EventType EventT>
using castor3d::CacheViewPtrT = castor::UniquePtr< CacheViewT< CacheT, EventT > >
 
 castor3d::CU_DeclareSmartPtr (castor3d, RenderTargetCache, C3D_API)
 
 castor3d::CU_DeclareSmartPtr (castor3d, ShaderProgramCache, C3D_API)
 
 castor3d::CU_DeclareSmartPtr (castor3d, TextureUnitCache, C3D_API)
 

Macro Definition Documentation

◆ DECLARE_CACHE_MEMBER

#define DECLARE_CACHE_MEMBER ( memberName,
className )

◆ DECLARE_CACHE_MEMBER_MIN

#define DECLARE_CACHE_MEMBER_MIN ( memberName,
className )
Value:
public:\
className##Cache & get##className##Cache()noexcept\
{\
return *m_##memberName##Cache;\
}\
className##Cache const & get##className##Cache()const noexcept\
{\
return *m_##memberName##Cache;\
}\
private:\
className##Cache##UPtr m_##memberName##Cache

◆ DECLARE_CACHE_VIEW_MEMBER

#define DECLARE_CACHE_VIEW_MEMBER ( memberName,
className,
eventType )

◆ DECLARE_CU_CACHE_VIEW_MEMBER

#define DECLARE_CU_CACHE_VIEW_MEMBER ( memberName,
className,
eventType )

◆ DECLARE_OBJECT_CACHE_MEMBER

#define DECLARE_OBJECT_CACHE_MEMBER ( memberName,
className )
Value:
public:\
template< typename ... ParametersT >\
className##Cache::ElementObsT addNew##className( className##Cache::ElementKeyT const & key\
, ParametersT && ... parameters )\
{\
return m_##memberName##Cache->add( key\
, castor::forward< ParametersT >( parameters )... );\
}\
className##Cache::ElementObsT add##className( className##Cache::ElementKeyT const & key\
, className##Cache::ElementPtrT & element\
, bool initialise = false )\
{\
return m_##memberName##Cache->add( key, element, initialise );\
}\
DECLARE_OBJECT_CACHE_MEMBER_MIN( memberName, className )

◆ DECLARE_OBJECT_CACHE_MEMBER_MIN

#define DECLARE_OBJECT_CACHE_MEMBER_MIN ( memberName,
className )