Photon Engine 2.0.0-beta
A physically based renderer.
|
SDL binding type for a canonical SDL method. More...
#include <TSdlMethod.h>
Public Types | |
using | OwnerType = MethodStruct |
Public Member Functions | |
TSdlMethod (std::string name) | |
void | call (ISdlResource *resource, SdlInputClauses &clauses, const SdlInputContext &ctx) const override |
std::size_t | numParams () const override |
const SdlField * | getParam (std::size_t index) const override |
void | callMethod (TargetType &targetType, SdlInputClauses &clauses, const SdlInputContext &ctx) const |
void | loadParameters (MethodStruct ¶meterStruct, SdlInputClauses &clauses, const SdlInputContext &ctx) const |
template<typename T > | |
TSdlMethod & | addParam (T sdlField) |
auto | description (std::string descriptionStr) -> TSdlMethod & |
template<typename T > | |
auto | addParam (T sdlField) -> TSdlMethod & |
Public Member Functions inherited from ph::SdlFunction | |
SdlFunction (std::string name) | |
std::size_t | numFields () const override |
const SdlField * | getField (std::size_t index) const override |
std::string_view | getTypeName () const override |
std::string_view | getDescription () const override |
std::string_view | getName () const |
std::string | genPrettyName () const |
Public Member Functions inherited from ph::ISdlInstantiable | |
virtual | ~ISdlInstantiable ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from ph::SdlFunction | |
SdlFunction & | setDescription (std::string description) |
SDL binding type for a canonical SDL method.
For a method to be callable in SDL, it must be defined as a C++ functor that takes an instance of TargetType
as its only input. Other arguments to the method should be accessed via the functor's member variables. Each member variables then can be binded much like the members of a canonical SDL resource.
MethodStruct | Type of the functor. |
TargetType | Type that defines the method. May be any C++ class/struct type including SDL resource types. |
using ph::TSdlMethod< MethodStruct, TargetType >::OwnerType = MethodStruct |
|
inlineexplicit |
TSdlMethod & ph::TSdlMethod< MethodStruct, TargetType >::addParam | ( | T | sdlField | ) |
|
inline |
|
inlineoverridevirtual |
Implements ph::SdlFunction.
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements ph::SdlFunction.
|
inline |
|
inlineoverridevirtual |
Implements ph::SdlFunction.