clanNetwork NetGame

Classes

class  clan::NetGameClient
 NetGameClient. More...
 
class  clan::NetGameConnection
 NetGameConnection. More...
 
class  clan::NetGameConnectionSite
 NetGameConnectionSite. More...
 
class  clan::NetGameEvent
 NetGameEvent. More...
 
class  clan::NetGameEventDispatcher_v0
 NetGameEventDispatcher_v0. More...
 
class  clan::NetGameEventDispatcher_v1< ContextParam >
 NetGameEventDispatcher_v1. More...
 
class  clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >
 NetGameEventDispatcher_v2. More...
 
class  clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >
 NetGameEventDispatcher_v3. More...
 
class  clan::NetGameEventValue
 NetGameEventValue. More...
 
class  clan::NetGameServer
 NetGameServer. More...
 

Typedefs

typedef Callback_v1< const
NetGameEvent & > 
clan::NetGameEventDispatcher_v0::CallbackClass
 
typedef Callback_v4< const
NetGameEvent &, ContextParam1,
ContextParam2, ContextParam3 > 
clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::CallbackClass
 
typedef Callback_v3< const
NetGameEvent &, ContextParam1,
ContextParam2 > 
clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::CallbackClass
 
typedef Callback_v2< const
NetGameEvent &, ContextParam > 
clan::NetGameEventDispatcher_v1< ContextParam >::CallbackClass
 

Enumerations

enum  clan::NetGameEventValue::Type {
  clan::NetGameEventValue::null, clan::NetGameEventValue::integer, clan::NetGameEventValue::uinteger, clan::NetGameEventValue::character,
  clan::NetGameEventValue::ucharacter, clan::NetGameEventValue::string, clan::NetGameEventValue::boolean, clan::NetGameEventValue::number,
  clan::NetGameEventValue::complex, clan::NetGameEventValue::binary
}
 

