CigiBaseTerrestrialSurfaceCtrl.cpp

Go to the documentation of this file.
00001 
00049 #define _EXPORT_CCL_
00050 
00051 #include "CigiBaseTerrestrialSurfaceCtrl.h"
00052 #include "CigiSwapping.h"
00053 #include "CigiExceptions.h"
00054 
00055 
00056 // ====================================================================
00057 // Construction/Destruction
00058 // ====================================================================
00059 
00060 
00061 // ================================================
00062 // CigiBaseTerrestrialSurfaceCtrl
00063 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00064 CigiBaseTerrestrialSurfaceCtrl::CigiBaseTerrestrialSurfaceCtrl()
00065 {
00066 
00067 }
00068 
00069 
00070 
00071 // ================================================
00072 // ~CigiBaseTerrestrialSurfaceCtrl
00073 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00074 CigiBaseTerrestrialSurfaceCtrl::~CigiBaseTerrestrialSurfaceCtrl()
00075 {
00076 
00077 }
00078 
00079 
00080 // ====================================================================
00081 // Conversion Control
00082 // ====================================================================
00083 
00084 
00085 // ================================================
00086 // GetCnvt
00087 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00088 int CigiBaseTerrestrialSurfaceCtrl::GetCnvt(CigiVersionID &CnvtVersion,
00089                                             CigiCnvtInfoType::Type &CnvtInfo)
00090 {
00091    if(CnvtVersion.CigiMajorVersion < 3)
00092    {
00093       CnvtInfo.ProcID = CigiProcessType::ProcNone;
00094       CnvtInfo.CnvtPacketID = 0;
00095    }
00096    else
00097    {
00098       CnvtInfo.ProcID = CigiProcessType::ProcStd;
00099       CnvtInfo.CnvtPacketID = CIGI_TERRESTRIAL_SURFACE_CTRL_PACKET_ID_V3;
00100    }
00101 
00102    return(CIGI_SUCCESS);
00103 }
00104 
00105 
00106 // ====================================================================
00107 // Accessors
00108 // ====================================================================
00109 
00110 
00111 // ================================================
00112 // Scope
00113 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00114 int CigiBaseTerrestrialSurfaceCtrl::SetScope(const ScopeGrp ScopeIn, bool bndchk)
00115 {
00116 
00117 #ifndef CIGI_NO_BND_CHK
00118    if(bndchk && ((ScopeIn < 0)||(ScopeIn > 2)))
00119    {
00120 #ifndef CIGI_NO_EXCEPT
00121       throw CigiValueOutOfRangeException("Scope",(ScopeGrp)ScopeIn,0,2);
00122 #endif
00123       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00124    }
00125 #endif
00126 
00127    Scope = ScopeIn;
00128    return(CIGI_SUCCESS);
00129 
00130 }
00131 
00132 
00133 // ================================================
00134 // Severity
00135 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00136 int CigiBaseTerrestrialSurfaceCtrl::SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk)
00137 {
00138 
00139 #ifndef CIGI_NO_BND_CHK
00140    if(bndchk && ((SeverityIn < 0)||(SeverityIn > 31)))
00141    {
00142 #ifndef CIGI_NO_EXCEPT
00143       throw CigiValueOutOfRangeException("Severity",(Cigi_uint8)SeverityIn,0,31);
00144 #endif
00145       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00146    }
00147 #endif
00148 
00149    Severity = SeverityIn;
00150    return(CIGI_SUCCESS);
00151 
00152 }
00153 
00154 
00155 // ================================================
00156 // Coverage
00157 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00158 int CigiBaseTerrestrialSurfaceCtrl::SetCoverage(const Cigi_uint8 CoverageIn, bool bndchk)
00159 {
00160 
00161 #ifndef CIGI_NO_BND_CHK
00162    if(bndchk && ((CoverageIn < 0)||(CoverageIn > 100)))
00163    {
00164 #ifndef CIGI_NO_EXCEPT
00165       throw CigiValueOutOfRangeException("Coverage",(Cigi_uint8)CoverageIn,0,100);
00166 #endif
00167       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00168    }
00169 #endif
00170 
00171    Coverage = CoverageIn;
00172    return(CIGI_SUCCESS);
00173 
00174 }
00175 
00176 

Generated on Wed Apr 29 08:59:57 2009 for CCL by  doxygen 1.4.7