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

Interface for all SDL resource. More...

#include <ISdlResource.h>

Inheritance diagram for ph::ISdlResource:
ph::SdlResourceBase ph::TSdlResourceBase< ESdlTypeCategory::Ref_Actor > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Geometry > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Image > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Material > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Motion > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Object > ph::TSdlResourceBase< ESdlTypeCategory::Ref_Option > ph::CoreSdlResource ph::TSdlResourceBase< TYPE_CATEGORY >

Public Member Functions

 ISdlResource (const ISdlResource &other)=default
 
 ISdlResource (ISdlResource &&other)=default
 
virtual ~ISdlResource ()=default
 
ISdlResourceoperator= (const ISdlResource &rhs)=default
 
ISdlResourceoperator= (ISdlResource &&rhs)=default
 
virtual ESdlTypeCategory getDynamicCategory () const =0
 
virtual SdlResourceId getId () const =0
 Get the unique ID of this resource. The returned ID is guaranteed to be unique in the current process. Newly created resource cannot have an ID that has been used by a previous resource, even if the previous resource has ended its life cycle. See SdlResourceId.h for some utilities.
 
virtual const SdlClassgetDynamicSdlClass () const
 Get runtime SDL class of the resource.
 
virtual bool isInlinable () const
 

Protected Member Functions

 ISdlResource ()=default
 

Detailed Description

Interface for all SDL resource.

A SDL resource is data that can be managed by SDL and actor system.

Note that in addition to the pure virtual methods, implementation should add a static ESdlTypeCategory field named CATEGORY and assign a proper category to it. This will facilitate static resource category inspection and is required for some introspection classes. However, these normally will not need to be done since the helper base classes for each category already did it.

Constructor & Destructor Documentation

◆ ISdlResource() [1/3]

ph::ISdlResource::ISdlResource ( )
inlineprotecteddefault

◆ ISdlResource() [2/3]

ph::ISdlResource::ISdlResource ( const ISdlResource & other)
inlinedefault

◆ ISdlResource() [3/3]

ph::ISdlResource::ISdlResource ( ISdlResource && other)
inlinedefault

◆ ~ISdlResource()

virtual ph::ISdlResource::~ISdlResource ( )
inlinevirtualdefault

Member Function Documentation

◆ getDynamicCategory()

◆ getDynamicSdlClass()

const SdlClass * ph::ISdlResource::getDynamicSdlClass ( ) const
inlinevirtual

Get runtime SDL class of the resource.

Returns
Pointer to the runtime SDL class. nullptr if PH_DEFINE_SDL_CLASS() is not implemented by the resource class.

◆ getId()

virtual SdlResourceId ph::ISdlResource::getId ( ) const
pure virtual

Get the unique ID of this resource. The returned ID is guaranteed to be unique in the current process. Newly created resource cannot have an ID that has been used by a previous resource, even if the previous resource has ended its life cycle. See SdlResourceId.h for some utilities.

Implemented in ph::SdlResourceBase.

◆ isInlinable()

bool ph::ISdlResource::isInlinable ( ) const
inlinevirtual

◆ operator=() [1/2]

ISdlResource & ph::ISdlResource::operator= ( const ISdlResource & rhs)
inlinedefault

◆ operator=() [2/2]

ISdlResource & ph::ISdlResource::operator= ( ISdlResource && rhs)
inlinedefault

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