MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dimRangeBounds.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: dimRangeBounds.h,v $ $Revision: 1.9 $ $State: Exp $
7 *********************************************************************/
10 
11 #ifndef DtRangeBounds_H_
12 #define DtRangeBounds_H_
13 
14 #ifdef DDM
15 
16 #include "rtiMsConfig.h"
17 #include <vlutil/vlMachineTypes.h>
18 #include "internalTypes.h"
19 #include <map>
20 
21 enum DtBoundsCheck
22 {
23  DtInvalidBounds,
24  DtValidLowerBound,
25  DtValidUpperBound,
26  DtValidBounds
27 };
28 
29 class DT_DLL_LRC DtRangeBounds
30 {
31 public:
32 
33  DtRangeBounds();
34 
35  DtRangeBounds(unsigned long lowerBound, unsigned long upperBound,
36  unsigned long maxBound);
37 
38  ~DtRangeBounds()
39  throw ();
40 
41  DtRangeBounds(DtRangeBounds const & rhs);
42 
43  DtRangeBounds &operator=(DtRangeBounds const & rhs);
44 
46  void setLowerBound(unsigned long lowerBound);
47  unsigned long getLowerBound() const;
48 
50  void setUpperBound(unsigned long upperBound);
51  unsigned long getUpperBound() const;
52 
54  void setMaxBound(unsigned long max);
55  unsigned long getMaxBound() const;
56 
58  int overlap(DtRangeBounds const & rangeBound) const;
59 
61  DtBoundsCheck boundsCheck() const;
62 
63 protected:
64 
65  unsigned long myLowerBound;
66  unsigned long myUpperBound;
67  unsigned long myMaxBound;
68  DtBoundsCheck myBoundsCheck;
69 };
70 
71 inline unsigned long DtRangeBounds::getLowerBound() const
72 {
73  return myLowerBound;
74 }
75 
76 inline unsigned long DtRangeBounds::getUpperBound() const
77 {
78  return myUpperBound;
79 }
80 
81 inline unsigned long DtRangeBounds::getMaxBound() const
82 {
83  return myMaxBound;
84 }
85 
86 inline DtBoundsCheck DtRangeBounds::boundsCheck() const
87 {
88  return myBoundsCheck;
89 }
90 
91 class DT_DLL_LRC DtDimBounds : public DtRangeBounds
92 {
93 public:
94 
95  DtDimBounds();
96 
97  DtDimBounds(unsigned long lowerBound, unsigned long upperBound,
98  unsigned long maxBound);
99 
100  ~DtDimBounds()
101  throw ();
102 
103  DtDimBounds(DtDimBounds const & rhs);
104 
105  DtDimBounds &operator=(DtDimBounds const & rhs);
106 
107  bool operator==(DtDimBounds const & rhs);
108 
109  DtDimensionHandle getDimension() const;
110 
111  void setDimension(DtDimensionHandle dimValue);
112 
113 protected:
114 
115  DtDimensionHandle myDimension;
116 };
117 
118 inline DtDimensionHandle DtDimBounds::getDimension() const
119 {
120  return myDimension;
121 }
122 
123 class DT_DLL_LRC DtRegionExtent
124 {
125 public:
126 
128  DtRegionExtent();
129 
131  DtRegionExtent(DtRegionExtent const & rhs);
132 
134  ~DtRegionExtent()
135  throw ();
136 
138  DtRegionExtent &operator=(DtRegionExtent const & rhs);
139 
141  unsigned long getNumberDimensions() const;
142 
144  void getDimensionHandles(DtDimensionHandleSet& dimHandles) const;
145 
147  void addDimension(DtDimensionHandle dim);
148  void removeDimension(DtDimensionHandle dim);
149 
151  unsigned long getLowerBound(DtDimensionHandle dimension) const;
152  void setLowerBound(DtDimensionHandle dimension, unsigned long lowerBound);
153 
155  unsigned long getUpperBound(DtDimensionHandle dimension) const;
156  void setUpperBound(DtDimensionHandle dimension, unsigned long upperBound);
157 
159  unsigned long getMaxBound(DtDimensionHandle dimension) const;
160  void setMaxBound(DtDimensionHandle dimension, unsigned long max);
161 
163  void setRangeBound(DtDimensionHandle dimension, unsigned long lowerBound,
164  unsigned long upperBound);
165  void setRangeBound(DtDimensionHandle dimension, DtRangeBounds extent);
166  void setRangeBound(DtDimBounds extent);
167  DtDimBounds getRangeBound(DtDimensionHandle dimension) const;
168 
170  bool overlap(DtRegionExtent const & extent) const;
171 
173  bool hasDimension(DtDimensionHandle dimHandle);
174 
177  bool validExtents();
178 
180  unsigned long encodedLength() const;
181 
183  void encode(void* buffer, unsigned long bufferSize) const;
184 
186  void decode(void* buffer, unsigned long dimCount);
187 
188 public:
189  static const DtDimBounds theInvalidExtent;
190 
191 protected:
192  typedef std::map<DtDimensionHandle, DtDimBounds> DtExtentMap;
193  DtExtentMap myExtents;
194 };
195 
196 #endif
197 #endif
std::set< DtDimensionHandle > DtDimensionHandleSet
Definition: internalTypes.h:42
DtHandle DtDimensionHandle
Definition: internalTypes.h:41
virtual Boolean throw(SpecifiedSaveLabelDoesNotExist, ConcurrentAccessAttempted, RTIinternalError)
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
The declaration of internal types.

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)