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

#include <SdlField.h>

Inheritance diagram for ph::SdlField:
ph::TSdlOwnedField< OuterType > ph::TSdlOwnedField< InnerType > ph::TSdlOwnedField< Owner > ph::TSdlNestedField< OuterType, InnerType > ph::TSdlAbstractValue< bool, Owner > ph::TSdlAbstractValue< EnumType, Owner > ph::TSdlAbstractValue< integer, Owner > ph::TSdlAbstractValue< Path, Owner > ph::TSdlAbstractValue< math::TQuaternion< real >, Owner > ph::TSdlAbstractValue< real, Owner > ph::TSdlAbstractValue< std::vector< real >, Owner > ph::TSdlAbstractValue< ResourceIdentifier, Owner > ph::TSdlAbstractValue< math::Spectrum, Owner > ph::TSdlAbstractValue< std::string, Owner > ph::TSdlAbstractValue< math::TVector2< Element >, Owner > ph::TSdlAbstractValue< math::TVector3< real >, Owner > ph::TSdlAbstractValue< math::TVector4< real >, Owner > ph::TSdlAbstractValue< T, Owner > ph::TSdlReference< T, Owner > ph::TSdlReferenceArray< T, Owner > ph::TSdlStructArray< Struct, Owner >

Public Member Functions

 SdlField (std::string typeName, std::string fieldName)
 
 SdlField (std::string typeName, std::string fieldName, std::string typeSignature)
 
virtual ~SdlField ()
 
virtual SdlNativeData nativeData (SdlNonConstInstance instance) const =0
 Direct access to the field memory of a SDL instance. Note that this field may not necessarily be bound to a SDL resource type (e.g., may bound to any function parameter structs). Empty native data info will be returned in cases where this field is not owned by (or being part of) the input instance. Obtaining native data requires the input instance be valid during this call and any further usages of the returned native data.
 
std::string genPrettyName () const
 
std::string_view getTypeName () const
 
std::string_view getFieldName () const
 
std::string_view getDescription () const
 
std::string_view getTypeSignature () const
 
EFieldImportance getImportance () const
 
bool isFallbackEnabled () const
 Whether the field want to use built-in mechanism to handle I/O problems. An example of this is default field value. With fallback enabled, the field may set itself to the default value supplied (if available) on error. By default, fallback is enabled.
 

Protected Member Functions

SdlFieldsetDescription (std::string descriptionStr)
 
SdlFieldsetImportance (EFieldImportance importance)
 Sets the importance of the field. Different importance affect the underlying policy used during the import and export of the field, e.g., whether warnings are emitted.
 
SdlFieldsetEnableFallback (bool isFallbackEnabled)
 

Constructor & Destructor Documentation

◆ SdlField() [1/2]

ph::SdlField::SdlField ( std::string typeName,
std::string fieldName )

◆ SdlField() [2/2]

ph::SdlField::SdlField ( std::string typeName,
std::string fieldName,
std::string typeSignature )

◆ ~SdlField()

ph::SdlField::~SdlField ( )
virtualdefault

Member Function Documentation

◆ genPrettyName()

std::string ph::SdlField::genPrettyName ( ) const

◆ getDescription()

std::string_view ph::SdlField::getDescription ( ) const
inline

◆ getFieldName()

std::string_view ph::SdlField::getFieldName ( ) const
inline

◆ getImportance()

EFieldImportance ph::SdlField::getImportance ( ) const
inline

◆ getTypeName()

std::string_view ph::SdlField::getTypeName ( ) const
inline

◆ getTypeSignature()

std::string_view ph::SdlField::getTypeSignature ( ) const
inline

◆ isFallbackEnabled()

bool ph::SdlField::isFallbackEnabled ( ) const
inline

Whether the field want to use built-in mechanism to handle I/O problems. An example of this is default field value. With fallback enabled, the field may set itself to the default value supplied (if available) on error. By default, fallback is enabled.

◆ nativeData()

virtual SdlNativeData ph::SdlField::nativeData ( SdlNonConstInstance instance) const
pure virtual

Direct access to the field memory of a SDL instance. Note that this field may not necessarily be bound to a SDL resource type (e.g., may bound to any function parameter structs). Empty native data info will be returned in cases where this field is not owned by (or being part of) the input instance. Obtaining native data requires the input instance be valid during this call and any further usages of the returned native data.

Implemented in ph::TSdlOwnedField< Owner >, ph::TSdlOwnedField< InnerType >, and ph::TSdlOwnedField< OuterType >.

◆ setDescription()

SdlField & ph::SdlField::setDescription ( std::string descriptionStr)
inlineprotected

◆ setEnableFallback()

SdlField & ph::SdlField::setEnableFallback ( bool isFallbackEnabled)
inlineprotected

◆ setImportance()

SdlField & ph::SdlField::setImportance ( EFieldImportance importance)
inlineprotected

Sets the importance of the field. Different importance affect the underlying policy used during the import and export of the field, e.g., whether warnings are emitted.


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