00001
00045 #define _EXPORT_CCL_
00046
00047 #include "CigiBaseSpecEffDef.h"
00048 #include "CigiSwapping.h"
00049 #include "CigiExceptions.h"
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 CigiBaseSpecEffDef::CigiBaseSpecEffDef()
00061 {
00062
00063 }
00064
00065
00066
00067
00068
00069
00070 CigiBaseSpecEffDef::~CigiBaseSpecEffDef()
00071 {
00072
00073 }
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 int CigiBaseSpecEffDef::GetCnvt(CigiVersionID &CnvtVersion,
00085 CigiCnvtInfoType::Type &CnvtInfo)
00086 {
00087
00088 if(CnvtVersion.CigiMajorVersion > 2)
00089 {
00090 CnvtInfo.ProcID = CigiProcessType::ProcNone;
00091 CnvtInfo.CnvtPacketID = 0;
00092 }
00093 else
00094 {
00095 CnvtInfo.ProcID = CigiProcessType::ProcStd;
00096 CnvtInfo.CnvtPacketID = CIGI_SPEC_EFF_DEF_PACKET_ID_V2;
00097 }
00098
00099 return(CIGI_SUCCESS);
00100 }
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 int CigiBaseSpecEffDef::SetSeqDir(const SeqDirGrp SeqDirIn, bool bndchk)
00112 {
00113
00114 #ifndef CIGI_NO_BND_CHK
00115 if(bndchk && ((SeqDirIn < 0)||(SeqDirIn > 1)))
00116 {
00117 #ifndef CIGI_NO_EXCEPT
00118 throw CigiValueOutOfRangeException("SeqDir",(SeqDirGrp)SeqDirIn,0,1);
00119 #endif
00120 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00121 }
00122 #endif
00123
00124 SeqDir = SeqDirIn;
00125 return(CIGI_SUCCESS);
00126
00127 }
00128
00129
00130
00131
00132
00133 int CigiBaseSpecEffDef::SetXScale(const float XScaleIn, bool bndchk)
00134 {
00135
00136 #ifndef CIGI_NO_BND_CHK
00137 if(bndchk && ((XScaleIn < 0.0)||(XScaleIn > 512.0)))
00138 {
00139 #ifndef CIGI_NO_EXCEPT
00140 throw CigiValueOutOfRangeException("XScale",(float)XScaleIn,0.0,512.0);
00141 #endif
00142 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00143 }
00144 #endif
00145
00146 XScale = XScaleIn;
00147 return(CIGI_SUCCESS);
00148
00149 }
00150
00151
00152
00153
00154
00155 int CigiBaseSpecEffDef::SetYScale(const float YScaleIn, bool bndchk)
00156 {
00157
00158 #ifndef CIGI_NO_BND_CHK
00159 if(bndchk && ((YScaleIn < 0.0)||(YScaleIn > 512.0)))
00160 {
00161 #ifndef CIGI_NO_EXCEPT
00162 throw CigiValueOutOfRangeException("YScale",(float)YScaleIn,0.0,512.0);
00163 #endif
00164 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00165 }
00166 #endif
00167
00168 YScale = YScaleIn;
00169 return(CIGI_SUCCESS);
00170
00171 }
00172
00173
00174
00175
00176
00177 int CigiBaseSpecEffDef::SetZScale(const float ZScaleIn, bool bndchk)
00178 {
00179
00180 #ifndef CIGI_NO_BND_CHK
00181 if(bndchk && ((ZScaleIn < 0.0)||(ZScaleIn > 512.0)))
00182 {
00183 #ifndef CIGI_NO_EXCEPT
00184 throw CigiValueOutOfRangeException("ZScale",(float)ZScaleIn,0.0,512.0);
00185 #endif
00186 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00187 }
00188 #endif
00189
00190 ZScale = ZScaleIn;
00191 return(CIGI_SUCCESS);
00192
00193 }
00194
00195
00196
00197
00198
00199 int CigiBaseSpecEffDef::SetTimeScale(const float TimeScaleIn, bool bndchk)
00200 {
00201
00202 #ifndef CIGI_NO_BND_CHK
00203 if(bndchk && ((TimeScaleIn < 0.0)||(TimeScaleIn > 512.0)))
00204 {
00205 #ifndef CIGI_NO_EXCEPT
00206 throw CigiValueOutOfRangeException("TimeScale",(float)TimeScaleIn,0.0,512.0);
00207 #endif
00208 return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00209 }
00210 #endif
00211
00212 TimeScale = TimeScaleIn;
00213 return(CIGI_SUCCESS);
00214
00215 }
00216
00217