Changeset 7490 for code/trunk/src/libraries/network/FunctionCall.h
- Timestamp:
- Sep 26, 2010, 6:41:19 PM (15 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/network/FunctionCall.h
r7489 r7490 27 27 */ 28 28 29 #ifndef _FunctionCall s_H__30 #define _FunctionCall s_H__29 #ifndef _FunctionCall_H__ 30 #define _FunctionCall_H__ 31 31 32 32 #include "network/NetworkPrereqs.h" 33 #include "util/UtilPrereqs.h" 33 34 34 35 #include <cassert> 35 #include "util/UtilPrereqs.h" 36 #include "Packet.h" 36 #include <vector> 37 37 38 38 namespace orxonox { 39 40 namespace packet {41 39 /** 42 40 @author … … 44 42 45 43 46 class _NetworkExport FunctionCall s : public Packet44 class _NetworkExport FunctionCall 47 45 { 48 46 public: 49 FunctionCalls(); 50 FunctionCalls( uint8_t* data, unsigned int clientID ); 51 ~FunctionCalls(); 47 FunctionCall(); 48 ~FunctionCall(); 52 49 53 inline unsigned int getSize() const 54 { assert(!this->isDataENetAllocated()); return currentSize_; } 55 bool process(); 50 inline unsigned int getSize() const { return this->size_; } 51 bool execute(); 56 52 57 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); 58 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); 53 void setCallStatic( uint32_t networkID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0); 54 void setCallMember( 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); 55 56 void saveData( uint8_t*& mem ); 57 void loadData( uint8_t*& mem ); 59 58 private: 60 uint32_t nrOfCalls_; 61 unsigned int clientID_; 62 uint32_t currentSize_; 63 uint32_t currentMemBlocks_; // this saves the number of memory blocks (of size FUNCTIONCALLS_MEM_ALLOCATION) allocated 59 uint32_t nrOfArguments_; 60 bool bIsStatic_; 61 uint32_t functionID_; 62 uint32_t objectID_; 63 uint32_t size_; 64 std::vector<MultiType> arguments_; 64 65 }; 65 66 66 } //namespace packet67 67 } //namespace orxonox 68 68
Note: See TracChangeset
for help on using the changeset viewer.