Castor3D 0.16.0
Multiplatform 3D engine
Public Types | List of all members
castor::ResourceT< ResT, KeyT > Class Template Reference

External resource representation. More...

#include <Resource.hpp>

Inheritance diagram for castor::ResourceT< ResT, KeyT >:
Inheritance graph
[legend]
Collaboration diagram for castor::ResourceT< ResT, KeyT >:
Collaboration graph
[legend]

Public Types

using ElementT = ResT
 
using ElementKeyT = KeyT
 

Public Member Functions

 ResourceT (ResourceT &&rhs) noexcept=default
 
 ResourceT (ResourceT const &)=delete
 
ResourceToperator= (ResourceT &&rhs) noexcept=default
 
ResourceToperator= (ResourceT const &)=delete
 
 ~ResourceT () noexcept override=default
 
template<typename ... ParametersT>
 ResourceT (ParametersT &&... params)
 
 ResourceT (ElementT &&rhs)
 
ResourceToperator= (ElementT &&rhs)
 
template<typename ... ParametersT>
void initialise (ParametersT &&... params)
 
template<typename ... ParametersT>
void cleanup (ParametersT &&... params)
 
template<typename ... ParametersT, typename ... ParametersU>
void reinitialise (ParametersT &&... paramsT, ParametersU &&... paramsU)
 
bool isInitialised () const noexcept
 
ElementToperator* () noexcept
 
using OnResourceFunc = castor::Function< void( ElementT const & ) >
 
using OnResourceEvent = SignalT< OnResourceFunc >
 
using Connection = ConnectionT< OnResourceEvent >
 
OnResourceEvent onInitialising
 
OnResourceEvent onInitialised
 
OnResourceEvent onCleaning
 
OnResourceEvent onCleaned
 

Detailed Description

template<typename ResT, typename KeyT>
class castor::ResourceT< ResT, KeyT >

External resource representation.

Remarks
They are meant to be loaded asynchronously.

Member Typedef Documentation

◆ Connection

template<typename ResT , typename KeyT >
using castor::ResourceT< ResT, KeyT >::Connection = ConnectionT< OnResourceEvent >

◆ ElementKeyT

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

◆ ElementT

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

◆ OnResourceEvent

template<typename ResT , typename KeyT >
using castor::ResourceT< ResT, KeyT >::OnResourceEvent = SignalT< OnResourceFunc >

◆ OnResourceFunc

template<typename ResT , typename KeyT >
using castor::ResourceT< ResT, KeyT >::OnResourceFunc = castor::Function< void( ElementT const & ) >

name Signal.

Constructor & Destructor Documentation

◆ ResourceT() [1/4]

template<typename ResT , typename KeyT >
castor::ResourceT< ResT, KeyT >::ResourceT ( ResourceT< ResT, KeyT > && rhs)
defaultnoexcept

name Construction/Desctruction.

◆ ResourceT() [2/4]

template<typename ResT , typename KeyT >
castor::ResourceT< ResT, KeyT >::ResourceT ( ResourceT< ResT, KeyT > const & )
delete

◆ ~ResourceT()

template<typename ResT , typename KeyT >
castor::ResourceT< ResT, KeyT >::~ResourceT ( )
overridedefaultnoexcept

◆ ResourceT() [3/4]

template<typename ResT , typename KeyT >
template<typename ... ParametersT>
castor::ResourceT< ResT, KeyT >::ResourceT ( ParametersT &&... params)
explicit

◆ ResourceT() [4/4]

template<typename ResT , typename KeyT >
castor::ResourceT< ResT, KeyT >::ResourceT ( ElementT && rhs)
explicit

Member Function Documentation

◆ cleanup()

template<typename ResT , typename KeyT >
template<typename ... ParametersT>
void castor::ResourceT< ResT, KeyT >::cleanup ( ParametersT &&... params)

◆ initialise()

template<typename ResT , typename KeyT >
template<typename ... ParametersT>
void castor::ResourceT< ResT, KeyT >::initialise ( ParametersT &&... params)

name Initialisation/Cleanup.

◆ isInitialised()

template<typename ResT , typename KeyT >
bool castor::ResourceT< ResT, KeyT >::isInitialised ( ) const
inlinenoexcept

name Getters.

◆ operator*()

template<typename ResT , typename KeyT >
ElementT & castor::ResourceT< ResT, KeyT >::operator* ( )
inlinenoexcept

◆ operator=() [1/3]

template<typename ResT , typename KeyT >
ResourceT & castor::ResourceT< ResT, KeyT >::operator= ( ElementT && rhs)

◆ operator=() [2/3]

template<typename ResT , typename KeyT >
ResourceT & castor::ResourceT< ResT, KeyT >::operator= ( ResourceT< ResT, KeyT > && rhs)
defaultnoexcept

◆ operator=() [3/3]

template<typename ResT , typename KeyT >
ResourceT & castor::ResourceT< ResT, KeyT >::operator= ( ResourceT< ResT, KeyT > const & )
delete

◆ reinitialise()

template<typename ResT , typename KeyT >
template<typename ... ParametersT, typename ... ParametersU>
void castor::ResourceT< ResT, KeyT >::reinitialise ( ParametersT &&... paramsT,
ParametersU &&... paramsU )

Member Data Documentation

◆ onCleaned

template<typename ResT , typename KeyT >
OnResourceEvent castor::ResourceT< ResT, KeyT >::onCleaned

◆ onCleaning

template<typename ResT , typename KeyT >
OnResourceEvent castor::ResourceT< ResT, KeyT >::onCleaning

◆ onInitialised

template<typename ResT , typename KeyT >
OnResourceEvent castor::ResourceT< ResT, KeyT >::onInitialised

◆ onInitialising

template<typename ResT , typename KeyT >
OnResourceEvent castor::ResourceT< ResT, KeyT >::onInitialising

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