CigiBaseSymbolCtrl.h

Go to the documentation of this file.
00001 
00042 #if !defined(_CIGI_BASE_SYMBOL_CTRL_INCLUDED_)
00043 #define _CIGI_BASE_SYMBOL_CTRL_INCLUDED_
00044 
00045 
00046 #include "CigiBasePacket.h"
00047 
00048 // ====================================================================
00049 // preprocessor definitions
00050 // ====================================================================
00051 
00052 #define CIGI_SYMBOL_CONTROL_PACKET_ID_V3_3 34
00053 #define CIGI_SYMBOL_CONTROL_PACKET_SIZE_V3_3 40
00054 
00055 
00056 class CigiSymbolCtrlV3_3;
00057 
00058 
00059 //=========================================================
00062 class CIGI_SPEC CigiBaseSymbolCtrl :
00063    public CigiBasePacket
00064 {
00065 
00066    friend class CigiSymbolCtrlV3_3;
00067 
00068 public:
00069 
00070    //=========================================================
00073    enum SymbolStateGrp
00074    {
00075       Hidden=0,
00076       Visible=1,
00077       Destroyed=2
00078    };
00079 
00080    //=========================================================
00083    enum AttachStateGrp
00084    {
00085       Detach=0,
00086       Attach=1
00087    };
00088 
00089    //=========================================================
00092    enum FlashCtrlGrp
00093    {
00094       Continue=0,
00095       Reset=1
00096    };
00097 
00098    //=========================================================
00101    enum InheritColorGrp
00102    {
00103       NotInherit=0,
00104       Inherit=1
00105    };
00106 
00107 
00108 
00109    //==> Management
00110 
00111    //=========================================================
00114    CigiBaseSymbolCtrl(void);
00115 
00116    //=========================================================
00119    virtual ~CigiBaseSymbolCtrl(void);
00120 
00121 
00122    //==> Buffer Packing/Unpacking
00123 
00124    //=========================================================
00135    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00136 
00137    //=========================================================
00147    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00148 
00149    //=========================================================
00161         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00162                        CigiCnvtInfoType::Type &CnvtInfo);
00163 
00164 
00165 
00166    //==> Accessing Member Variable Values functions
00167 
00168    //+> SymbolID
00169 
00170    //=========================================================
00177    int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true)
00178    {
00179       SymbolID = SymbolIDIn;
00180       return(CIGI_SUCCESS);
00181    }
00182 
00183    //=========================================================
00187    Cigi_uint16 GetSymbolID(void) const { return(SymbolID); }
00188    
00189 
00190    //+> SymbolState
00191 
00192    //=========================================================
00200    int SetSymbolState(const SymbolStateGrp SymbolStateIn, bool bndchk=true);
00201 
00202    //=========================================================
00207    SymbolStateGrp GetSymbolState(void) const { return(SymbolState); }
00208    
00209 
00210    //+> AttachState
00211 
00212    //=========================================================
00220    int SetAttachState(const AttachStateGrp AttachStateIn, bool bndchk=true);
00221 
00222    //=========================================================
00226    AttachStateGrp GetAttachState(void) const { return(AttachState); }
00227    
00228 
00229    //+> FlashCtrl
00230 
00231    //=========================================================
00239    int SetFlashCtrl(const FlashCtrlGrp FlashCtrlIn, bool bndchk=true);
00240 
00241    //=========================================================
00245    FlashCtrlGrp GetFlashCtrl(void) const { return(FlashCtrl); }
00246    
00247 
00248    //+> InheritColor
00249 
00250    //=========================================================
00258    int SetInheritColor(const InheritColorGrp InheritColorIn, bool bndchk=true);
00259 
00260    //=========================================================
00265    InheritColorGrp GetInheritColor(void) const { return(InheritColor); }
00266    
00267 
00268    //+> ParentSymbolID
00269 
00270    //=========================================================
00278    int SetParentSymbolID(const Cigi_uint16 ParentSymbolIDIn, bool bndchk=true)
00279    {
00280       ParentSymbolID = ParentSymbolIDIn;
00281       return(CIGI_SUCCESS);
00282    }
00283 
00284    //=========================================================
00288    Cigi_uint16 GetParentSymbolID(void) const { return(ParentSymbolID); }
00289    
00290 
00291    //+> SurfaceID
00292 
00293    //=========================================================
00301    int SetSurfaceID(const Cigi_uint16 SurfaceIDIn, bool bndchk=true)
00302    {
00303       SurfaceID = SurfaceIDIn;
00304       return(CIGI_SUCCESS);
00305    }
00306 
00307    //=========================================================
00311    Cigi_uint16 GetSurfaceID(void) const { return(SurfaceID); }
00312    
00313 
00314    //+> Layer
00315 
00316    //=========================================================
00324    int SetLayer(const Cigi_uint8 LayerIn, bool bndchk=true)
00325    {
00326       Layer = LayerIn;
00327       return(CIGI_SUCCESS);
00328    }
00329 
00330    //=========================================================
00335    Cigi_uint8 GetLayer(void) const { return(Layer); }
00336    
00337 
00338    //+> FlashDutyCycle
00339 
00340    //=========================================================
00348    int SetFlashDutyCycle(const Cigi_uint8 FlashDutyCycleIn, bool bndchk=true);
00349 
00350    //=========================================================
00355    Cigi_uint8 GetFlashDutyCycle(void) const { return(FlashDutyCycle); }
00356    
00357 
00358    //+> FlashPeriod
00359 
00360    //=========================================================
00368    int SetFlashPeriod(const float FlashPeriodIn, bool bndchk=true)
00369    {
00370       FlashPeriod = FlashPeriodIn;
00371       return(CIGI_SUCCESS);
00372    }
00373 
00374    //=========================================================
00379    float GetFlashPeriod(void) const { return(FlashPeriod); }
00380    
00381 
00382    //+> UPosition
00383 
00384    //=========================================================
00392    int SetUPosition(const float UPositionIn, bool bndchk=true)
00393    {
00394       UPosition = UPositionIn;
00395       return(CIGI_SUCCESS);
00396    }
00397 
00398    //=========================================================
00403    float GetUPosition(void) const { return(UPosition); }
00404    
00405 
00406    //+> VPosition
00407 
00408    //=========================================================
00416    int SetVPosition(const float VPositionIn, bool bndchk=true)
00417    {
00418       VPosition = VPositionIn;
00419       return(CIGI_SUCCESS);
00420    }
00421 
00422    //=========================================================
00427    float GetVPosition(void) const { return(VPosition); }
00428    
00429 
00430    //+> Rotation
00431 
00432    //=========================================================
00440    int SetRotation(const float RotationIn, bool bndchk=true)
00441    {
00442       Rotation = RotationIn;
00443       return(CIGI_SUCCESS);
00444    }
00445 
00446    //=========================================================
00450    float GetRotation(void) const { return(Rotation); }
00451 
00452 
00453    //+> Color
00454 
00455    //=========================================================
00465    int SetColor(const Cigi_uint8 RedIn,
00466                 const Cigi_uint8 GreenIn,
00467                 const Cigi_uint8 BlueIn,
00468                 const Cigi_uint8 AlphaIn,
00469                 bool bndchk=true)
00470    {
00471       Red = RedIn;
00472       Green = GreenIn;
00473       Blue = BlueIn;
00474       Alpha = AlphaIn;
00475 
00476       return(CIGI_SUCCESS);
00477    }
00478 
00479    //=========================================================
00493    int GetColorDatum(Cigi_uint8 &RedValue,
00494                      Cigi_uint8 &GreenValue,
00495                      Cigi_uint8 &BlueValue,
00496                      Cigi_uint8 &AlphaValue,
00497                      bool bndchk=true)
00498    {
00499       RedValue = Red;
00500       GreenValue = Green;
00501       BlueValue = Blue;
00502       AlphaValue = Alpha;
00503 
00504       return(CIGI_SUCCESS);
00505    }
00506 
00507 
00508    //+> Red
00509 
00510    //=========================================================
00517    int SetRed(const Cigi_uint8 RedIn, bool bndchk=true)
00518    {
00519       Red = RedIn;
00520       return(CIGI_SUCCESS);
00521    }
00522 
00523    //=========================================================
00527    Cigi_uint8 GetRed(void) const { return(Red); }
00528    
00529 
00530    //+> Green
00531 
00532    //=========================================================
00539    int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true)
00540    {
00541       Green = GreenIn;
00542       return(CIGI_SUCCESS);
00543    }
00544 
00545    //=========================================================
00549    Cigi_uint8 GetGreen(void) const { return(Green); }
00550    
00551 
00552    //+> Blue
00553 
00554    //=========================================================
00561    int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true)
00562    {
00563       Blue = BlueIn;
00564       return(CIGI_SUCCESS);
00565    }
00566 
00567    //=========================================================
00571    Cigi_uint8 GetBlue(void) const { return(Blue); }
00572    
00573 
00574    //+> Alpha
00575 
00576    //=========================================================
00583    int SetAlpha(const Cigi_uint8 AlphaIn, bool bndchk=true)
00584    {
00585       Alpha = AlphaIn;
00586       return(CIGI_SUCCESS);
00587    }
00588 
00589    //=========================================================
00593    Cigi_uint8 GetAlpha(void) const { return(Alpha); }
00594    
00595 
00596    //+> ScaleU
00597 
00598    //=========================================================
00606    int SetScaleU(const float ScaleUIn, bool bndchk=true)
00607    {
00608       ScaleU = ScaleUIn;
00609       return(CIGI_SUCCESS);
00610    }
00611 
00612    //=========================================================
00617    float GetScaleU(void) const { return(ScaleU); }
00618    
00619 
00620    //+> ScaleV
00621 
00622    //=========================================================
00630    int SetScaleV(const float ScaleVIn, bool bndchk=true)
00631    {
00632       ScaleV = ScaleVIn;
00633       return(CIGI_SUCCESS);
00634    }
00635 
00636    //=========================================================
00641    float GetScaleV(void) const { return(ScaleV); }
00642 
00643 
00644 
00645 protected:
00646 
00647    //==> Member variables
00648 
00649    //=========================================================
00653    Cigi_uint16 SymbolID;
00654 
00655    //=========================================================
00662    SymbolStateGrp SymbolState;
00663 
00664    //=========================================================
00668    AttachStateGrp AttachState;
00669 
00670    //=========================================================
00674    FlashCtrlGrp FlashCtrl;
00675 
00676    //=========================================================
00681    InheritColorGrp InheritColor;
00682 
00683    //=========================================================
00687    Cigi_uint16 ParentSymbolID;
00688 
00689    //=========================================================
00693    Cigi_uint16 SurfaceID;
00694 
00695    //=========================================================
00699    Cigi_uint8 Layer;
00700 
00701    //=========================================================
00705    Cigi_uint8 FlashDutyCycle;
00706 
00707    //=========================================================
00711    float FlashPeriod;
00712 
00713    //=========================================================
00718    float UPosition;
00719 
00720    //=========================================================
00725    float VPosition;
00726 
00727    //=========================================================
00731    float Rotation;
00732 
00733    //=========================================================
00737    Cigi_uint8 Red;
00738 
00739    //=========================================================
00743    Cigi_uint8 Green;
00744 
00745    //=========================================================
00749    Cigi_uint8 Blue;
00750 
00751    //=========================================================
00755    Cigi_uint8 Alpha;
00756 
00757    //=========================================================
00762    float ScaleU;
00763 
00764    //=========================================================
00769    float ScaleV;
00770 
00771 
00772 
00773 
00774 };
00775 
00776 
00777 
00778 #endif   //  #if !defined(_CIGI_BASE_SYMBOL_CTRL_INCLUDED_)
00779 

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