Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Olympe::PropertyValue Struct Reference

Discriminated union of property value types (String / Float). More...

#include <UndoRedoStack.h>

Public Types

enum class  Kind { String , Float , Int }
 

Public Member Functions

 PropertyValue ()
 

Static Public Member Functions

static PropertyValue FromString (const std::string &s)
 
static PropertyValue FromFloat (float f)
 
static PropertyValue FromInt (int i)
 

Public Attributes

enum Olympe::PropertyValue::Kind kind
 
std::string strVal
 
float floatVal
 
int intVal
 

Detailed Description

Discriminated union of property value types (String / Float).

C++14 compliant — no std::variant, no std::optional.

Definition at line 187 of file UndoRedoStack.h.

Member Enumeration Documentation

◆ Kind

Enumerator
String 
Float 
Int 

Definition at line 188 of file UndoRedoStack.h.

Constructor & Destructor Documentation

◆ PropertyValue()

Olympe::PropertyValue::PropertyValue ( )
inline

Definition at line 193 of file UndoRedoStack.h.

Member Function Documentation

◆ FromFloat()

static PropertyValue Olympe::PropertyValue::FromFloat ( float  f)
inlinestatic

Definition at line 200 of file UndoRedoStack.h.

References Float, GetComponentTypeID_Static(), and kind.

+ Here is the call graph for this function:

◆ FromInt()

static PropertyValue Olympe::PropertyValue::FromInt ( int  i)
inlinestatic

Definition at line 205 of file UndoRedoStack.h.

References GetComponentTypeID_Static(), Int, and kind.

+ Here is the call graph for this function:

◆ FromString()

static PropertyValue Olympe::PropertyValue::FromString ( const std::string &  s)
inlinestatic

Definition at line 195 of file UndoRedoStack.h.

References GetComponentTypeID_Static(), kind, and String.

Referenced by Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent(), and Olympe::VisualScriptEditorPanel::RenderSwitchNodeProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ floatVal

float Olympe::PropertyValue::floatVal

Definition at line 190 of file UndoRedoStack.h.

Referenced by Olympe::EditNodePropertyCommand::ApplyValue().

◆ intVal

int Olympe::PropertyValue::intVal

Definition at line 191 of file UndoRedoStack.h.

◆ kind

enum Olympe::PropertyValue::Kind Olympe::PropertyValue::kind

Referenced by FromFloat(), FromInt(), and FromString().

◆ strVal

std::string Olympe::PropertyValue::strVal

Definition at line 189 of file UndoRedoStack.h.

Referenced by Olympe::EditNodePropertyCommand::ApplyValue().


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