![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: handleValSet.h,v $ $Revision: 1.20 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifdef DtIFSPEC13 00013 00014 00015 00016 #ifdef DtIFSPEC13DLC 00017 #include "RTI13.h" 00018 #define RTI rti13 00019 #else 00020 #include "RTI.hh" 00021 #endif 00022 #include "attrInfo.h" 00023 #include "attrVal.h" 00024 00025 #ifdef DDM 00026 #include "region13.h" 00027 class DtRegion; 00028 #endif 00029 00030 00031 class DT_DLL_LRC DtHvps : public RTI::HandleValuePairSet 00032 { 00033 public: 00034 00036 DtHvps(RTI::ULong count, RTI::Handle handle = theDefaultChannel); 00037 00039 virtual ~DtHvps(); 00040 00041 virtual RTI::ULong size() const; 00042 00043 virtual RTI::Handle getHandle(RTI::ULong i) const 00044 throw ( 00045 RTI::ArrayIndexOutOfBounds); 00046 00047 virtual RTI::ULong getValueLength(RTI::ULong i) const 00048 throw ( 00049 RTI::ArrayIndexOutOfBounds); 00050 00051 virtual void getValue(RTI::ULong i, char *buff, 00052 RTI::ULong &valueLength) const 00053 throw ( 00054 RTI::ArrayIndexOutOfBounds); 00055 00056 virtual char *getValuePointer( 00057 RTI::ULong i, RTI::ULong& valueLength) const 00058 throw ( 00059 RTI::ArrayIndexOutOfBounds); 00060 00061 #ifdef DtDEFINING_AHVPS 00062 virtual RTI::TransportType getTransportType( RTI::ULong i) const 00063 throw ( 00064 RTI::ArrayIndexOutOfBounds, 00065 RTI::InvalidHandleValuePairSetContext); 00066 00067 virtual RTI::OrderType getOrderType( RTI::ULong i) const 00068 throw ( 00069 RTI::ArrayIndexOutOfBounds, 00070 RTI::InvalidHandleValuePairSetContext); 00071 00072 virtual RTI::Region *getRegion(RTI::ULong i) const 00073 throw ( 00074 RTI::ArrayIndexOutOfBounds, 00075 RTI::InvalidHandleValuePairSetContext); 00076 00078 virtual void print(DtObjectClassInfo* fomClass) const; 00079 00080 #else 00081 virtual RTI::TransportType getTransportType() const 00082 throw (RTI::InvalidHandleValuePairSetContext); 00083 00084 virtual RTI::OrderType getOrderType() const 00085 throw (RTI::InvalidHandleValuePairSetContext); 00086 00087 virtual RTI::Region *getRegion() const 00088 throw (RTI::InvalidHandleValuePairSetContext); 00089 00091 virtual void print(DtInteractionClassInfo* fomClass) const; 00092 00093 #endif 00094 00095 virtual void add( 00096 RTI::Handle h, 00097 const char *buff, 00098 RTI::ULong valueLength) 00099 throw ( 00100 RTI::ValueLengthExceeded, 00101 RTI::ValueCountExceeded); 00102 00103 virtual void addPointer( 00104 RTI::Handle h, 00105 const char *buff, 00106 RTI::ULong valueLength) 00107 throw ( 00108 RTI::ValueLengthExceeded, 00109 RTI::ValueCountExceeded); 00110 00111 virtual void remove(RTI::Handle h) 00112 throw ( 00113 RTI::ArrayIndexOutOfBounds); 00114 00115 virtual void moveFrom(const RTI::HandleValuePairSet& ahvp, 00116 RTI::ULong &i) 00117 throw ( 00118 RTI::ValueCountExceeded, 00119 RTI::ArrayIndexOutOfBounds); 00120 00121 virtual void empty(); 00122 00124 virtual void print() const; 00125 00126 virtual RTI::ULong start() const; 00127 virtual RTI::ULong valid(RTI::ULong i) const; 00128 virtual RTI::ULong next(RTI::ULong i) const; 00129 00131 virtual void setChannel(RTI::Handle channelValue); 00132 virtual RTI::Handle channel() const; 00133 00134 #ifdef DDM 00135 00136 virtual void setRegion(DtRegion* region); 00137 #endif 00138 00139 virtual void setTransportType(RTI::TransportationHandle type); 00140 virtual RTI::TransportationHandle transportType() const; 00141 00143 virtual void setOrderType(RTI::OrderingHandle type); 00144 virtual RTI::OrderingHandle orderType() const; 00145 00147 virtual void setOffset(unsigned int offset); 00148 virtual void setMinOffset(unsigned int offset); 00149 virtual unsigned int offset(void) const ; 00150 00151 public: 00152 static void setDefaultChannel(RTI::Handle defaultChannelValue); 00153 static RTI::Handle defaultChannel(); 00154 00155 protected: 00156 static RTI::Handle theDefaultChannel; 00157 00158 protected: 00159 RTI::ULong myMaxSize; 00160 RTI::ULong mySize; 00161 RTI::Handle myChannel; 00162 RTI::TransportationHandle myTransport; 00163 RTI::OrderingHandle myOrder; 00164 DtAttrVal **myVals; 00165 #ifdef DDM 00166 DtRegion13 myRegion; 00167 #endif 00168 unsigned int myUpdateRateOffset; 00169 }; 00170 00171 #ifndef __alpha 00172 inline RTI::ULong DtHvps::start() const 00173 { 00174 return 0; 00175 } 00176 00177 inline RTI::ULong DtHvps::valid(RTI::ULong i) const 00178 { 00179 return (i >= start() && i < size()); 00180 } 00181 00182 inline RTI::ULong DtHvps::next(RTI::ULong i) const 00183 { 00184 return i+1; 00185 } 00186 #endif 00187 00188 #endif //! DtIFSPEC1516