Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/network/packet/FunctionCalls.h @ 3133

Last change on this file since 3133 was 3084, checked in by landauf, 15 years ago

merged netp3 branch back to trunk

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1
2#ifndef NETWORKFUNCTIONCALLS_H
3#define NETWORKFUNCTIONCALLS_H
4
5#include "../NetworkPrereqs.h"
6
7#include <string>
8#include <cstring>
9
10#include "Packet.h"
11#include <cassert>
12
13namespace orxonox {
14
15class MultiType;
16
17namespace packet {
18/**
19        @author
20*/
21
22
23class _NetworkExport FunctionCalls : public Packet
24{
25public:
26  FunctionCalls();
27  FunctionCalls( uint8_t* data, unsigned int clientID );
28  ~FunctionCalls();
29
30  inline unsigned int getSize() const
31    { assert(!this->isDataENetAllocated()); return currentSize_; }
32  bool process();
33
34  void addCallStatic( uint32_t networkID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
35  void addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
36private:
37  uint32_t nrOfCalls_;
38  unsigned int clientID_;
39  uint32_t currentSize_;
40  uint32_t currentMemBlocks_; // this saves the number of memory blocks (of size FUNCTIONCALLS_MEM_ALLOCATION) allocated
41};
42
43} //namespace packet
44} //namespace orxonox
45
46#endif
Note: See TracBrowser for help on using the repository browser.