CigiBaseShortSymbolCtrl.h

Go to the documentation of this file.
00001 
00042 #if !defined(_CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_)
00043 #define _CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_
00044 
00045 
00046 #include "CigiBaseSymbolCtrl.h"
00047 
00048 // ====================================================================
00049 // preprocessor definitions
00050 // ====================================================================
00051 
00052 #define CIGI_SHORT_SYMBOL_CONTROL_PACKET_ID_V3_3 35
00053 #define CIGI_SHORT_SYMBOL_CONTROL_PACKET_SIZE_V3_3 16
00054 
00055 
00056 class CigiShortSymbolCtrlV3_3;
00057 
00058 
00059 //=========================================================
00062 class CIGI_SPEC CigiBaseShortSymbolCtrl :
00063    public CigiBasePacket
00064 {
00065 
00066    friend class CigiShortSymbolCtrlV3_3;
00067 
00068 public:
00069 
00070 
00071    //=========================================================
00075    enum DatumTypeGrp
00076    {
00077       None=0,
00078       SurfaceIdDatumType=1,
00079       ParentIdDatumType=2,
00080       LayerDatumType=3,
00081       FlashDutyCycleDatumType=4,
00082       FlashPeriodDatumType=5,
00083       UPositionDatumType=6,
00084       VPositionDatumType=7,
00085       RotationDatumType=8,
00086       ColorDatumType=9,
00087       ScaleUDatumType=10,
00088       ScaleVDatumType=11
00089    };
00090 
00091    //=========================================================
00095    typedef union DatumUnion {
00096       Cigi_uint32 UIntValue;
00097       float FloatValue;
00098    } DatumUnionType;
00099 
00100 
00101 
00102    //==> Management
00103 
00104    //=========================================================
00107    CigiBaseShortSymbolCtrl(void);
00108 
00109    //=========================================================
00112    virtual ~CigiBaseShortSymbolCtrl(void);
00113 
00114 
00115    //==> Buffer Packing/Unpacking
00116 
00117    //=========================================================
00128    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00129 
00130    //=========================================================
00140    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00141 
00142    //=========================================================
00154         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00155                        CigiCnvtInfoType::Type &CnvtInfo);
00156 
00157 
00158 
00159    //==> Accessing Member Variable Values functions
00160 
00161    //+> SymbolID
00162 
00163    //=========================================================
00170    int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true)
00171    {
00172       SymbolID = SymbolIDIn;
00173       return(CIGI_SUCCESS);
00174    }
00175 
00176    //=========================================================
00180    Cigi_uint16 GetSymbolID(void) const { return(SymbolID); }
00181    
00182 
00183    //+> SymbolState
00184 
00185    //=========================================================
00193    int SetSymbolState(const CigiBaseSymbolCtrl::SymbolStateGrp SymbolStateIn, bool bndchk=true);
00194 
00195    //=========================================================
00199    CigiBaseSymbolCtrl::SymbolStateGrp GetSymbolState(void) const { return(SymbolState); }
00200    
00201 
00202    //+> AttachState
00203 
00204    //=========================================================
00212    int SetAttachState(const CigiBaseSymbolCtrl::AttachStateGrp AttachStateIn, bool bndchk=true);
00213 
00214    //=========================================================
00218    CigiBaseSymbolCtrl::AttachStateGrp GetAttachState(void) const { return(AttachState); }
00219    
00220 
00221    //+> FlashCtrl
00222 
00223    //=========================================================
00231    int SetFlashCtrl(const CigiBaseSymbolCtrl::FlashCtrlGrp FlashCtrlIn, bool bndchk=true);
00232 
00233    //=========================================================
00237    CigiBaseSymbolCtrl::FlashCtrlGrp GetFlashCtrl(void) const { return(FlashCtrl); }
00238    
00239 
00240    //+> InheritColor
00241 
00242    //=========================================================
00250    int SetInheritColor(const CigiBaseSymbolCtrl::InheritColorGrp InheritColorIn, bool bndchk=true);
00251 
00252    //=========================================================
00257    CigiBaseSymbolCtrl::InheritColorGrp GetInheritColor(void) const { return(InheritColor); }
00258 
00259 
00260    //+> Getting Datum Type
00261 
00262    //=========================================================
00267    DatumTypeGrp GetDatumType(int DatumId) const;
00268 
00269 
00270    //+> Getting Datum
00271 
00272    //=========================================================
00277    Cigi_uint32 GetUIntDatum(int DatumId) const;
00278 
00279    //=========================================================
00294    int GetColorDatum(int DatumId,
00295                      Cigi_uint8 &RedValue,
00296                      Cigi_uint8 &GreenValue,
00297                      Cigi_uint8 &BlueValue,
00298                      Cigi_uint8 &AlphaValue,
00299                      bool bndchk=true);
00300 
00301    //=========================================================
00306    float GetFloatDatum(int DatumId) const;
00307 
00308 
00309    //+> Datum Entries
00310 
00311    //=========================================================
00319    int SetDatumNone(int DatumId, bool bndchk=true);
00320 
00321    //=========================================================
00330    int SetSurfaceID(int DatumId, const Cigi_uint16 SurfaceIDIn, bool bndchk=true);
00331 
00332    //=========================================================
00341    int SetParentSymbolID(int DatumId, const Cigi_uint16 ParentSymbolIDIn, bool bndchk=true);
00342 
00343    //=========================================================
00352    int SetLayer(int DatumId, const Cigi_uint8 LayerIn, bool bndchk=true);
00353 
00354    //=========================================================
00363    int SetFlashDutyCycle(int DatumId, const Cigi_uint8 FlashDutyCycleIn, bool bndchk=true);
00364 
00365    //=========================================================
00374    int SetFlashPeriod(int DatumId, const float FlashPeriodIn, bool bndchk=true);
00375 
00376    //=========================================================
00385    int SetUPosition(int DatumId, const float UPositionIn, bool bndchk=true);
00386 
00387    //=========================================================
00396    int SetVPosition(int DatumId, const float VPositionIn, bool bndchk=true);
00397 
00398    //=========================================================
00407    int SetRotation(int DatumId, const float RotationIn, bool bndchk=true);
00408 
00409    //=========================================================
00418    int SetScaleU(int DatumId, const float ScaleUIn, bool bndchk=true);
00419 
00420    //=========================================================
00429    int SetScaleV(int DatumId, const float ScaleVIn, bool bndchk=true);
00430 
00431 
00432 
00433    //+> Color
00434 
00435    //=========================================================
00450    int SetColor(int DatumId,
00451                 const Cigi_uint8 RedIn,
00452                 const Cigi_uint8 GreenIn,
00453                 const Cigi_uint8 BlueIn,
00454                 const Cigi_uint8 AlphaIn,
00455                 bool bndchk=true);
00456 
00457 
00458 
00459 protected:
00460 
00461    //==> Member variables
00462 
00463    //=========================================================
00467    Cigi_uint16 SymbolID;
00468 
00469    //=========================================================
00476    CigiBaseSymbolCtrl::SymbolStateGrp SymbolState;
00477 
00478    //=========================================================
00482    CigiBaseSymbolCtrl::AttachStateGrp AttachState;
00483 
00484    //=========================================================
00488    CigiBaseSymbolCtrl::FlashCtrlGrp FlashCtrl;
00489 
00490    //=========================================================
00495    CigiBaseSymbolCtrl::InheritColorGrp InheritColor;
00496 
00497    //=========================================================
00501    DatumTypeGrp DatumType[2];
00502 
00503    //=========================================================
00507    DatumUnionType Datum[2];
00508 
00509 };
00510 
00511 
00512 
00513 #endif   //  #if !defined(_CIGI_BASE_SHORT_SYMBOL_CTRL_INCLUDED_)
00514 

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