clan::NetGameEventValue Class Reference - ClanLib SDK
Description: clan::NetGameEventValue Class Reference

Public Types | Public Member Functions | Static Public Member Functions | List of all members
clan::NetGameEventValue Class Reference
clanNetwork NetGame

NetGameEventValue. More...

`#include <event_value.h>`

## Public Types
enum class | Type { null , integer , uinteger , character , ucharacter , string , boolean , number , complex , binary }

## Public Member Functions
| NetGameEventValue ()
| NetGameEventValue (bool value)
| Constructs a NetGameEventValue.
| NetGameEventValue (char value)
| Constructs a NetGameEventValue.
| NetGameEventValue (const char *str)
| Constructs a NetGameEventValue.
| NetGameEventValue (const DataBuffer &value)
| Constructs a NetGameEventValue.
| NetGameEventValue (const std::string &value)
| Constructs a NetGameEventValue.
| NetGameEventValue (const wchar_t *str)
| Constructs a NetGameEventValue.
| NetGameEventValue (float value)
| Constructs a NetGameEventValue.
| NetGameEventValue (int value)
| Constructs a NetGameEventValue.
| NetGameEventValue (Type type)
| Constructs a NetGameEventValue.
| NetGameEventValue (unsigned char value)
| Constructs a NetGameEventValue.
| NetGameEventValue (unsigned int value)
| Constructs a NetGameEventValue.
void | add_member (const NetGameEventValue &value)
| Add member.
DataBuffer | get_binary () const
| To binary.
bool | get_boolean () const
| To boolean.
int | get_character () const
| To character.
int | get_integer () const
| To integer.
const NetGameEventValue & | get_member (unsigned int index) const
unsigned int | get_member_count () const
float | get_number () const
| To number.
std::string | get_string () const
| To string.
Type | get_type () const
| Get Type.
unsigned int | get_ucharacter () const
| To unsigned character.
unsigned int | get_uinteger () const
| To unsigned integer.
bool | is_binary () const
| Is Binary.
bool | is_boolean () const
| Is Boolean.
bool | is_character () const
| Is Character.
bool | is_complex () const
| Is Complex.
bool | is_integer () const
| Is Integer.
bool | is_null () const
| Is Null.
bool | is_number () const
| Is Number.
bool | is_string () const
| Is String.
bool | is_ucharacter () const
| Is Ucharacter.
bool | is_uinteger () const
| Is Uinteger.
| operator bool () const
| operator DataBuffer () const
| operator float () const
| operator int () const
| operator std::string () const
| operator unsigned char () const
| operator unsigned int () const
void | set_member (unsigned int index, const NetGameEventValue &value)
| Set member.

## Static Public Member Functions
static std::string | to_string (const NetGameEventValue &)
| Helper function to obtain a string representation of an EventValue object.

## Detailed Description

NetGameEventValue.

## Member Enumeration Documentation

## ◆ Type

enum class clan::NetGameEventValue::Type
| strong

Enumerator
null |
integer |
uinteger |
character |
ucharacter |
string |
boolean |
number |
complex |
binary |

## Constructor & Destructor Documentation

## ◆ NetGameEventValue() [1/12]

clan::NetGameEventValue::NetGameEventValue | ( |  | ) |

Referenced by add_member(), get_member(), set_member(), and to_string().

## ◆ NetGameEventValue() [2/12]

