Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::CookedResourceCollectionBase Class Referenceabstract

Provides thread-safe cooked data creation and storage. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly. More...

#include <CookedResourceCollectionBase.h>

Inheritance diagram for ph::CookedResourceCollectionBase:
ph::INoCopyAndMove ph::CookedResourceCollection ph::TransientResourceCache

Public Member Functions

virtual ~CookedResourceCollectionBase ()=default
 
virtual std::string getStats () const =0
 

Protected Types

template<typename CookedType >
using TSdlResourceIdMap = std::unordered_map<SdlResourceId, std::unique_ptr<CookedType>>
 

Static Protected Member Functions

template<typename DerivedType , typename BaseType , typename... DeducedArgs>
static DerivedType * makeCookedResource (TSynchronized< TUniquePtrVector< BaseType > > &syncedResources, DeducedArgs &&... args)
 
template<typename CookedType , typename... DeducedArgs>
static CookedType * makeCookedResourceWithID (TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id, DeducedArgs &&... args)
 
template<typename CookedType , typename... DeducedArgs>
static const CookedType * getCookedResourceByID (const TSynchronized< TSdlResourceIdMap< CookedType > > &syncedIdToResource, const SdlResourceId id)
 

Detailed Description

Provides thread-safe cooked data creation and storage. All methods are thread-safe to call, however manipulating the created data is not thread-safe unless stated explicitly.

Member Typedef Documentation

◆ TSdlResourceIdMap

template<typename CookedType >
using ph::CookedResourceCollectionBase::TSdlResourceIdMap = std::unordered_map<SdlResourceId, std::unique_ptr<CookedType>>
protected

Constructor & Destructor Documentation

◆ ~CookedResourceCollectionBase()

virtual ph::CookedResourceCollectionBase::~CookedResourceCollectionBase ( )
virtualdefault

Member Function Documentation

◆ getCookedResourceByID()

template<typename CookedType , typename... DeducedArgs>
static const CookedType * ph::CookedResourceCollectionBase::getCookedResourceByID ( const TSynchronized< TSdlResourceIdMap< CookedType > > & syncedIdToResource,
const SdlResourceId id )
inlinestaticprotected

◆ getStats()

virtual std::string ph::CookedResourceCollectionBase::getStats ( ) const
pure virtual

◆ makeCookedResource()

template<typename DerivedType , typename BaseType , typename... DeducedArgs>
static DerivedType * ph::CookedResourceCollectionBase::makeCookedResource ( TSynchronized< TUniquePtrVector< BaseType > > & syncedResources,
DeducedArgs &&... args )
inlinestaticnodiscardprotected

◆ makeCookedResourceWithID()

template<typename CookedType , typename... DeducedArgs>
static CookedType * ph::CookedResourceCollectionBase::makeCookedResourceWithID ( TSynchronized< TSdlResourceIdMap< CookedType > > & syncedIdToResource,
const SdlResourceId id,
DeducedArgs &&... args )
inlinestaticprotected

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