Functions

 clan::NetGameClient::NetGameClient ()
 
 clan::NetGameConnection::NetGameConnection (NetGameConnectionSite *site, const TCPConnection &connection)
 Constructs a NetGameConnection. More...
 
 clan::NetGameConnection::NetGameConnection (NetGameConnectionSite *site, const SocketName &socket_name)
 
 clan::NetGameEvent::NetGameEvent (const std::string &name)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEvent::NetGameEvent (const std::string &name, const NetGameEventValue &arg1)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEvent::NetGameEvent (const std::string &name, const NetGameEventValue &arg1, const NetGameEventValue &arg2)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEvent::NetGameEvent (const std::string &name, const NetGameEventValue &arg1, const NetGameEventValue &arg2, const NetGameEventValue &arg3)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEvent::NetGameEvent (const std::string &name, const NetGameEventValue &arg1, const NetGameEventValue &arg2, const NetGameEventValue &arg3, const NetGameEventValue &arg4)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEvent::NetGameEvent (const std::string &name, const NetGameEventValue &arg1, const NetGameEventValue &arg2, const NetGameEventValue &arg3, const NetGameEventValue &arg4, const NetGameEventValue &arg5)
 Constructs a NetGameEvent. More...
 
 clan::NetGameEventValue::NetGameEventValue ()
 
 clan::NetGameEventValue::NetGameEventValue (int value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (unsigned int value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (char value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (unsigned char value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (float value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (const std::string &value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (const char *str)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (const wchar_t *str)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (bool value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (const DataBuffer &value)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameEventValue::NetGameEventValue (Type type)
 Constructs a NetGameEventValue. More...
 
 clan::NetGameServer::NetGameServer ()
 
 clan::NetGameClient::~NetGameClient ()
 
 clan::NetGameConnection::~NetGameConnection ()
 
 clan::NetGameServer::~NetGameServer ()
 
void clan::NetGameEvent::add_argument (const NetGameEventValue &value)
 Add argument. More...
 
void clan::NetGameEventValue::add_member (const NetGameEventValue &value)
 Add member. More...
 
virtual void clan::NetGameConnectionSite::add_network_event (const NetGameNetworkEvent &e)=0
 Add network event. More...
 
void clan::NetGameClient::connect (const std::string &server, const std::string &port)
 Connect. More...
 
void clan::NetGameClient::disconnect ()
 Disconnect. More...
 
void clan::NetGameConnection::disconnect ()
 Disconnects a client. More...
 
bool clan::NetGameEventDispatcher_v0::dispatch (const NetGameEvent &game_event)
 Dispatch. More...
 
bool clan::NetGameEventDispatcher_v1< ContextParam >::dispatch (const NetGameEvent &game_event, ContextParam context)
 Dispatch. More...
 
bool clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::dispatch (const NetGameEvent &game_event, ContextParam1 context1, ContextParam2 context2)
 Dispatch. More...
 
bool clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::dispatch (const NetGameEvent &game_event, ContextParam1 context1, ContextParam2 context2, ContextParam3 context3)
 Dispatch. More...
 
CallbackClass & clan::NetGameEventDispatcher_v0::func_event (const std::string &name)
 
CallbackClass & clan::NetGameEventDispatcher_v1< ContextParam >::func_event (const std::string &name)
 
CallbackClass & clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::func_event (const std::string &name)
 
CallbackClass & clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::func_event (const std::string &name)
 
NetGameEventValue clan::NetGameEvent::get_argument (unsigned int index) const
 Get argument. More...
 
unsigned int clan::NetGameEvent::get_argument_count () const
 
void * clan::NetGameConnection::get_data (const std::string &name) const
 Get data. More...
 
const NetGameEventValue & clan::NetGameEventValue::get_member (unsigned int index) const
 
unsigned int clan::NetGameEventValue::get_member_count () const
 
std::string clan::NetGameEvent::get_name () const
 Get Name. More...
 
SocketName clan::NetGameConnection::get_remote_name () const
 Get Remote name. More...
 
Type clan::NetGameEventValue::get_type () const
 Get Type. More...
 
bool clan::NetGameEventValue::is_binary () const
 Is Binary. More...
 
bool clan::NetGameEventValue::is_boolean () const
 Is Boolean. More...
 
bool clan::NetGameEventValue::is_character () const
 Is Character. More...
 
bool clan::NetGameEventValue::is_complex () const
 Is Complex. More...
 
bool clan::NetGameEventValue::is_integer () const
 Is Integer. More...
 
bool clan::NetGameEventValue::is_null () const
 Is Null. More...
 
bool clan::NetGameEventValue::is_number () const
 Is Number. More...
 
bool clan::NetGameEventValue::is_string () const
 Is String. More...
 
bool clan::NetGameEventValue::is_ucharacter () const
 Is Ucharacter. More...
 
bool clan::NetGameEventValue::is_uinteger () const
 Is Uinteger. More...
 
 clan::NetGameEventValue::operator bool () const
 
 clan::NetGameEventValue::operator DataBuffer () const
 
 clan::NetGameEventValue::operator float () const
 
 clan::NetGameEventValue::operator int () const
 
 clan::NetGameEventValue::operator std::string () const
 
 clan::NetGameEventValue::operator unsigned char () const
 
 clan::NetGameEventValue::operator unsigned int () const
 
void clan::NetGameClient::process_events ()
 Process events. More...
 
void clan::NetGameServer::process_events ()
 Process events. More...
 
void clan::NetGameClient::send_event (const NetGameEvent &game_event)
 Send event. More...
 
void clan::NetGameServer::send_event (const NetGameEvent &game_event)
 Send event. More...
 
void clan::NetGameConnection::send_event (const NetGameEvent &game_event)
 Send event. More...
 
void clan::NetGameConnection::set_data (const std::string &name, void *data)
 Set data. More...
 
void clan::NetGameEventValue::set_member (unsigned int index, const NetGameEventValue &value)
 Set member. More...
 
Signal_v1< NetGameConnection * > & clan::NetGameServer::sig_client_connected ()
 
Signal_v2< NetGameConnection
*, const std::string & > & 
clan::NetGameServer::sig_client_disconnected ()
 
Signal_v0 & clan::NetGameClient::sig_connected ()
 Sig connected. More...
 
Signal_v0 & clan::NetGameClient::sig_disconnected ()
 Sig disconnected. More...
 
Signal_v1< const NetGameEvent & > & clan::NetGameClient::sig_event_received ()
 
Signal_v2< NetGameConnection
*, const NetGameEvent & > & 
clan::NetGameServer::sig_event_received ()
 
void clan::NetGameServer::start (const std::string &port)
 Start. More...
 
void clan::NetGameServer::start (const std::string &address, const std::string &port)
 Start. More...
 
void clan::NetGameServer::stop ()
 Stop. More...
 
DataBuffer clan::NetGameEventValue::to_binary () const
 To binary. More...
 
bool clan::NetGameEventValue::to_boolean () const
 To boolean. More...
 
int clan::NetGameEventValue::to_character () const
 To character. More...
 
int clan::NetGameEventValue::to_integer () const
 To integer. More...
 
float clan::NetGameEventValue::to_number () const
 To number. More...
 
std::string clan::NetGameEvent::to_string () const
 To string. More...
 
std::string clan::NetGameEventValue::to_string () const
 To string. More...
 
unsigned int clan::NetGameEventValue::to_ucharacter () const
 To unsigned character. More...
 
unsigned int clan::NetGameEventValue::to_uinteger () const
 To unsigned integer. More...
 

Variables

bool   clan::NetGameEventValue::value_bool
 
char   clan::NetGameEventValue::value_char
 
float   clan::NetGameEventValue::value_float
 
int   clan::NetGameEventValue::value_int
 
unsigned char   clan::NetGameEventValue::value_uchar
 
unsigned int   clan::NetGameEventValue::value_uint
 

Detailed Description

Typedef Documentation

typedef Callback_v1<const NetGameEvent &> clan::NetGameEventDispatcher_v0::CallbackClass
template<typename ContextParam1 , typename ContextParam2 , typename ContextParam3 >
typedef Callback_v4<const NetGameEvent &, ContextParam1, ContextParam2, ContextParam3> clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::CallbackClass
template<typename ContextParam1 , typename ContextParam2 >
typedef Callback_v3<const NetGameEvent &, ContextParam1, ContextParam2> clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::CallbackClass
template<typename ContextParam>
typedef Callback_v2<const NetGameEvent &, ContextParam> clan::NetGameEventDispatcher_v1< ContextParam >::CallbackClass

Enumeration Type Documentation

Enumerator
null 
integer 
uinteger 
character 
ucharacter 
string 
boolean 
number 
complex 
binary 

Function Documentation

clan::NetGameClient::NetGameClient ( )
clan::NetGameConnection::NetGameConnection ( NetGameConnectionSite site,
const TCPConnection connection 
)

Constructs a NetGameConnection.

Parameters
site= Net Game Connection Site
connection= TCPConnection
clan::NetGameConnection::NetGameConnection ( NetGameConnectionSite site,
const SocketName socket_name 
)
clan::NetGameEvent::NetGameEvent ( const std::string &  name)

Constructs a NetGameEvent.

Parameters
name= String
clan::NetGameEvent::NetGameEvent ( const std::string &  name,
const NetGameEventValue arg1 
)

Constructs a NetGameEvent.

Parameters
name= String
arg1= Net Game Event Value
clan::NetGameEvent::NetGameEvent ( const std::string &  name,
const NetGameEventValue arg1,
const NetGameEventValue arg2 
)

Constructs a NetGameEvent.

Parameters
name= String
arg1= Net Game Event Value
arg2= Net Game Event Value
clan::NetGameEvent::NetGameEvent ( const std::string &  name,
const NetGameEventValue arg1,
const NetGameEventValue arg2,
const NetGameEventValue arg3 
)

Constructs a NetGameEvent.

Parameters
name= String
arg1= Net Game Event Value
arg2= Net Game Event Value
arg3= Net Game Event Value
clan::NetGameEvent::NetGameEvent ( const std::string &  name,
const NetGameEventValue arg1,
const NetGameEventValue arg2,
const NetGameEventValue arg3,
const NetGameEventValue arg4 
)

Constructs a NetGameEvent.

Parameters
name= String
arg1= Net Game Event Value
arg2= Net Game Event Value
arg3= Net Game Event Value
arg4= Net Game Event Value
clan::NetGameEvent::NetGameEvent ( const std::string &  name,
const NetGameEventValue arg1,
const NetGameEventValue arg2,
const NetGameEventValue arg3,
const NetGameEventValue arg4,
const NetGameEventValue arg5 
)

Constructs a NetGameEvent.

Parameters
name= String
arg1= Net Game Event Value
arg2= Net Game Event Value
arg3= Net Game Event Value
arg4= Net Game Event Value
arg5= Net Game Event Value
clan::NetGameEventValue::NetGameEventValue ( )
clan::NetGameEventValue::NetGameEventValue ( int  value)

Constructs a NetGameEventValue.

Parameters
value= value
clan::NetGameEventValue::NetGameEventValue ( unsigned int  value)

Constructs a NetGameEventValue.

Parameters
value= value
clan::NetGameEventValue::NetGameEventValue ( char  value)

Constructs a NetGameEventValue.

Parameters
value= value
clan::NetGameEventValue::NetGameEventValue ( unsigned char  value)

Constructs a NetGameEventValue.

Parameters
value= value
clan::NetGameEventValue::NetGameEventValue ( float  value)

Constructs a NetGameEventValue.

Parameters
value= value
clan::NetGameEventValue::NetGameEventValue ( const std::string &  value)

Constructs a NetGameEventValue.

Parameters
value= String
clan::NetGameEventValue::NetGameEventValue ( const char *  str)

Constructs a NetGameEventValue.

Parameters
str= char
clan::NetGameEventValue::NetGameEventValue ( const wchar_t *  str)

Constructs a NetGameEventValue.

Parameters
str= wchar_t
clan::NetGameEventValue::NetGameEventValue ( bool  value)
explicit

Constructs a NetGameEventValue.

Parameters
value= bool
clan::NetGameEventValue::NetGameEventValue ( const DataBuffer value)

Constructs a NetGameEventValue.

Parameters
value= DataBuffer
clan::NetGameEventValue::NetGameEventValue ( Type  type)

Constructs a NetGameEventValue.

Parameters
type= Type
clan::NetGameServer::NetGameServer ( )
clan::NetGameClient::~NetGameClient ( )
clan::NetGameConnection::~NetGameConnection ( )
clan::NetGameServer::~NetGameServer ( )
void clan::NetGameEvent::add_argument ( const NetGameEventValue value)

Add argument.

Parameters
value= Net Game Event Value
void clan::NetGameEventValue::add_member ( const NetGameEventValue value)

Add member.

Parameters
value= Net Game Event Value
virtual void clan::NetGameConnectionSite::add_network_event ( const NetGameNetworkEvent &  e)
pure virtual

Add network event.

Parameters
e= Net Game Network Event
void clan::NetGameClient::connect ( const std::string &  server,
const std::string &  port 
)

Connect.

Parameters
server= String
port= String
void clan::NetGameClient::disconnect ( )

Disconnect.

void clan::NetGameConnection::disconnect ( )

Disconnects a client.

bool clan::NetGameEventDispatcher_v0::dispatch ( const NetGameEvent game_event)
inline

Dispatch.

Parameters
game_event= Net Game Event
Returns
bool

References clan::NetGameEvent::get_name().

template<typename ContextParam >
bool clan::NetGameEventDispatcher_v1< ContextParam >::dispatch ( const NetGameEvent game_event,
ContextParam  context 
)

Dispatch.

Parameters
game_event= Net Game Event
context= Context Param
Returns
bool

References clan::NetGameEvent::get_name().

template<typename ContextParam1 , typename ContextParam2 >
bool clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::dispatch ( const NetGameEvent game_event,
ContextParam1  context1,
ContextParam2  context2 
)

Dispatch.

Parameters
game_event= Net Game Event
context1= Context Param1
context2= Context Param2
Returns
bool

References clan::NetGameEvent::get_name().

template<typename ContextParam1 , typename ContextParam2 , typename ContextParam3 >
bool clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::dispatch ( const NetGameEvent game_event,
ContextParam1  context1,
ContextParam2  context2,
ContextParam3  context3 
)

Dispatch.

Parameters
game_event= Net Game Event
context1= Context Param1
context2= Context Param2
context3= Context Param3
Returns
bool

References clan::NetGameEvent::get_name().

CallbackClass& clan::NetGameEventDispatcher_v0::func_event ( const std::string &  name)
inline
template<typename ContextParam>
CallbackClass& clan::NetGameEventDispatcher_v1< ContextParam >::func_event ( const std::string &  name)
inline
template<typename ContextParam1 , typename ContextParam2 >
CallbackClass& clan::NetGameEventDispatcher_v2< ContextParam1, ContextParam2 >::func_event ( const std::string &  name)
inline
template<typename ContextParam1 , typename ContextParam2 , typename ContextParam3 >
CallbackClass& clan::NetGameEventDispatcher_v3< ContextParam1, ContextParam2, ContextParam3 >::func_event ( const std::string &  name)
inline
NetGameEventValue clan::NetGameEvent::get_argument ( unsigned int  index) const

Get argument.

Parameters
index= value
Returns
Net Game Event Value
unsigned int clan::NetGameEvent::get_argument_count ( ) const
void* clan::NetGameConnection::get_data ( const std::string &  name) const

Get data.

Parameters
name= String Ref
Returns
void
const NetGameEventValue& clan::NetGameEventValue::get_member ( unsigned int  index) const
unsigned int clan::NetGameEventValue::get_member_count ( ) const
SocketName clan::NetGameConnection::get_remote_name ( ) const

Get Remote name.

Returns
remote_name
Type clan::NetGameEventValue::get_type ( ) const

Get Type.

Returns
type
bool clan::NetGameEventValue::is_binary ( ) const

Is Binary.

Returns
true = binary
bool clan::NetGameEventValue::is_boolean ( ) const

Is Boolean.

Returns
true = boolean
bool clan::NetGameEventValue::is_character ( ) const

Is Character.

Returns
true = character
bool clan::NetGameEventValue::is_complex ( ) const

Is Complex.

Returns
true = complex
bool clan::NetGameEventValue::is_integer ( ) const

Is Integer.

Returns
true = integer
bool clan::NetGameEventValue::is_null ( ) const

Is Null.

Returns
true = null
bool clan::NetGameEventValue::is_number ( ) const

Is Number.

Returns
true = number
bool clan::NetGameEventValue::is_string ( ) const

Is String.

Returns
true = string
bool clan::NetGameEventValue::is_ucharacter ( ) const

Is Ucharacter.

Returns
true = ucharacter
bool clan::NetGameEventValue::is_uinteger ( ) const

Is Uinteger.

Returns
true = uinteger
clan::NetGameEventValue::operator bool ( ) const
inline
clan::NetGameEventValue::operator DataBuffer ( ) const
inline
clan::NetGameEventValue::operator float ( ) const
inline
clan::NetGameEventValue::operator int ( ) const
inline
clan::NetGameEventValue::operator std::string ( ) const
inline
clan::NetGameEventValue::operator unsigned char ( ) const
inline
clan::NetGameEventValue::operator unsigned int ( ) const
inline
void clan::NetGameClient::process_events ( )

Process events.

void clan::NetGameServer::process_events ( )

Process events.

void clan::NetGameClient::send_event ( const NetGameEvent game_event)

Send event.

Parameters
game_event= Net Game Event
void clan::NetGameServer::send_event ( const NetGameEvent game_event)

Send event.

Parameters
game_event= Net Game Event
void clan::NetGameConnection::send_event ( const NetGameEvent game_event)

Send event.

Parameters
game_event= Net Game Event
void clan::NetGameConnection::set_data ( const std::string &  name,
void *  data 
)

Set data.

Parameters
name= String Ref
data= void
void clan::NetGameEventValue::set_member ( unsigned int  index,
const NetGameEventValue value 
)

Set member.

Parameters
index= value
value= Net Game Event Value
Signal_v1<NetGameConnection *>& clan::NetGameServer::sig_client_connected ( )
Signal_v2<NetGameConnection *, const std::string &>& clan::NetGameServer::sig_client_disconnected ( )
Signal_v0& clan::NetGameClient::sig_connected ( )

Sig connected.

Returns
Signal_v0
Signal_v0& clan::NetGameClient::sig_disconnected ( )

Sig disconnected.

Returns
Signal_v0
Signal_v1<const NetGameEvent &>& clan::NetGameClient::sig_event_received ( )
Signal_v2<NetGameConnection *, const NetGameEvent &>& clan::NetGameServer::sig_event_received ( )
void clan::NetGameServer::start ( const std::string &  port)

Start.

Parameters
port= String
void clan::NetGameServer::start ( const std::string &  address,
const std::string &  port 
)

Start.

Parameters
address= String
port= String
void clan::NetGameServer::stop ( )

Stop.

DataBuffer clan::NetGameEventValue::to_binary ( ) const

To binary.

Returns
binary
bool clan::NetGameEventValue::to_boolean ( ) const

To boolean.

Returns
bool
int clan::NetGameEventValue::to_character ( ) const

To character.

Returns
char
int clan::NetGameEventValue::to_integer ( ) const

To integer.

Returns
int
float clan::NetGameEventValue::to_number ( ) const

To number.

Returns
float
std::string clan::NetGameEvent::to_string ( ) const

To string.

Returns
String
std::string clan::NetGameEventValue::to_string ( ) const

To string.

Returns
String
unsigned int clan::NetGameEventValue::to_ucharacter ( ) const

To unsigned character.

Returns
unsigned char
unsigned int clan::NetGameEventValue::to_uinteger ( ) const

To unsigned integer.

Returns
unsigned int

Variable Documentation

bool clan::NetGameEventValue::value_bool
bool { ... } ::value_bool
char clan::NetGameEventValue::value_char
char { ... } ::value_char
float { ... } ::value_float
float clan::NetGameEventValue::value_float
int { ... } ::value_int
int clan::NetGameEventValue::value_int
unsigned char clan::NetGameEventValue::value_uchar
unsigned { ... } ::value_uchar
unsigned { ... } ::value_uint
unsigned int clan::NetGameEventValue::value_uint