GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members
gd::SerializerValue Class Reference

A value stored inside a gd::SerializerElement. More...

#include <SerializerValue.h>

Public Member Functions

 SerializerValue (bool val)
 
 SerializerValue (const gd::String &val)
 
 SerializerValue (int val)
 
 SerializerValue (double val)
 
void SetBool (bool val)
 
void SetString (const gd::String &val)
 
void SetInt (int val)
 
void SetDouble (double val)
 
void Set (const gd::String &val)
 
bool GetBool () const
 
gd::String GetString () const
 
const gd::StringGetRawString () const
 
int GetInt () const
 
double GetDouble () const
 
bool IsBoolean () const
 Return true if the value is a boolean.
 
bool IsString () const
 Return true if the value is a string.
 
bool IsInt () const
 Return true if the value is an int.
 
bool IsDouble () const
 Return true if the value is a double.
 

Detailed Description

A value stored inside a gd::SerializerElement.

See also
gd::Serializer
gd::SerializerElement

Member Function Documentation

◆ GetBool()

bool gd::SerializerValue::GetBool ( ) const

Get the value, its type being a boolean.

◆ GetDouble()

double gd::SerializerValue::GetDouble ( ) const

Get the value, its type being a double

◆ GetInt()

int gd::SerializerValue::GetInt ( ) const

Get the value, its type being an int.

◆ GetRawString()

const gd::String& gd::SerializerValue::GetRawString ( ) const
inline

Get the string value, without attempting any conversion. Make sure to check that IsString is true beforehand.

◆ GetString()

gd::String gd::SerializerValue::GetString ( ) const

Get the value, its type being a gd::String.

◆ Set()

void gd::SerializerValue::Set ( const gd::String val)

Set the value, its type being unknown, but representable as a string.

◆ SetBool()

void gd::SerializerValue::SetBool ( bool  val)

Set the value, its type being a boolean.

◆ SetDouble()

void gd::SerializerValue::SetDouble ( double  val)

Set the value, its type being a double.

◆ SetInt()

void gd::SerializerValue::SetInt ( int  val)

Set the value, its type being an integer.

◆ SetString()

void gd::SerializerValue::SetString ( const gd::String val)

Set the value, its type being a gd::String.


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