CigiBaseEnvRgnCtrl.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_ENV_RGN_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_ENV_RGN_CTRL_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_ENV_RGN_CTRL_PACKET_ID_V3 11
00065 #define CIGI_ENV_RGN_CTRL_PACKET_SIZE_V3 48
00066 
00067 
00068 class CigiEnvRgnCtrlV3;
00069 
00070 
00071 class CIGI_SPEC CigiBaseEnvRgnCtrl : public CigiBasePacket
00072 {
00073 
00074 friend class CigiEnvRgnCtrlV3;
00075 
00076 public:
00077 
00078    //=========================================================
00081    enum RgnStateGrp
00082    {
00083       Inactive=0,
00084       Active=1,
00085       Destroyed=2
00086    };
00087 
00088    //=========================================================
00091    enum MergeCtrlGrp
00092    {
00093       UseLast=0,
00094       Merge=1
00095    };
00096 
00097 
00098 
00099 
00100    //==> Management
00101 
00102    //=========================================================
00105    CigiBaseEnvRgnCtrl();
00106 
00107    //=========================================================
00110    virtual ~CigiBaseEnvRgnCtrl();
00111 
00112 
00113    //==> Buffer Packing/Unpacking
00114 
00115    //=========================================================
00126    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00127 
00128    //=========================================================
00138    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00139 
00140    //=========================================================
00152         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00153                        CigiCnvtInfoType::Type &CnvtInfo);
00154 
00155 
00156 
00157    //==> Accessing Member Variable Values functions
00158 
00159    //+> RegionID
00160 
00161    //=========================================================
00168    int SetRegionID(const Cigi_uint16 RegionIDIn, bool bndchk=true)
00169    {
00170       RegionID = RegionIDIn;
00171       return(CIGI_SUCCESS);
00172    }
00173 
00174    //=========================================================
00177    Cigi_uint16 GetRegionID(void) const { return(RegionID); }
00178 
00179 
00180    //+> RgnState
00181 
00182    //=========================================================
00192    int SetRgnState(const RgnStateGrp RgnStateIn, bool bndchk=true);
00193 
00194    //=========================================================
00197    RgnStateGrp GetRgnState(void) const { return(RgnState); }
00198 
00199 
00200    //+> WeatherProp
00201 
00202    //=========================================================
00209    int SetWeatherProp(const MergeCtrlGrp WeatherPropIn, bool bndchk=true);
00210 
00211    //=========================================================
00214    MergeCtrlGrp GetWeatherProp(void) const { return(WeatherProp); }
00215 
00216 
00217    //+> Aerosol
00218 
00219    //=========================================================
00226    int SetAerosol(const MergeCtrlGrp AerosolIn, bool bndchk=true);
00227 
00228    //=========================================================
00231    MergeCtrlGrp GetAerosol(void) const { return(Aerosol); }
00232 
00233 
00234    //+> MaritimeSurface
00235 
00236    //=========================================================
00243    int SetMaritimeSurface(const MergeCtrlGrp MaritimeSurfaceIn, bool bndchk=true);
00244 
00245    //=========================================================
00248    MergeCtrlGrp GetMaritimeSurface(void) const { return(MaritimeSurface); }
00249 
00250 
00251    //+> TerrestrialSurface
00252 
00253    //=========================================================
00260    int SetTerrestrialSurface(const MergeCtrlGrp TerrestrialSurfaceIn, bool bndchk=true);
00261 
00262    //=========================================================
00265    MergeCtrlGrp GetTerrestrialSurface(void) const { return(TerrestrialSurface); }
00266 
00267 
00268    //+> Lat
00269 
00270    //=========================================================
00277    int SetLat(const double LatIn, bool bndchk=true);
00278 
00279    //=========================================================
00282    double GetLat(void) const { return(Lat); }
00283 
00284 
00285    //+> Lon
00286 
00287    //=========================================================
00294    int SetLon(const double LonIn, bool bndchk=true);
00295 
00296    //=========================================================
00299    double GetLon(void) const { return(Lon); }
00300 
00301 
00302    //+> XSize
00303 
00304    //=========================================================
00311    int SetXSize(const float XSizeIn, bool bndchk=true)
00312    {
00313       XSize = XSizeIn;
00314       return(CIGI_SUCCESS);
00315    }
00316 
00317    //=========================================================
00320    float GetXSize(void) const { return(XSize); }
00321 
00322 
00323    //+> YSize
00324 
00325    //=========================================================
00332    int SetYSize(const float YSizeIn, bool bndchk=true)
00333    {
00334       YSize = YSizeIn;
00335       return(CIGI_SUCCESS);
00336    }
00337 
00338    //=========================================================
00341    float GetYSize(void) const { return(YSize); }
00342 
00343 
00344    //+> CornerRadius
00345 
00346    //=========================================================
00353    int SetCornerRadius(const float CornerRadiusIn, bool bndchk=true)
00354    {
00355       CornerRadius = CornerRadiusIn;
00356       return(CIGI_SUCCESS);
00357    }
00358 
00359    //=========================================================
00362    float GetCornerRadius(void) const { return(CornerRadius); }
00363 
00364 
00365    //+> Rotation
00366 
00367    //=========================================================
00374    int SetRotation(const float RotationIn, bool bndchk=true);
00375 
00376    //=========================================================
00379    float GetRotation(void) const { return(Rotation); }
00380 
00381 
00382    //+> Transition
00383 
00384    //=========================================================
00391    int SetTransition(const float TransitionIn, bool bndchk=true)
00392    {
00393       Transition = TransitionIn;
00394       return(CIGI_SUCCESS);
00395    }
00396 
00397    //=========================================================
00400    float GetTransition(void) const { return(Transition); }
00401 
00402 
00403 
00404 protected:
00405 
00406    //==> Member variables
00407 
00408    //=========================================================
00412    Cigi_uint16 RegionID;
00413 
00414    //=========================================================
00421    RgnStateGrp RgnState;
00422 
00423    //=========================================================
00427    MergeCtrlGrp WeatherProp;
00428 
00429    //=========================================================
00433    MergeCtrlGrp Aerosol;
00434 
00435    //=========================================================
00439    MergeCtrlGrp MaritimeSurface;
00440 
00441    //=========================================================
00445    MergeCtrlGrp TerrestrialSurface;
00446 
00447    //=========================================================
00451    double Lat;
00452 
00453    //=========================================================
00457    double Lon;
00458 
00459    //=========================================================
00463    float XSize;
00464 
00465    //=========================================================
00469    float YSize;
00470 
00471    //=========================================================
00475    float CornerRadius;
00476 
00477    //=========================================================
00481    float Rotation;
00482 
00483    //=========================================================
00487    float Transition;
00488 
00489 
00490 };
00491 
00492 #endif // #if !defined(_CIGI_BASE_ENV_RGN_CTRL_INCLUDED_)

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