Go to the documentation of this file.00001
00002
00003
00004
00005
00009
00010 #ifndef baseIntDesc1516_H_
00011 #define baseIntDesc1516_H_
00012
00013 #if DtHLA
00014 #if DtHLA_1516
00015
00016 #include "lgrSim.h"
00017
00018 #include "baseHla1516Class.h"
00019 #include "baseParam.h"
00020
00021 #include <vl/rtiCompatibility.h>
00022 #include <vl/rtiNamespace.h>
00023
00024 class DtString;
00025 class DtInterClassDesc;
00026
00027 namespace MAKLogger
00028 {
00029 class DtLgrOnlineFomDesc;
00030
00033 class DT_DLL_LGRSIM DtBaseInterClassDesc : public DtBaseHla1516Class<DtBaseParamDesc>
00034 {
00035 public:
00038 DtBaseInterClassDesc( const DtString& className,
00039 DtBaseInterClassDesc* baseClass, DtLgrHlaHandle handle,
00040 const void* handCode, int codeSize );
00041
00044 DtBaseInterClassDesc( const DtString& className,
00045 const DtString& baseClassName, DtLgrHlaHandle hand,
00046 const void* handCode, int codeSize );
00047
00049 DtBaseInterClassDesc( char*& bfr, int& bsz );
00050
00052 virtual ~DtBaseInterClassDesc();
00053
00055 DtBaseInterClassDesc( const DtBaseInterClassDesc& src );
00056
00058 DtBaseInterClassDesc& operator=( const DtBaseInterClassDesc& src );
00059
00061 RTI::InteractionClassHandle rtiHandle(const DtLgrOnlineFomDesc& fomDesc) const;
00062
00064 inline bool isBaseClass() const;
00065
00067 inline void setIsBaseClass(bool);
00068
00070 inline bool isSubscribedTo() const;
00071
00073 inline void setIsSubscribedTo( bool onOff );
00074
00076 inline bool isFilteredClass() const;
00077
00079 inline void setIsFilteredClass( bool onOff );
00080
00083 inline DtLgrFomTransportType transportType() const;
00084
00086 inline void setTransportType(DtLgrFomTransportType type);
00087
00090 inline DtLgrFomOrderType orderType() const;
00091
00093 inline void setOrderType(DtLgrFomOrderType type);
00094
00095
00107 int serialize( char*& bfr, int& bsz ) const;
00108
00109 protected:
00111 void resetAll();
00112 int unserializeParameters( char* bfr, int bsz, int num );
00113
00114 };
00115
00116 inline bool DtBaseInterClassDesc::isBaseClass() const
00117 {
00118 return ( ( flags() & DtLgrFomDesc_IsBaseClass ) != 0 );
00119 }
00120
00121 inline void DtBaseInterClassDesc::setIsBaseClass(bool isBaseClass)
00122 {
00123 if(isBaseClass)
00124 {
00125 setFlags(flags() | DtLgrFomDesc_IsBaseClass);
00126 }
00127 else
00128 {
00129 setFlags(flags() & ~DtLgrFomDesc_IsBaseClass);
00130 }
00131 }
00132
00133
00134 inline bool DtBaseInterClassDesc::isSubscribedTo() const
00135 {
00136 return ( ( flags() & DtLgrFomDesc_IsSubscribed ) != 0 );
00137 }
00138
00139
00140 inline void DtBaseInterClassDesc::setIsSubscribedTo( bool onOff )
00141 {
00142 if(onOff)
00143 {
00144 setFlags(flags() | DtLgrFomDesc_IsSubscribed);
00145 }
00146 else
00147 {
00148 setFlags(flags() & ~DtLgrFomDesc_IsSubscribed);
00149 }
00150 }
00151
00152
00153 inline bool DtBaseInterClassDesc::isFilteredClass() const
00154 {
00155 return ( ( flags() & DtLgrFomDesc_IsFiltered ) != 0 );
00156 }
00157
00158
00159 inline void DtBaseInterClassDesc::setIsFilteredClass( bool onOff )
00160 {
00161 if(onOff)
00162 {
00163 setFlags(flags() | DtLgrFomDesc_IsFiltered);
00164 }
00165 else
00166 {
00167 setFlags(flags() & ~DtLgrFomDesc_IsFiltered);
00168 }
00169 }
00170
00171
00172 inline DtLgrFomTransportType DtBaseInterClassDesc::transportType() const
00173 {
00174 if ( ( flags() & DtLgrFomDesc_Reliable ) != 0 )
00175 {
00176 return DtLgr_Reliable;
00177 }
00178 else
00179 {
00180 return DtLgr_BestEffort;
00181 }
00182 }
00183
00184 inline void DtBaseInterClassDesc::setTransportType(DtLgrFomTransportType type)
00185 {
00186 if(type == DtLgr_Reliable)
00187 {
00188 setFlags(flags() | DtLgrFomDesc_Reliable);
00189 }
00190 else
00191 {
00192 setFlags(flags() & ~DtLgrFomDesc_Reliable);
00193 }
00194 }
00195
00196 inline DtLgrFomOrderType DtBaseInterClassDesc::orderType() const
00197 {
00198 if ( ( flags() & DtLgrFomDesc_TimeStamp ) != 0 )
00199 {
00200 return DtLgr_TimeStamp;
00201 }
00202 else
00203 {
00204 return DtLgr_Receive;
00205 }
00206 }
00207
00208 inline void DtBaseInterClassDesc::setOrderType(DtLgrFomOrderType type)
00209 {
00210 if(type == DtLgr_TimeStamp)
00211 {
00212 setFlags(flags() | DtLgrFomDesc_TimeStamp);
00213 }
00214 else
00215 {
00216 setFlags(flags() & ~DtLgrFomDesc_TimeStamp);
00217 }
00218 }
00219
00220 }
00221
00222 #endif //! DtHLA_1516
00223 #endif //! DtHLA
00224
00225 #endif //! DtBaseInterClassDesc_H_