clan::NetGameEventValue::NetGameEventValue | ( | int | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = value

## ◆ NetGameEventValue() [3/12]

clan::NetGameEventValue::NetGameEventValue | ( | unsigned int | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = value

## ◆ NetGameEventValue() [4/12]

clan::NetGameEventValue::NetGameEventValue | ( | char | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = value

## ◆ NetGameEventValue() [5/12]

clan::NetGameEventValue::NetGameEventValue | ( | unsigned char | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = value

## ◆ NetGameEventValue() [6/12]

clan::NetGameEventValue::NetGameEventValue | ( | float | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = value

## ◆ NetGameEventValue() [7/12]

clan::NetGameEventValue::NetGameEventValue | ( | const std::string & | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = String

## ◆ NetGameEventValue() [8/12]

clan::NetGameEventValue::NetGameEventValue | ( | const char * | str | ) |

Constructs a NetGameEventValue.

Parameters

  str | = char

## ◆ NetGameEventValue() [9/12]

clan::NetGameEventValue::NetGameEventValue | ( | const wchar_t * | str | ) |

Constructs a NetGameEventValue.

Parameters

  str | = wchar_t

## ◆ NetGameEventValue() [10/12]

clan::NetGameEventValue::NetGameEventValue | ( | bool | value | ) |
| explicit

Constructs a NetGameEventValue.

Parameters

  value | = bool

## ◆ NetGameEventValue() [11/12]

clan::NetGameEventValue::NetGameEventValue | ( | const DataBuffer & | value | ) |

Constructs a NetGameEventValue.

Parameters

  value | = DataBuffer

## ◆ NetGameEventValue() [12/12]

clan::NetGameEventValue::NetGameEventValue | ( | Type | type | ) |

Constructs a NetGameEventValue.

Parameters

  type | = Type

## Member Function Documentation

## ◆ add_member()

void clan::NetGameEventValue::add_member | ( | const NetGameEventValue & | value | ) |

Add member.

Parameters

  value | = Net Game Event Value

References NetGameEventValue().

## ◆ get_binary()

DataBuffer clan::NetGameEventValue::get_binary | ( |  | ) | const

To binary.

Returns
  binary

Referenced by operator DataBuffer().

## ◆ get_boolean()

bool clan::NetGameEventValue::get_boolean | ( |  | ) | const

To boolean.

Returns
  bool

Referenced by operator bool().

## ◆ get_character()

int clan::NetGameEventValue::get_character | ( |  | ) | const

To character.

Returns
  char

## ◆ get_integer()

int clan::NetGameEventValue::get_integer | ( |  | ) | const

To integer.

Returns
  int

Referenced by operator int().

## ◆ get_member()

const NetGameEventValue & clan::NetGameEventValue::get_member | ( | unsigned int | index | ) | const

References NetGameEventValue().

## ◆ get_member_count()

unsigned int clan::NetGameEventValue::get_member_count | ( |  | ) | const

## ◆ get_number()

float clan::NetGameEventValue::get_number | ( |  | ) | const

To number.

Returns
  float

Referenced by operator float().

## ◆ get_string()

std::string clan::NetGameEventValue::get_string | ( |  | ) | const

To string.

Returns
  String

Referenced by operator std::string().

## ◆ get_type()

Type clan::NetGameEventValue::get_type | ( |  | ) | const

Get Type.

Returns
  type

## ◆ get_ucharacter()

unsigned int clan::NetGameEventValue::get_ucharacter | ( |  | ) | const

To unsigned character.

Returns
  unsigned char

Referenced by operator unsigned char().

## ◆ get_uinteger()

unsigned int clan::NetGameEventValue::get_uinteger | ( |  | ) | const

To unsigned integer.

Returns
  unsigned int

Referenced by operator unsigned int().

## ◆ is_binary()

bool clan::NetGameEventValue::is_binary | ( |  | ) | const

Is Binary.

Returns
  true = binary

## ◆ is_boolean()

bool clan::NetGameEventValue::is_boolean | ( |  | ) | const

Is Boolean.

Returns
  true = boolean

## ◆ is_character()

bool clan::NetGameEventValue::is_character | ( |  | ) | const

Is Character.

Returns
  true = character

## ◆ is_complex()

bool clan::NetGameEventValue::is_complex | ( |  | ) | const

Is Complex.

Returns
  true = complex

## ◆ is_integer()

bool clan::NetGameEventValue::is_integer | ( |  | ) | const

Is Integer.

Returns
  true = integer

## ◆ is_null()

bool clan::NetGameEventValue::is_null | ( |  | ) | const

Is Null.

Returns
  true = null

## ◆ is_number()

bool clan::NetGameEventValue::is_number | ( |  | ) | const

Is Number.

Returns
  true = number

## ◆ is_string()

bool clan::NetGameEventValue::is_string | ( |  | ) | const

Is String.

Returns
  true = string

## ◆ is_ucharacter()

bool clan::NetGameEventValue::is_ucharacter | ( |  | ) | const

Is Ucharacter.

Returns
  true = ucharacter

## ◆ is_uinteger()

bool clan::NetGameEventValue::is_uinteger | ( |  | ) | const

Is Uinteger.

Returns
  true = uinteger

## ◆ operator bool()

clan::NetGameEventValue::operator bool | ( |  | ) | const
| inline

References get_boolean().

## ◆ operator DataBuffer()

clan::NetGameEventValue::operator DataBuffer | ( |  | ) | const
| inline

References get_binary().

## ◆ operator float()

clan::NetGameEventValue::operator float | ( |  | ) | const
| inline

References get_number().

## ◆ operator int()

clan::NetGameEventValue::operator int | ( |  | ) | const
| inline

References get_integer().

## ◆ operator std::string()

clan::NetGameEventValue::operator std::string | ( |  | ) | const
| inline

References get_string().

## ◆ operator unsigned char()

clan::NetGameEventValue::operator unsigned char | ( |  | ) | const
| inline

References get_ucharacter().

## ◆ operator unsigned int()

clan::NetGameEventValue::operator unsigned int | ( |  | ) | const
| inline

References get_uinteger().

## ◆ set_member()

void clan::NetGameEventValue::set_member | ( | unsigned int | index,
|  | const NetGameEventValue & | value )

Set member.

Parameters

  index | = value
  value | = Net Game Event Value

References NetGameEventValue().

## ◆ to_string()

std::string clan::NetGameEventValue::to_string | ( | const NetGameEventValue & |  | ) |
| static

Helper function to obtain a string representation of an EventValue object.

References NetGameEventValue().

## Member Data Documentation

## ◆ value_bool

bool clan::NetGameEventValue::value_bool

## ◆ value_char

char clan::NetGameEventValue::value_char

## ◆ value_float

float clan::NetGameEventValue::value_float

## ◆ value_int

int clan::NetGameEventValue::value_int

## ◆ value_uchar

unsigned char clan::NetGameEventValue::value_uchar

## ◆ value_uint

unsigned int clan::NetGameEventValue::value_uint

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

- event_value.h