GigaPasjans
Loading...
Searching...
No Matches
Phosphorus::BaseEnumParameter Class Reference

Enum based parameter. Stored as 32bit signed integer. More...

#include <GameObject.h>

Inheritance diagram for Phosphorus::BaseEnumParameter:
Collaboration diagram for Phosphorus::BaseEnumParameter:

Public Member Functions

WideString GetBinding (int32 index) const
 Returns bound name for enum value.
 
int32 GetBindingCount () const
 Returns binding count.
 
- Public Member Functions inherited from Phosphorus::IParameter< int32 >
 IParameter (const String &name, const int32 &defaultValue)
 
void SetValue (const int32 &value)
 Sets value.
 
int32 GetValue () const
 Returns value.
 
void SetDisplayName (const String &name) override
 
String GetName () const override
 Returns parameter name.
 
String GetDisplayName () const override
 Returns parameter display name.
 

Protected Member Functions

 BaseEnumParameter (const String &name, int32 defaultValue)
 
int32 Write (nlohmann::json &target) const override
 Writes text representation of data to JSON object.
 
int32 Read (nlohmann::json &target) override
 Parses text representation of data from JSON object.
 

Protected Attributes

std::unordered_map< int32, WideStringm_Bindings
 Enum bindings.
 
- Protected Attributes inherited from Phosphorus::IParameter< int32 >
int32 m_Value
 
String m_Name
 
String m_DisplayName
 

Detailed Description

Enum based parameter. Stored as 32bit signed integer.

Member Function Documentation

◆ GetBinding()

WideString Phosphorus::BaseEnumParameter::GetBinding ( int32 index) const
inline

Returns bound name for enum value.

Parameters
indexEnum value index.
Returns
WideString Bound name.

◆ GetBindingCount()

int32 Phosphorus::BaseEnumParameter::GetBindingCount ( ) const
inline

Returns binding count.

Returns
int32 Binding counts

◆ Read()

int32 Phosphorus::BaseEnumParameter::Read ( nlohmann::json & target)
inlineoverrideprotectedvirtual

Parses text representation of data from JSON object.

Parameters
targetJSON object
Returns
int32 Bytes written

Implements Phosphorus::IBaseParameter.

◆ Write()

int32 Phosphorus::BaseEnumParameter::Write ( nlohmann::json & target) const
inlineoverrideprotectedvirtual

Writes text representation of data to JSON object.

Parameters
targetJSON object
Returns
int32 Bytes written

Implements Phosphorus::IBaseParameter.


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