![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: fixedGrid.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *********************************************************************/ 00008 #ifndef fixedGrid_H_ 00009 #define fixedGrid_H_ 00010 #ifdef DDM 00011 00014 00015 #include "rtiMsConfig.h" 00016 #include <set> 00017 #include <vector> 00018 #include <vlutil/vlUtil.h> 00019 #include <vlutil/vlString.h> 00020 #include <vlutil/vlInetAddr.h> 00021 #include "internalTypes.h" 00022 00023 00024 class DtFixedGridRegion; 00025 class DtFederateMgr; 00026 00038 00039 class DT_DLL_LRC DtFixedGrid 00040 { 00041 public: 00042 00044 typedef std::set<MAKRti::DtInetAddr> DtNetworkAddressSet; 00045 00046 public: 00047 00049 DtFixedGrid(DtFederateMgr* fedMgrPtr); 00050 00052 virtual ~DtFixedGrid(); 00053 00056 virtual void getOverlapAddressSet(DtFixedGridRegion const& region, 00057 DtNetworkAddressSet& addressSet); 00058 00061 virtual void getOverlapAddressSet(DtFixedGridRegion const& region, 00062 DtNetworkAddressSet& addressSet, unsigned int extentIndex); 00063 00067 virtual MAKRti::DtInetAddr getOverlapAddress(DtFixedGridRegion const& region); 00068 00070 virtual MAKRti::DtString const& routingSpaceName() const; 00071 00073 virtual DtDimensionHandleSet const& dimensionHandles() const; 00074 00076 virtual DtDimensionHandleVector const& orderedDimensions() const; 00077 00080 virtual int dimensionIndex(DtDimensionHandle dimHandleValue) const; 00081 00082 protected: 00083 00085 typedef std::map<DtDimensionHandle, int> DtDimensionIndexMap; 00086 00088 typedef std::pair<unsigned int, double> DtDimensionPartition; 00089 00091 typedef std::vector<DtDimensionPartition> DtSubspacePartition; 00092 00094 typedef std::vector<DtSubspacePartition> DtSubspaceVector; 00095 00096 protected: 00097 00099 virtual bool usingSubspacePartition() const; 00100 00110 virtual void getAddressSet( 00111 DtFixedGridRegion const& region, 00112 unsigned int extentIndex, 00113 MAKRti::DtInetAddr baseAddress, 00114 unsigned int subspaceSize, 00115 unsigned int dimIndex, 00116 DtSubspacePartition const& subSpace, 00117 DtNetworkAddressSet& addressSet); 00118 00128 virtual unsigned int getAddressOffset( 00129 DtFixedGridRegion const& region, 00130 unsigned int subspaceSize, 00131 unsigned int dimIndex, 00132 DtSubspacePartition const& subSpace); 00133 00134 protected: 00135 00137 std::vector<unsigned int> mySubspaceAddressOffset; 00138 00140 std::vector<unsigned int> mySubspaceSize; 00141 00143 DtSubspaceVector mySubspace; 00144 00146 double mySubspacePartition; 00147 00149 MAKRti::DtInetAddr myBaseAddress; 00150 00152 DtDimensionIndexMap myDimensionIndex; 00153 00155 DtDimensionHandleVector myOrderedDimensions; 00156 00158 DtDimensionHandleSet myDimensionHandles; 00159 00161 DtDimensionHandle mySubspaceDimensionHandle; 00162 00164 MAKRti::DtString mySubspaceDimensionName; 00165 00167 MAKRti::DtString myRoutingSpaceName; 00168 }; 00169 00170 #endif //! DtfixedGrid_H_ 00171 #endif //! DDM