Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Static Public Member Functions | List of all members
castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT > Struct Template Reference

#include <DesignModule.hpp>

Inheritance diagram for castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >:
Inheritance graph
[legend]

Public Types

using ElementT = ResT
 
using ElementKeyT = KeyT
 
using ElementPtrT = ResourcePtrT< ElementT, ElementKeyT >
 
using ElementObsT = ResourceObsT< ElementT, ElementKeyT >
 
using ElementContT = UnorderedMap< KeyT, ElementPtrT >
 
using ElementCacheT = ResourceCacheBaseT< ElementT, KeyT, TraitsT >
 
using ElementInitialiserT = castor::Function< void( ElementT & ) >
 
using ElementCleanerT = castor::Function< void( ElementT & ) >
 
using ElementMergerT
 

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 ResT, typename KeyT, typename TraitsT>
struct castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >

Helper structure to build a castor::ResourceCacheTraitsT.

Remarks
Predefines:
  • ElementT: The resource type.
  • ElementPtrT: The resource pointer type.
  • ElementObsT: 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.
  • static ElementPtrT makeElement( ElementKeyT const &, ParametersT && ... ): The element creation function.
Hence, only remains to define:
  • Name: The element type name.

Member Typedef Documentation

◆ ElementCacheT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementCacheT = ResourceCacheBaseT< ElementT, KeyT, TraitsT >

◆ ElementCleanerT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementCleanerT = castor::Function< void( ElementT & ) >

◆ ElementContT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementContT = UnorderedMap< KeyT, ElementPtrT >

◆ ElementInitialiserT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementInitialiserT = castor::Function< void( ElementT & ) >

◆ ElementKeyT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementKeyT = KeyT

◆ ElementMergerT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementMergerT
Initial value:
std::function< FuncT > Function
Definition ConfigModule.hpp:97
UnorderedMap< KeyT, ElementPtrT > ElementContT
Definition DesignModule.hpp:428
ResourceCacheBaseT< ElementT, KeyT, TraitsT > ElementCacheT
Definition DesignModule.hpp:429
ResourcePtrT< ElementT, ElementKeyT > ElementPtrT
Definition DesignModule.hpp:426

◆ ElementObsT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementObsT = ResourceObsT< ElementT, ElementKeyT >

◆ ElementPtrT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementPtrT = ResourcePtrT< ElementT, ElementKeyT >

◆ ElementT

template<typename ResT , typename KeyT , typename TraitsT >
using castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::ElementT = ResT

Member Function Documentation

◆ areElementsEqual() [1/4]

template<typename ResT , typename KeyT , typename TraitsT >
static bool castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::areElementsEqual ( ElementObsT const & lhs,
ElementObsT const & rhs )
inlinestatic

◆ areElementsEqual() [2/4]

template<typename ResT , typename KeyT , typename TraitsT >
static bool castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::areElementsEqual ( ElementObsT const & lhs,
ElementPtrT const & rhs )
inlinestatic

◆ areElementsEqual() [3/4]

template<typename ResT , typename KeyT , typename TraitsT >
static bool castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::areElementsEqual ( ElementPtrT const & lhs,
ElementObsT const & rhs )
inlinestatic

◆ areElementsEqual() [4/4]

template<typename ResT , typename KeyT , typename TraitsT >
static bool castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::areElementsEqual ( ElementPtrT const & lhs,
ElementPtrT const & rhs )
inlinestatic

◆ isElementObsNull()

template<typename ResT , typename KeyT , typename TraitsT >
static bool castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::isElementObsNull ( ElementObsT const & element)
inlinestatic

◆ makeElement()

template<typename ResT , typename KeyT , typename TraitsT >
template<typename ... ParametersT>
static ElementPtrT castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::makeElement ( ElementCacheT const & cache,
ElementKeyT const & key,
ParametersT &&... params )
inlinestatic

◆ makeElementObs()

template<typename ResT , typename KeyT , typename TraitsT >
static ElementObsT castor::ResourceCacheTraitsBaseT< ResT, KeyT, TraitsT >::makeElementObs ( ElementPtrT const & element)
inlinestatic

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