![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: sensorDataEntry.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00017 00018 00019 #ifndef sensorDataEntry_H_ 00020 #define sensorDataEntry_H_ 00021 00022 #include <vlutil/vlString.h> 00023 #include <vlutil/vlNetTypes.h> 00024 #include <vrfExtProtocol/objType.h> 00025 #include <vlpi/disEnums.h> 00026 #include <vector> 00027 00030 #include "vrfmsgs/vrfmsgsDefines.h" 00031 class DT_DLL_vrfmsgs DtSensorDataEntry 00032 { 00033 public: 00034 DtSensorDataEntry(); 00035 DtSensorDataEntry(const DtSensorDataEntry& orig); 00036 DtSensorDataEntry& operator=(const DtSensorDataEntry& orig); 00037 00038 virtual ~DtSensorDataEntry(); 00039 00040 virtual void setTargetName(const DtString& name); 00041 virtual DtString targetName() const; 00042 00043 virtual void setContactType(const DtObjectType& type); 00044 virtual DtObjectType contactType() const; 00045 00046 virtual void setCombatIdentificationLevel(const int level); 00047 virtual const int combatIdentificationLevel() const; 00048 00050 virtual void setForceType(const DtForceType forceType); 00051 virtual const DtForceType forceType() const; 00052 00053 virtual int netRepSize() const; 00054 00055 virtual bool setFromNet(const char* contentBuffer, 00056 unsigned contentSize); 00057 00058 virtual bool setToNet(char* contentBuffer); 00059 00060 protected: 00061 DtObjectType myContactType; 00062 int myCombatIdentificationLevel; 00063 DtForceType myForceType; 00064 DtString myTargetName; 00065 }; 00066 00067 namespace DtBufferSerialize 00068 { 00070 DT_DLL_vrfmsgs int getSize(const DtSensorDataEntry& data); 00071 00077 DT_DLL_vrfmsgs char *encode(const DtSensorDataEntry& data, char *buffer); 00078 00084 DT_DLL_vrfmsgs const char *decode(DtSensorDataEntry &data, const char *buffer) ; 00085 } 00086 00087 typedef std::vector<DtSensorDataEntry> DtSensorDataEntryList; 00088 00089 #endif