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

View for a group of SDL references. More...

#include <ISdlReferenceGroup.h>

Inheritance diagram for ph::ISdlReferenceGroup:
ph::RawResourceCollection ph::SceneDescription

Public Member Functions

 PH_DEFINE_INLINE_RULE_OF_5_MEMBERS_NO_DTOR (ISdlReferenceGroup)
 
virtual ~ISdlReferenceGroup ()=default
 
virtual std::shared_ptr< ISdlResourceget (std::string_view resourceName) const =0
 Get a resource reference.
 
virtual bool has (std::string_view resourceName) const =0
 Check the existence of a resource reference.
 
template<typename T >
std::shared_ptr< T > getTyped (std::string_view resourceName) const
 Get a resource reference of type T with name resourceName.
 
template<typename T >
bool hasTyped (std::string_view resourceName) const
 Check the existence of resource of type T.
 

Detailed Description

View for a group of SDL references.

Constructor & Destructor Documentation

◆ ~ISdlReferenceGroup()

virtual ph::ISdlReferenceGroup::~ISdlReferenceGroup ( )
virtualdefault

Member Function Documentation

◆ get()

virtual std::shared_ptr< ISdlResource > ph::ISdlReferenceGroup::get ( std::string_view resourceName) const
pure virtual

Get a resource reference.

Parameters
resourceNameThe name of the resource.
Returns
The resource requested. nullptr if not found.

Implemented in ph::RawResourceCollection, and ph::SceneDescription.

◆ getTyped()

template<typename T >
std::shared_ptr< T > ph::ISdlReferenceGroup::getTyped ( std::string_view resourceName) const
inline

Get a resource reference of type T with name resourceName.

Returns
The resource requested. nullptr if not found.
Exceptions
SdlLoadErrorIf the requested resource is not of type T.

◆ has()

virtual bool ph::ISdlReferenceGroup::has ( std::string_view resourceName) const
pure virtual

Check the existence of a resource reference.

Parameters
resourceNameThe name of the resource.

Implemented in ph::RawResourceCollection, and ph::SceneDescription.

◆ hasTyped()

template<typename T >
bool ph::ISdlReferenceGroup::hasTyped ( std::string_view resourceName) const
inline

Check the existence of resource of type T.

◆ PH_DEFINE_INLINE_RULE_OF_5_MEMBERS_NO_DTOR()

ph::ISdlReferenceGroup::PH_DEFINE_INLINE_RULE_OF_5_MEMBERS_NO_DTOR ( ISdlReferenceGroup )

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