CigiBaseSpecEffDef.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_SPEC_EFF_DEF_INCLUDED_)
00056 #define _CIGI_BASE_SPEC_EFF_DEF_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_SPEC_EFF_DEF_PACKET_ID_V1 22
00065 #define CIGI_SPEC_EFF_DEF_PACKET_SIZE_V1 32
00066 
00067 #define CIGI_SPEC_EFF_DEF_PACKET_ID_V2 22
00068 #define CIGI_SPEC_EFF_DEF_PACKET_SIZE_V2 32
00069 
00070 
00071 class CigiSpecEffDefV1;
00072 class CigiSpecEffDefV2;
00073 
00074 
00075 class CIGI_SPEC CigiBaseSpecEffDef : public CigiBasePacket
00076 {
00077 
00078 friend class CigiSpecEffDefV1;
00079 friend class CigiSpecEffDefV2;
00080 
00081 public:
00082 
00083    //=========================================================
00086    enum SeqDirGrp
00087    {
00088       Forward=0,
00089       Backward=1
00090    };
00091 
00092 
00093 
00094 
00095    //==> Management
00096 
00097    //=========================================================
00100    CigiBaseSpecEffDef();
00101 
00102    //=========================================================
00105    virtual ~CigiBaseSpecEffDef();
00106 
00107 
00108    //==> Buffer Packing/Unpacking
00109 
00110    //=========================================================
00121    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00122 
00123    //=========================================================
00133    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00134 
00135    //=========================================================
00147         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00148                        CigiCnvtInfoType::Type &CnvtInfo);
00149 
00150 
00151 
00152    //==> Accessing Member Variable Values functions
00153 
00154    //+> EntityID
00155 
00156    //=========================================================
00163    int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00164    {
00165       EntityID = EntityIDIn;
00166       return(CIGI_SUCCESS);
00167    }
00168 
00169    //=========================================================
00172    Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00173 
00174 
00175    //+> SeqDir
00176 
00177    //=========================================================
00186    int SetSeqDir(const SeqDirGrp SeqDirIn, bool bndchk=true);
00187 
00188    //=========================================================
00191    SeqDirGrp GetSeqDir(void) const { return(SeqDir); }
00192 
00193 
00194    //+> ColorEn
00195 
00196    //=========================================================
00203    int SetColorEn(const bool ColorEnIn, bool bndchk=true)
00204    {
00205       ColorEn = ColorEnIn;
00206       return(CIGI_SUCCESS);
00207    }
00208 
00209    //=========================================================
00212    bool GetColorEn(void) const { return(ColorEn); }
00213 
00214 
00215    //+> Red
00216 
00217    //=========================================================
00224    int SetRed(const Cigi_uint8 RedIn, bool bndchk=true)
00225    {
00226       Red = RedIn;
00227       return(CIGI_SUCCESS);
00228    }
00229 
00230    //=========================================================
00233    Cigi_uint8 GetRed(void) const { return(Red); }
00234 
00235 
00236    //+> Green
00237 
00238    //=========================================================
00245    int SetGreen(const Cigi_uint8 GreenIn, bool bndchk=true)
00246    {
00247       Green = GreenIn;
00248       return(CIGI_SUCCESS);
00249    }
00250 
00251    //=========================================================
00254    Cigi_uint8 GetGreen(void) const { return(Green); }
00255 
00256 
00257    //+> Blue
00258 
00259    //=========================================================
00266    int SetBlue(const Cigi_uint8 BlueIn, bool bndchk=true)
00267    {
00268       Blue = BlueIn;
00269       return(CIGI_SUCCESS);
00270    }
00271 
00272    //=========================================================
00275    Cigi_uint8 GetBlue(void) const { return(Blue); }
00276 
00277 
00278    //+> XScale
00279 
00280    //=========================================================
00287    int SetXScale(const float XScaleIn, bool bndchk=true);
00288 
00289    //=========================================================
00292    float GetXScale(void) const { return(XScale); }
00293 
00294 
00295    //+> YScale
00296 
00297    //=========================================================
00304    int SetYScale(const float YScaleIn, bool bndchk=true);
00305 
00306    //=========================================================
00309    float GetYScale(void) const { return(YScale); }
00310 
00311 
00312    //+> ZScale
00313 
00314    //=========================================================
00321    int SetZScale(const float ZScaleIn, bool bndchk=true);
00322 
00323    //=========================================================
00326    float GetZScale(void) const { return(ZScale); }
00327 
00328 
00329    //+> TimeScale
00330 
00331    //=========================================================
00338    int SetTimeScale(const float TimeScaleIn, bool bndchk=true);
00339 
00340    //=========================================================
00343    float GetTimeScale(void) const { return(TimeScale); }
00344 
00345 
00346    //+> EffectCnt
00347 
00348    //=========================================================
00355    int SetEffectCnt(const Cigi_uint16 EffectCntIn, bool bndchk=true)
00356    {
00357       EffectCnt = EffectCntIn;
00358       return(CIGI_SUCCESS);
00359    }
00360 
00361    //=========================================================
00364    Cigi_uint16 GetEffectCnt(void) const { return(EffectCnt); }
00365 
00366 
00367    //+> Separation
00368 
00369    //=========================================================
00376    int SetSeparation(const float SeparationIn, bool bndchk=true)
00377    {
00378       Separation = SeparationIn;
00379       return(CIGI_SUCCESS);
00380    }
00381 
00382    //=========================================================
00385    float GetSeparation(void) const { return(Separation); }
00386 
00387 
00388    //+> BurstRate
00389 
00390    //=========================================================
00397    int SetBurstRate(const float BurstRateIn, bool bndchk=true)
00398    {
00399       BurstRate = BurstRateIn;
00400       return(CIGI_SUCCESS);
00401    }
00402 
00403    //=========================================================
00406    float GetBurstRate(void) const { return(BurstRate); }
00407 
00408 
00409    //+> Duration
00410 
00411    //=========================================================
00418    int SetDuration(const float DurationIn, bool bndchk=true)
00419    {
00420       Duration = DurationIn;
00421       return(CIGI_SUCCESS);
00422    }
00423 
00424    //=========================================================
00427    float GetDuration(void) const { return(Duration); }
00428 
00429 
00430 
00431 protected:
00432 
00433    //==> Member variables
00434 
00435    //=========================================================
00439    Cigi_uint16 EntityID;
00440 
00441    //=========================================================
00447    SeqDirGrp SeqDir;
00448 
00449    //=========================================================
00453    bool ColorEn;
00454 
00455    //=========================================================
00459    Cigi_uint8 Red;
00460 
00461    //=========================================================
00465    Cigi_uint8 Green;
00466 
00467    //=========================================================
00471    Cigi_uint8 Blue;
00472 
00473    //=========================================================
00477    float XScale;
00478 
00479    //=========================================================
00483    float YScale;
00484 
00485    //=========================================================
00489    float ZScale;
00490 
00491    //=========================================================
00495    float TimeScale;
00496 
00497    //=========================================================
00501    Cigi_uint16 EffectCnt;
00502 
00503    //=========================================================
00507    float Separation;
00508 
00509    //=========================================================
00513    float BurstRate;
00514 
00515    //=========================================================
00519    float Duration;
00520 
00521 
00522 };
00523 
00524 #endif // #if !defined(_CIGI_BASE_SPEC_EFF_DEF_INCLUDED_)

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