00001
00059 #if !defined(_CIGI_COMP_CTRL_V1_INCLUDED_)
00060 #define _CIGI_COMP_CTRL_V1_INCLUDED_
00061
00062 #include "CigiBaseCompCtrl.h"
00063
00064
00065 class CIGI_SPEC CigiCompCtrlV1 : public CigiBaseCompCtrl
00066 {
00067
00068 public:
00069
00070
00071
00072
00075 CigiCompCtrlV1();
00076
00077
00080 virtual ~CigiCompCtrlV1();
00081
00082
00083
00084
00085
00096 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const;
00097
00098
00108 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec);
00109
00110
00122 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00123 CigiCnvtInfoType::Type &CnvtInfo);
00124
00125
00126
00127
00128
00129
00130
00131
00138 int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00139 {
00140 EntityID = EntityIDIn;
00141
00142 if(CompAssoc == CigiBaseCompCtrl::Entity)
00143 InstanceID = EntityID;
00144
00145 return(CIGI_SUCCESS);
00146 }
00147
00148
00151 Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00152
00153
00154
00155
00156
00163 int SetViewID(const Cigi_uint8 ViewIDIn, bool bndchk=true);
00164
00165
00168 Cigi_uint8 GetViewID(void) const { return(ViewID); }
00169
00170
00171
00172
00173
00180 int SetCompState(const Cigi_uint16 CompStateIn, bool bndchk=true)
00181 {
00182 CompState = CompStateIn;
00183 return(CIGI_SUCCESS);
00184 }
00185
00186
00189 Cigi_uint16 GetCompState(void) const { return(CompState); }
00190
00191
00192
00193
00194
00204 int SetCompAssoc(const CompAssocGrp CompAssocIn, bool bndchk=true);
00205
00206
00209 CompAssocGrp GetCompAssoc(void) const { return(CompAssoc); }
00210
00211
00212
00213
00214
00223 int SetCompData(const Cigi_uint8 CompDataIn,
00224 const unsigned int Word,
00225 const BytePos Pos,
00226 bool bndchk=true);
00227
00228
00237 int SetCompData(const Cigi_int8 CompDataIn,
00238 const unsigned int Word,
00239 const BytePos Pos,
00240 bool bndchk=true);
00241
00242
00251 int SetCompData(const Cigi_uint16 CompDataIn,
00252 const unsigned int Word,
00253 const HalfWordPos Pos,
00254 bool bndchk=true);
00255
00256
00265 int SetCompData(const Cigi_int16 CompDataIn,
00266 const unsigned int Word,
00267 const HalfWordPos Pos,
00268 bool bndchk=true);
00269
00270
00278 int SetCompData(const Cigi_uint32 CompDataIn,
00279 const unsigned int Word,
00280 bool bndchk=true);
00281
00282
00290 int SetCompData(const Cigi_int32 CompDataIn,
00291 const unsigned int Word,
00292 bool bndchk=true);
00293
00294
00302 int SetCompData(const float CompDataIn,
00303 const unsigned int Word,
00304 bool bndchk=true);
00305
00306
00314 int SetCompData(const Cigi_uint64 CompDataIn,
00315 const unsigned int Pos,
00316 bool bndchk=true);
00317
00318
00326 int SetCompData(const double CompDataIn,
00327 const unsigned int Pos,
00328 bool bndchk=true);
00329
00330
00331
00337 Cigi_uint8 GetUCharCompData(const unsigned int Word,
00338 const BytePos Pos);
00339
00340
00346 Cigi_int8 GetCharCompData(const unsigned int Word,
00347 const BytePos Pos);
00348
00349
00355 Cigi_uint16 GetUShortCompData(const unsigned int Word,
00356 const HalfWordPos Pos);
00357
00358
00364 Cigi_int16 GetShortCompData(const unsigned int Word,
00365 const HalfWordPos Pos);
00366
00367
00372 Cigi_uint32 GetULongCompData(const unsigned int Word);
00373
00374
00379 Cigi_int32 GetLongCompData(const unsigned int Word);
00380
00381
00386 float GetFloatCompData(const unsigned int Word);
00387
00388
00393 Cigi_uint64 GetI64CompData(const unsigned int Pos);
00394
00395
00400 double GetDoubleCompData(const unsigned int Pos);
00401
00402
00403
00404 protected:
00405
00406
00407 static const int CompClassCnvtSz = 3;
00408 static const CompClassV3Grp CompClassV1xV3[CompClassCnvtSz];
00409
00410
00411 };
00412
00413 #endif // #if !defined(_CIGI_COMP_CTRL_V1_INCLUDED_)