![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 2001 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: dimRangeBounds.h,v $ $Revision: 1.9 $ $State: Exp $ 00007 *********************************************************************/ 00010 00011 #ifndef DtRangeBounds_H_ 00012 #define DtRangeBounds_H_ 00013 00014 #ifdef DDM 00015 00016 #include "rtiMsConfig.h" 00017 #include <vlutil/vlMachineTypes.h> 00018 #include "internalTypes.h" 00019 #include <map> 00020 00021 enum DtBoundsCheck 00022 { 00023 DtInvalidBounds, 00024 DtValidLowerBound, 00025 DtValidUpperBound, 00026 DtValidBounds 00027 }; 00028 00029 class DT_DLL_LRC DtRangeBounds 00030 { 00031 public: 00032 00033 DtRangeBounds(); 00034 00035 DtRangeBounds(unsigned long lowerBound, unsigned long upperBound, 00036 unsigned long maxBound); 00037 00038 ~DtRangeBounds() 00039 throw (); 00040 00041 DtRangeBounds(DtRangeBounds const & rhs); 00042 00043 DtRangeBounds &operator=(DtRangeBounds const & rhs); 00044 00046 void setLowerBound(unsigned long lowerBound); 00047 unsigned long getLowerBound() const; 00048 00050 void setUpperBound(unsigned long upperBound); 00051 unsigned long getUpperBound() const; 00052 00054 void setMaxBound(unsigned long max); 00055 unsigned long getMaxBound() const; 00056 00058 int overlap(DtRangeBounds const & rangeBound) const; 00059 00061 DtBoundsCheck boundsCheck() const; 00062 00063 protected: 00064 00065 unsigned long myLowerBound; 00066 unsigned long myUpperBound; 00067 unsigned long myMaxBound; 00068 DtBoundsCheck myBoundsCheck; 00069 }; 00070 00071 inline unsigned long DtRangeBounds::getLowerBound() const 00072 { 00073 return myLowerBound; 00074 } 00075 00076 inline unsigned long DtRangeBounds::getUpperBound() const 00077 { 00078 return myUpperBound; 00079 } 00080 00081 inline unsigned long DtRangeBounds::getMaxBound() const 00082 { 00083 return myMaxBound; 00084 } 00085 00086 inline DtBoundsCheck DtRangeBounds::boundsCheck() const 00087 { 00088 return myBoundsCheck; 00089 } 00090 00091 class DT_DLL_LRC DtDimBounds : public DtRangeBounds 00092 { 00093 public: 00094 00095 DtDimBounds(); 00096 00097 DtDimBounds(unsigned long lowerBound, unsigned long upperBound, 00098 unsigned long maxBound); 00099 00100 ~DtDimBounds() 00101 throw (); 00102 00103 DtDimBounds(DtDimBounds const & rhs); 00104 00105 DtDimBounds &operator=(DtDimBounds const & rhs); 00106 00107 bool operator==(DtDimBounds const & rhs); 00108 00109 DtDimensionHandle getDimension() const; 00110 00111 void setDimension(DtDimensionHandle dimValue); 00112 00113 protected: 00114 00115 DtDimensionHandle myDimension; 00116 }; 00117 00118 inline DtDimensionHandle DtDimBounds::getDimension() const 00119 { 00120 return myDimension; 00121 } 00122 00123 class DT_DLL_LRC DtRegionExtent 00124 { 00125 public: 00126 00128 DtRegionExtent(); 00129 00131 DtRegionExtent(DtRegionExtent const & rhs); 00132 00134 ~DtRegionExtent() 00135 throw (); 00136 00138 DtRegionExtent &operator=(DtRegionExtent const & rhs); 00139 00141 unsigned long getNumberDimensions() const; 00142 00144 void getDimensionHandles(DtDimensionHandleSet& dimHandles) const; 00145 00147 void addDimension(DtDimensionHandle dim); 00148 void removeDimension(DtDimensionHandle dim); 00149 00151 unsigned long getLowerBound(DtDimensionHandle dimension) const; 00152 void setLowerBound(DtDimensionHandle dimension, unsigned long lowerBound); 00153 00155 unsigned long getUpperBound(DtDimensionHandle dimension) const; 00156 void setUpperBound(DtDimensionHandle dimension, unsigned long upperBound); 00157 00159 unsigned long getMaxBound(DtDimensionHandle dimension) const; 00160 void setMaxBound(DtDimensionHandle dimension, unsigned long max); 00161 00163 void setRangeBound(DtDimensionHandle dimension, unsigned long lowerBound, 00164 unsigned long upperBound); 00165 void setRangeBound(DtDimensionHandle dimension, DtRangeBounds extent); 00166 void setRangeBound(DtDimBounds extent); 00167 DtDimBounds getRangeBound(DtDimensionHandle dimension) const; 00168 00170 bool overlap(DtRegionExtent const & extent) const; 00171 00173 bool hasDimension(DtDimensionHandle dimHandle); 00174 00177 bool validExtents(); 00178 00180 unsigned long encodedLength() const; 00181 00183 void encode(void* buffer, unsigned long bufferSize) const; 00184 00186 void decode(void* buffer, unsigned long dimCount); 00187 00188 public: 00189 static const DtDimBounds theInvalidExtent; 00190 00191 protected: 00192 typedef std::map<DtDimensionHandle, DtDimBounds> DtExtentMap; 00193 DtExtentMap myExtents; 00194 }; 00195 00196 #endif 00197 #endif