![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2010 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: .h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef DdmRegion13_H_ 00010 #define DdmRegion13_H_ 00011 00012 #include "regionData.h" 00013 00014 class DdmRegion13 : public DdmRegion 00015 { 00016 public: 00017 00018 DdmRegion13() : DdmRegion() { myExtentIndexString = nextId(); }; 00019 00020 virtual ~DdmRegion13() {}; 00021 00022 // Get a unique ID for this object based on the object handle 00023 virtual const std::wstring& id() const; 00024 00025 // Accessors and mutators 00026 RTI::ExtentIndex extentIndex() const; 00027 void setExtentIndex(RTI::ExtentIndex index); 00028 00029 // RTI::Region* region() const; 00030 // void setRegion(RTI::Region* reg); 00031 00032 protected: 00033 00034 static std::wstring nextId(); 00035 00036 /*RTI::Region* myRegion;*/ 00037 RTI::ExtentIndex myExtentIndex; 00038 std::wstring myExtentIndexString; 00039 }; 00040 00041 inline const std::wstring& DdmRegion13::id() const 00042 { 00043 return myExtentIndexString; 00044 } 00045 00046 inline RTI::ExtentIndex DdmRegion13::extentIndex() const 00047 { 00048 return myExtentIndex; 00049 } 00050 00051 inline void DdmRegion13::setExtentIndex(RTI::ExtentIndex index) 00052 { 00053 myExtentIndex = index; 00054 } 00055 00056 // inline RTI::Region* DdmRegion13::region() 00057 // { 00058 // return myRegion; 00059 // } 00060 // 00061 // inline void DdmRegion13::setRegion(RTI::Region* reg) 00062 // { 00063 // myRegion = reg; 00064 // } 00065 00066 inline std::wstring DdmRegion13::nextId() 00067 { 00068 // In 1.3, what we really want are extent ID's, however, these will change 00069 // as we add and remove extents from the region. Instead, let's make up 00070 // our own ID here. 00071 static unsigned idCount = 0; 00072 00073 std::wstringstream ssId; 00074 ssId << ++idCount; 00075 return ssId.str(); 00076 } 00077 00078 #endif