CigiBaseLosSegReq.cpp

Go to the documentation of this file.
00001 
00045 #define _EXPORT_CCL_
00046 
00047 #include "CigiBaseLosSegReq.h"
00048 #include "CigiSwapping.h"
00049 #include "CigiExceptions.h"
00050 
00051 
00052 // ====================================================================
00053 // Construction/Destruction
00054 // ====================================================================
00055 
00056 
00057 // ================================================
00058 // CigiBaseLosSegReq
00059 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00060 CigiBaseLosSegReq::CigiBaseLosSegReq()
00061 {
00062 
00063 }
00064 
00065 
00066 
00067 // ================================================
00068 // ~CigiBaseLosSegReq
00069 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00070 CigiBaseLosSegReq::~CigiBaseLosSegReq()
00071 {
00072 
00073 }
00074 
00075 
00076 // ====================================================================
00077 // Conversion Control
00078 // ====================================================================
00079 
00080 
00081 // ================================================
00082 // GetCnvt
00083 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00084 int CigiBaseLosSegReq::GetCnvt(CigiVersionID &CnvtVersion,
00085                              CigiCnvtInfoType::Type &CnvtInfo)
00086 {
00087    CnvtInfo.ProcID = CigiProcessType::ProcStd;
00088 
00089    // Note: CIGI_LOS_SEG_REQ_PACKET_ID_V1 &
00090    // CIGI_LOS_SEG_REQ_PACKET_ID_V2 are the same
00091    if(CnvtVersion.CigiMajorVersion < 3)
00092       CnvtInfo.CnvtPacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V2;
00093    else
00094       CnvtInfo.CnvtPacketID = CIGI_LOS_SEG_REQ_PACKET_ID_V3;
00095 
00096    return(CIGI_SUCCESS);
00097 }
00098 
00099 
00100 // ====================================================================
00101 // Accessors
00102 // ====================================================================
00103 
00104 
00105 // ================================================
00106 // SrcLat
00107 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00108 int CigiBaseLosSegReq::SetSrcLat(const double SrcLatIn, bool bndchk)
00109 {
00110 
00111 #ifndef CIGI_NO_BND_CHK
00112    if(bndchk && ((SrcLatIn < -90.0)||(SrcLatIn > 90.0)))
00113    {
00114 #ifndef CIGI_NO_EXCEPT
00115       throw CigiValueOutOfRangeException("SrcLat",(double)SrcLatIn,-90.0,90.0);
00116 #endif
00117       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00118    }
00119 #endif
00120 
00121    SrcXLat = SrcLatIn;
00122    return(CIGI_SUCCESS);
00123 
00124 }
00125 
00126 
00127 // ================================================
00128 // SrcLon
00129 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00130 int CigiBaseLosSegReq::SetSrcLon(const double SrcLonIn, bool bndchk)
00131 {
00132 
00133 #ifndef CIGI_NO_BND_CHK
00134    if(bndchk && ((SrcLonIn < -180.0)||(SrcLonIn > 180.0)))
00135    {
00136 #ifndef CIGI_NO_EXCEPT
00137       throw CigiValueOutOfRangeException("SrcLon",(double)SrcLonIn,-180.0,180.0);
00138 #endif
00139       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00140    }
00141 #endif
00142 
00143    SrcYLon = SrcLonIn;
00144    return(CIGI_SUCCESS);
00145 
00146 }
00147 
00148 
00149 // ================================================
00150 // DstLat
00151 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00152 int CigiBaseLosSegReq::SetDstLat(const double DstLatIn, bool bndchk)
00153 {
00154 
00155 #ifndef CIGI_NO_BND_CHK
00156    if(bndchk && ((DstLatIn < -90.0)||(DstLatIn > 90.0)))
00157    {
00158 #ifndef CIGI_NO_EXCEPT
00159       throw CigiValueOutOfRangeException("DstLat",(double)DstLatIn,-90.0,90.0);
00160 #endif
00161       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00162    }
00163 #endif
00164 
00165    DstXLat = DstLatIn;
00166    return(CIGI_SUCCESS);
00167 
00168 }
00169 
00170 
00171 // ================================================
00172 // DstLon
00173 // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
00174 int CigiBaseLosSegReq::SetDstLon(const double DstLonIn, bool bndchk)
00175 {
00176 
00177 #ifndef CIGI_NO_BND_CHK
00178    if(bndchk && ((DstLonIn < -180.0)||(DstLonIn > 180.0)))
00179    {
00180 #ifndef CIGI_NO_EXCEPT
00181       throw CigiValueOutOfRangeException("DstLon",(double)DstLonIn,-180.0,180.0);
00182 #endif
00183       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00184    }
00185 #endif
00186 
00187    DstYLon = DstLonIn;
00188    return(CIGI_SUCCESS);
00189 
00190 }
00191 
00192 

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