00001
00046 #define _EXPORT_CCL_
00047
00048 #include "CigiBasePositionReq.h"
00049 #include "CigiSwapping.h"
00050 #include "CigiExceptions.h"
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 CigiBasePositionReq::CigiBasePositionReq()
00062 {
00063
00064 }
00065
00066
00067
00068
00069
00070
00071 CigiBasePositionReq::~CigiBasePositionReq()
00072 {
00073
00074 }
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 int CigiBasePositionReq::GetCnvt(CigiVersionID &CnvtVersion,
00086 CigiCnvtInfoType::Type &CnvtInfo)
00087 {
00088 if(CnvtVersion.CigiMajorVersion < 3)
00089 {
00090 CnvtInfo.ProcID = CigiProcessType::ProcNone;
00091 CnvtInfo.CnvtPacketID = 0;
00092 }
00093 else
00094 {
00095 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00096 CnvtInfo.CnvtPacketID = CIGI_POSITION_REQ_PACKET_ID_V3;
00097 }
00098
00099 return(CIGI_SUCCESS);
00100 }
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 int CigiBasePositionReq::SetUpdateMode(const UpdateModeGrp UpdateModeIn, bool bndchk)
00112 {
00113
00114 #ifndef CIGI_NO_BND_CHK
00115 if(bndchk && ((UpdateModeIn < 0)||(UpdateModeIn > 1)))
00116 {
00117 #ifndef CIGI_NO_EXCEPT
00118 throw CigiValueOutOfRangeException("UpdateMode",(UpdateModeGrp)UpdateModeIn,0,1);
00119 #endif
00120 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00121 }
00122 #endif
00123
00124 UpdateMode = UpdateModeIn;
00125 return(CIGI_SUCCESS);
00126
00127 }
00128
00129
00130
00131
00132
00133 int CigiBasePositionReq::SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk)
00134 {
00135
00136 #ifndef CIGI_NO_BND_CHK
00137 if(bndchk && ((ObjectClassIn < 0)||(ObjectClassIn > 5)))
00138 {
00139 #ifndef CIGI_NO_EXCEPT
00140 throw CigiValueOutOfRangeException("ObjectClass",(ObjectClassGrp)ObjectClassIn,0,5);
00141 #endif
00142 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00143 }
00144 #endif
00145
00146 ObjectClass = ObjectClassIn;
00147 return(CIGI_SUCCESS);
00148
00149 }
00150
00151
00152
00153
00154
00155 int CigiBasePositionReq::SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk)
00156 {
00157
00158 #ifndef CIGI_NO_BND_CHK
00159 if(bndchk && ((CoordSysIn < 0)||(CoordSysIn > 2)))
00160 {
00161 #ifndef CIGI_NO_EXCEPT
00162 throw CigiValueOutOfRangeException("CoordSys",(CoordSysGrp)CoordSysIn,0,2);
00163 #endif
00164 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00165 }
00166 #endif
00167
00168 CoordSys = CoordSysIn;
00169 return(CIGI_SUCCESS);
00170
00171 }
00172
00173