syncsys
|
base class for a client More...
#include <SyncSystem.h>
Public Member Functions | |
SyncClient (void) | |
constructor for a SyncClient | |
void | UnPackData (helpers::NetworkBuffer &, bool updatedirectly) |
Unpack all serialised data from a updatepacket and stores them. | |
void | AddElementNeedingData (NetEntity *Callback, unsigned int NeededID, NetAction NeededAction) |
Register a NetEntity. | |
template<class T1 > | |
T1 * | GetReceivedElement (unsigned int id, NetAction n=NOTHING, NetEntity *Callback=NULL, bool createanyway=false) |
For creation of NetEntities at clientsite. | |
template<class T1 , typename T2 > | |
T1 * | GetReceivedElement (unsigned int id, T2 arg1, NetAction n=NOTHING, NetEntity *Callback=NULL, bool createanyway=false) |
For creation of NetEntities at clientsite. | |
template<class T1 , typename T2 , typename T3 > | |
T1 * | GetReceivedElement (unsigned int id, T2 arg1, T3 arg2, NetAction n=NOTHING, NetEntity *Callback=NULL, bool createanyway=false) |
For creation of NetEntities at clientsite. | |
void | RemoveElement (NetEntity *e) |
Removes the AttachedNetEntity for a NetEntity. |
base class for a client
this base client is abled to receive and store data from a server for serialised NetEntity-instances. Provides methodes for creating the serialised instances at clientsite.
T1* syncsys::SyncClient::GetReceivedElement | ( | unsigned int | id, |
T2 | arg1, | ||
NetAction | n = NOTHING , |
||
NetEntity * | Callback = NULL , |
||
bool | createanyway = false |
||
) | [inline] |
For creation of NetEntities at clientsite.
You should only use this methode for creating/getting NetEntity-instances on clientsize. Otherwise the NetEntity may not be assigned correctly to the system. If createanyway is true, the NetEntity will be created although if the serialised data did not arrive. Registrate Callback if the element is not created. Callback will be "informed" by changing the version causing a new deserialisation.
T1* syncsys::SyncClient::GetReceivedElement | ( | unsigned int | id, |
T2 | arg1, | ||
T3 | arg2, | ||
NetAction | n = NOTHING , |
||
NetEntity * | Callback = NULL , |
||
bool | createanyway = false |
||
) | [inline] |
For creation of NetEntities at clientsite.
You should only use this methode for creating/getting NetEntity-instances on clientsize. Otherwise the NetEntity may not be assigned correctly to the system. If createanyway is true, the NetEntity will be created although if the serialised data did not arrive. Registrate Callback if the element is not created. Callback will be "informed" by changing the version causing a new deserialisation.
T1* syncsys::SyncClient::GetReceivedElement | ( | unsigned int | id, |
NetAction | n = NOTHING , |
||
NetEntity * | Callback = NULL , |
||
bool | createanyway = false |
||
) | [inline] |
For creation of NetEntities at clientsite.
You should only use this methode for creating/getting NetEntity-instances on clientsize. Otherwise the NetEntity may not be assigned correctly to the system. If createanyway is true, the NetEntity will be created although if the serialised data did not arrive. Registrate Callback if the element is not created. Callback will be "informed" by changing the version causing a new deserialisation.
void syncsys::SyncClient::UnPackData | ( | helpers::NetworkBuffer & | , |
bool | updatedirectly | ||
) |
Unpack all serialised data from a updatepacket and stores them.
Updates allready created NetEntity-instances directly, if updatedirectly is true and they got new data. Otherwise you have to call NetEntity::PerformNeededUpdates frequently. If all elements are updated frequently anyway set updatedirectly to false.