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

Public Member Functions | List of all members
clan::NetGameEvent Class Reference
clanNetwork NetGame

NetGameEvent. More...

`#include <event.h>`

## Public Member Functions
| NetGameEvent (const std::string &name, std::vector< NetGameEventValue > arg={})
| Constructs a NetGameEvent.
void | add_argument (const NetGameEventValue &value)
NetGameEventValue | get_argument (unsigned int index) const
unsigned int | get_argument_count () const
std::string | get_name () const
std::string | to_string () const

## Detailed Description

NetGameEvent.

## Constructor & Destructor Documentation

## ◆ NetGameEvent()

clan::NetGameEvent::NetGameEvent | ( | const std::string & | name,
|  | std::vector< NetGameEventValue > | arg = {} )

Constructs a NetGameEvent.

## Member Function Documentation

## ◆ add_argument()

void clan::NetGameEvent::add_argument | ( | const NetGameEventValue & | value | ) |

Adds an argument into this event.

Parameters

  value | The argument to store inside this event.

## ◆ get_argument()

NetGameEventValue clan::NetGameEvent::get_argument | ( | unsigned int | index | ) | const

Retrieves an argument in this event.

Parameters

  index | Index number of the argument to retrieve.

Returns
  A NetGameEventValue object containing the argument value.

## ◆ get_argument_count()

unsigned int clan::NetGameEvent::get_argument_count | ( |  | ) | const

Returns
  The number of arguments stored in this event.

## ◆ get_name()

std::string clan::NetGameEvent::get_name | ( |  | ) | const
| inline

Returns
  The name of this event.

Referenced by clan::NetGameEventDispatcher< Params >::dispatch().

## ◆ to_string()

std::string clan::NetGameEvent::to_string | ( |  | ) | const

Returns
  A string representation of this event, including all of its arguments.

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

- Network/NetGame/event.h