Photon Engine 2.0.0-beta
A physically based renderer.
|
#include <SdlClass.h>
Public Member Functions | |
SdlClass (ESdlTypeCategory category, const std::string &typeName) | |
virtual std::shared_ptr< ISdlResource > | createResource () const =0 |
virtual void | initResource (ISdlResource &resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const =0 |
Initialize a resource from value clauses. How the resource will be initialized depends on the resource class's SDL definition. | |
virtual void | initDefaultResource (ISdlResource &resource) const =0 |
Initialize a resource to default values. Default values are defined by the resource class's SDL definition. | |
virtual void | saveResource (const ISdlResource &resource, SdlOutputClauses &clauses, const SdlOutputContext &ctx) const =0 |
virtual void | call (std::string_view funcName, ISdlResource *resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const =0 |
virtual void | referencedResources (const ISdlResource *targetResource, std::vector< const ISdlResource * > &out_resources) const =0 |
Get all SDL resources referenced by targetResource . | |
virtual std::size_t | numFunctions () const =0 |
virtual const SdlFunction * | getFunction (std::size_t index) const =0 |
std::size_t | numFields () const override=0 |
const SdlField * | getField (std::size_t index) const override=0 |
std::string_view | getTypeName () const override |
std::string_view | getDescription () const override |
bool | isBlueprint () const |
Whether the class is for building other classes only. A blueprint class cannot be instantiated as a SDL resource. Note that blueprint class is semantically different to abstract class; nevertheless, they often are closely related. | |
bool | allowCreateFromClass () const |
Whether a resource can be created by calling createResource(). This attribute is useful to decide whether the resource need custom construction routines to create them. A true return value does not mean createResource() always return a valid resource, e.g., a blueprint class or some error occurs. | |
std::string | genPrettyName () const |
std::string | genCategoryName () const |
ESdlTypeCategory | getCategory () const |
std::string_view | getDocName () const |
const SdlClass * | getBase () const |
bool | isDerived () const |
bool | hasField () const |
bool | hasFunction () const |
Public Member Functions inherited from ph::ISdlInstantiable | |
virtual | ~ISdlInstantiable ()=default |
Protected Member Functions | |
SdlClass & | setDescription (std::string description) |
SdlClass & | setDocName (std::string docName) |
template<typename SdlResourceType > | |
SdlClass & | setBase () |
Set another SDL class as the base of this class. | |
SdlClass & | setIsBlueprint (bool isBlueprint) |
SdlClass & | setAllowCreateFromClass (bool allowCreateFromClass) |
ph::SdlClass::SdlClass | ( | ESdlTypeCategory | category, |
const std::string & | typeName ) |
|
inline |
Whether a resource can be created by calling createResource(). This attribute is useful to decide whether the resource need custom construction routines to create them. A true return value does not mean createResource() always return a valid resource, e.g., a blueprint class or some error occurs.
|
pure virtual |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
std::string ph::SdlClass::genCategoryName | ( | ) | const |
std::string ph::SdlClass::genPrettyName | ( | ) | const |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements ph::ISdlInstantiable.
|
inline |
|
overridepure virtual |
index
. index
must <= numFields()
. Implements ph::ISdlInstantiable.
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
inlineoverridevirtual |
Implements ph::ISdlInstantiable.
|
inline |
|
inline |
|
pure virtual |
Initialize a resource to default values. Default values are defined by the resource class's SDL definition.
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Initialize a resource from value clauses. How the resource will be initialized depends on the resource class's SDL definition.
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
inline |
Whether the class is for building other classes only. A blueprint class cannot be instantiated as a SDL resource. Note that blueprint class is semantically different to abstract class; nevertheless, they often are closely related.
|
inline |
|
overridepure virtual |
Implements ph::ISdlInstantiable.
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Get all SDL resources referenced by targetResource
.
targetResource | Resource instance in question. |
out_resources | SDL resources referenced by targetResource . Never contains null. Appends to existing ones. |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
pure virtual |
Implemented in ph::TSdlOwnerClass< Owner, FieldSet >.
|
protected |
|
inlineprotected |
Set another SDL class as the base of this class.
The effect of the base class depends on the implementation.
|
protected |
|
protected |
|
protected |