00001 00053 #define _EXPORT_CCL_ 00054 00055 #include "CigiBaseIGCtrl.h" 00056 #include "CigiExceptions.h" 00057 #include "CigiSwapping.h" 00058 00059 // ==================================================================== 00060 // Construction/Destruction 00061 // ==================================================================== 00062 00063 // ================================================ 00064 // CigiBaseIGCtrl 00065 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 00066 CigiBaseIGCtrl::CigiBaseIGCtrl() 00067 { 00068 00069 } 00070 00071 // ================================================ 00072 // ~CigiBaseIGCtrl 00073 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 00074 CigiBaseIGCtrl::~CigiBaseIGCtrl() 00075 { 00076 00077 } 00078 00079 00080 // ==================================================================== 00081 // Conversion Control 00082 // ==================================================================== 00083 00084 00085 // ================================================ 00086 // GetCnvt 00087 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 00088 int CigiBaseIGCtrl::GetCnvt(CigiVersionID &CnvtVersion, 00089 CigiCnvtInfoType::Type &CnvtInfo) 00090 { 00091 CnvtInfo.ProcID = CigiProcessType::ProcIGCtrl; 00092 00093 // All versions of this packet have the same packet id number 00094 CnvtInfo.CnvtPacketID = CIGI_IG_CTRL_PACKET_ID_V1; 00095 00096 return(CIGI_SUCCESS); 00097 } 00098 00099 00100 00101 00102 // ==================================================================== 00103 // Accessors 00104 // ==================================================================== 00105 00106 00107 00108 // ================================================ 00109 // SetDatabaseID 00110 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 00111 int CigiBaseIGCtrl::SetDatabaseID(const Cigi_int8 DataBaseIDIn, bool bndchk) 00112 { 00113 00114 #ifndef CIGI_NO_BND_CHK 00115 if(bndchk && ((DataBaseIDIn < 0)||(DataBaseIDIn > 127))) 00116 { 00117 #ifndef CIGI_NO_EXCEPT 00118 throw CigiValueOutOfRangeException("DataBaseID",DataBaseIDIn,0,127); 00119 #endif 00120 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00121 } 00122 #endif 00123 00124 DatabaseID = DataBaseIDIn; 00125 00126 return(CIGI_SUCCESS); 00127 00128 } 00129 00130 00131 // ================================================ 00132 // SetIGMode 00133 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 00134 int CigiBaseIGCtrl::SetIGMode(IGModeGrp IGModeIn, bool bndchk) 00135 { 00136 00137 #ifndef CIGI_NO_BND_CHK 00138 if(bndchk && ((IGModeIn < 0)||(IGModeIn > 2))) 00139 { 00140 #ifndef CIGI_NO_EXCEPT 00141 throw CigiValueOutOfRangeException("IGMode",IGModeIn,0,2); 00142 #endif 00143 return(CIGI_ERROR_VALUE_OUT_OF_RANGE); 00144 } 00145 #endif 00146 00147 IGMode = IGModeIn; 00148 00149 return(CIGI_SUCCESS); 00150 00151 }