Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Member Functions | Private Attributes | List of all members
orxonox::packet::Gamestate Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/network/packet/Gamestate.h>

Inheritance diagram for orxonox::packet::Gamestate:
orxonox::packet::Packet

Public Member Functions

 Gamestate ()
 
 Gamestate (uint8_t *data, unsigned int clientID)
 
 Gamestate (uint8_t *data)
 
 Gamestate (const Gamestate &g)
 
 ~Gamestate ()
 
bool collectData (int id, uint8_t mode=0x0)
 
bool compressData ()
 
bool decompressData ()
 
GamestatediffVariables (Gamestate *base)
 
int32_t getBaseID () const
 
uint32_t getDataSize () const
 
uint32_t getID () const
 
bool isCompressed () const
 
bool isDiffed () const
 
bool operator== (packet::Gamestate gs)
 
bool spreadData (uint8_t mode=0x0)
 
- Public Member Functions inherited from orxonox::packet::Packet
 Packet (const Packet &p)
 
virtual ~Packet ()
 Destroys a packet completely. More...
 
virtual unsigned char * getData ()
 
uint32_t getFlags ()
 
int getPeerID ()
 
uint32_t getRequiredGamestateID ()
 
bool isReliable ()
 
virtual bool send (orxonox::Host *host)
 Send the Packet. More...
 
void setPeerID (int id)
 

Private Member Functions

uint32_t calcGamestateSize (uint32_t id, uint8_t mode=0x0)
 
virtual uint32_t getSize () const override
 
virtual bool process (orxonox::Host *host) override
 

Private Attributes

std::list< objdataVector_
 
GamestateHeader header_
 
uint32_t nrOfVariables_
 
std::vector< uint32_t > sizes_
 

Additional Inherited Members

- Static Public Member Functions inherited from orxonox::packet::Packet
static PacketcreatePacket (ENetPacket *packet, uint32_t peerID)
 Given an ENetPacket, create an Orxonox packet. More...
 
static void deletePacket (ENetPacket *packet)
 ENet calls this method whenever it wants to destroy a packet that contains data we allocated ourselves. More...
 
- Protected Member Functions inherited from orxonox::packet::Packet
 Packet ()
 
 Packet (uint8_t *data, unsigned int peerID)
 
bool isDataENetAllocated () const
 
- Protected Attributes inherited from orxonox::packet::Packet
bool bDataENetAllocated_
 Tells whether data_ was allocated by ENet or ourselves. More...
 
uint8_t * data_
 Pointer to the data. More...
 
uint32_t flags_
 
Direction packetDirection_
 
unsigned int peerID_
 
uint32_t requiredGamestateID_
 

Detailed Description

Author
Oliver Scheuss

Constructor & Destructor Documentation

orxonox::packet::Gamestate::Gamestate ( )
orxonox::packet::Gamestate::Gamestate ( uint8_t *  data,
unsigned int  clientID 
)
orxonox::packet::Gamestate::Gamestate ( uint8_t *  data)
orxonox::packet::Gamestate::Gamestate ( const Gamestate g)
orxonox::packet::Gamestate::~Gamestate ( )

Member Function Documentation

uint32_t orxonox::packet::Gamestate::calcGamestateSize ( uint32_t  id,
uint8_t  mode = 0x0 
)
private
bool orxonox::packet::Gamestate::collectData ( int  id,
uint8_t  mode = 0x0 
)
bool orxonox::packet::Gamestate::compressData ( )
bool orxonox::packet::Gamestate::decompressData ( )
Gamestate * orxonox::packet::Gamestate::diffVariables ( Gamestate base)
int32_t orxonox::packet::Gamestate::getBaseID ( ) const
inline
uint32_t orxonox::packet::Gamestate::getDataSize ( ) const
inline
uint32_t orxonox::packet::Gamestate::getID ( ) const
inline
uint32_t orxonox::packet::Gamestate::getSize ( void  ) const
overrideprivatevirtual
bool orxonox::packet::Gamestate::isCompressed ( ) const
inline
bool orxonox::packet::Gamestate::isDiffed ( ) const
inline
bool orxonox::packet::Gamestate::operator== ( packet::Gamestate  gs)
bool orxonox::packet::Gamestate::process ( orxonox::Host host)
overrideprivatevirtual
bool orxonox::packet::Gamestate::spreadData ( uint8_t  mode = 0x0)

Member Data Documentation

std::list<obj> orxonox::packet::Gamestate::dataVector_
private
GamestateHeader orxonox::packet::Gamestate::header_
private
uint32_t orxonox::packet::Gamestate::nrOfVariables_
private
std::vector<uint32_t> orxonox::packet::Gamestate::sizes_
private

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