WorldStateSerializerBehavior Class Reference#include <WorldStateSerializerBehavior.h>
Inheritance diagram for WorldStateSerializerBehavior:
[legend]List of all members.
Detailed Description
Copies WorldState into a buffer for transmission over the network.
To determine the communication protocol, just look in the processEvent() function - it's pretty straightforward binary copy of values
Definition at line 14 of file WorldStateSerializerBehavior.h.
Constructor & Destructor Documentation
WorldStateSerializerBehavior::WorldStateSerializerBehavior |
( |
|
) |
|
|
Member Function Documentation
void WorldStateSerializerBehavior::DoStart |
( |
|
) |
[virtual] |
|
void WorldStateSerializerBehavior::DoStop |
( |
|
) |
[virtual] |
|
template<class T> |
static void WorldStateSerializerBehavior::encode |
( |
char ** |
dst, |
|
|
const T * |
src, |
|
|
int |
num |
|
) |
[inline, static, protected] |
|
template<class T> |
static void WorldStateSerializerBehavior::encode |
( |
char ** |
dst, |
|
|
const T & |
value |
|
) |
[inline, static, protected] |
|
static std::string WorldStateSerializerBehavior::getClassDescription |
( |
|
) |
[inline, static] |
|
virtual std::string WorldStateSerializerBehavior::getDescription |
( |
|
) |
const [inline, virtual] |
|
|
Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).
By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~::getClassDescription(), because static functions can't be virtual in C++ (doh!)
This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so.
Reimplemented from BehaviorBase.
Definition at line 26 of file WorldStateSerializerBehavior.h. |
void WorldStateSerializerBehavior::processEvent |
( |
const EventBase & |
e |
) |
[virtual] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|