Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Static Public Member Functions | List of all members
castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT > Struct Template Reference

#include <SceneModule.hpp>

Inheritance diagram for castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >:
Inheritance graph
[legend]

Public Types

using ElementT = ObjT
 
using ElementKeyT = KeyT
 
using ElementPtrT = castor::UniquePtr< ElementT >
 
using ElementObsT = ElementT *
 
using ElementContT = castor::Map< KeyT, ElementPtrT >
 
using ElementCacheT = ObjectCacheBaseT< ElementT, KeyT >
 
using ElementInitialiserT = castor::Function< void( ElementT & ) >
 
using ElementCleanerT = castor::Function< void( ElementT & ) >
 
using ElementMergerT
 
using ElementAttacherT
 
using ElementDetacherT = castor::Function< void( ElementT & ) >
 

Static Public Member Functions

template<typename ... ParametersT>
static ElementPtrT makeElement (ElementCacheT const &cache, ElementKeyT const &key, ParametersT &&... params)
 
static ElementObsT makeElementObs (ElementPtrT const &element)
 
static bool areElementsEqual (ElementObsT const &lhs, ElementObsT const &rhs)
 
static bool areElementsEqual (ElementObsT const &lhs, ElementPtrT const &rhs)
 
static bool areElementsEqual (ElementPtrT const &lhs, ElementObsT const &rhs)
 
static bool areElementsEqual (ElementPtrT const &lhs, ElementPtrT const &rhs)
 
static bool isElementObsNull (ElementObsT const &element)
 

Detailed Description

template<typename ObjT, typename KeyT>
struct castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >

Helper structure to build a castor3d::ObjectCacheTraitsT.

Remarks
Predefines:
  • ElementT: The resource type.
  • ElementPtrT: The resource pointer type.
  • ElementObjT: The resource observer type.
  • ElementContT: The resource container type.
  • ElementCacheT: The resource base cache type.
  • ElementInitialiserT: The prototype of the function use to initialise a resource.
  • ElementCleanerT: The prototype of the function use to cleanup a resource.
  • ElementMergerT: The prototype of the function use to merge a cache element into another cache.
  • ElementAttacherT: The prototype of the function use to attach a cache element to a scene node.
  • ElementDetacherT: The prototype of the function use to detach a cache element from a scene node.
  • static ElementPtrT makeElement( ElementKeyT const &, ParametersT && ... ): The element creation function.
Hence, only remains to define:
  • Name: The element type name.

Member Typedef Documentation

◆ ElementAttacherT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementAttacherT
Initial value:
, SceneNode &
, SceneNodeRPtr
, SceneNodeRPtr
, SceneNodeRPtr ) >
std::function< FuncT > Function
Definition ConfigModule.hpp:97
ObjT ElementT
Definition SceneModule.hpp:462

◆ ElementCacheT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementCacheT = ObjectCacheBaseT< ElementT, KeyT >

◆ ElementCleanerT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementCleanerT = castor::Function< void( ElementT & ) >

◆ ElementContT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementContT = castor::Map< KeyT, ElementPtrT >

◆ ElementDetacherT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementDetacherT = castor::Function< void( ElementT & ) >

◆ ElementInitialiserT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementInitialiserT = castor::Function< void( ElementT & ) >

◆ ElementKeyT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementKeyT = KeyT

◆ ElementMergerT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementMergerT
Initial value:
, SceneNodeRPtr
, SceneNodeRPtr ) >
castor::Map< KeyT, ElementPtrT > ElementContT
Definition SceneModule.hpp:466
ObjectCacheBaseT< ElementT, KeyT > ElementCacheT
Definition SceneModule.hpp:467
castor::UniquePtr< ElementT > ElementPtrT
Definition SceneModule.hpp:464

◆ ElementObsT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementObsT = ElementT *

◆ ElementPtrT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementPtrT = castor::UniquePtr< ElementT >

◆ ElementT

template<typename ObjT , typename KeyT >
using castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::ElementT = ObjT

Member Function Documentation

◆ areElementsEqual() [1/4]

template<typename ObjT , typename KeyT >
static bool castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::areElementsEqual ( ElementObsT const & lhs,
ElementObsT const & rhs )
inlinestatic

◆ areElementsEqual() [2/4]

template<typename ObjT , typename KeyT >
static bool castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::areElementsEqual ( ElementObsT const & lhs,
ElementPtrT const & rhs )
inlinestatic

◆ areElementsEqual() [3/4]

template<typename ObjT , typename KeyT >
static bool castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::areElementsEqual ( ElementPtrT const & lhs,
ElementObsT const & rhs )
inlinestatic

◆ areElementsEqual() [4/4]

template<typename ObjT , typename KeyT >
static bool castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::areElementsEqual ( ElementPtrT const & lhs,
ElementPtrT const & rhs )
inlinestatic

◆ isElementObsNull()

template<typename ObjT , typename KeyT >
static bool castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::isElementObsNull ( ElementObsT const & element)
inlinestatic

◆ makeElement()

template<typename ObjT , typename KeyT >
template<typename ... ParametersT>
static ElementPtrT castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::makeElement ( ElementCacheT const & cache,
ElementKeyT const & key,
ParametersT &&... params )
inlinestatic

◆ makeElementObs()

template<typename ObjT , typename KeyT >
static ElementObsT castor3d::ObjectCacheTraitsBaseT< ObjT, KeyT >::makeElementObs ( ElementPtrT const & element)
inlinestatic

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