CigiBaseSymbolTextDef.h

Go to the documentation of this file.
00001 
00039 #if !defined(_CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_)
00040 #define _CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_
00041 
00042 
00043 #include "CigiBaseVariableSizePckt.h"
00044 
00045 #include <string>
00046 
00047 // ====================================================================
00048 // preprocessor definitions
00049 // ====================================================================
00050 
00051 #define CIGI_SYMBOL_TEXT_DEFINITION_PACKET_ID_V3_3 30
00052 #define CIGI_SYMBOL_TEXT_DEFINITION_PACKET_SIZE_V3_3 12
00053 
00054 
00055 class CigiSymbolTextDefV3_3;
00056 
00057 
00058 //=========================================================
00061 class CIGI_SPEC CigiBaseSymbolTextDef :
00062    public CigiBaseVariableSizePckt
00063 {
00064 
00065    friend class CigiSymbolTextDefV3_3;
00066 
00067 public:
00068 
00069 
00070    //=========================================================
00074    enum AlignmentGrp
00075    {
00076       TopLeft=0,
00077       TopCenter=1,
00078       TopRight=2,
00079       CenterLeft=3,
00080       Center=4,
00081       CenterRight=5,
00082       BottomLeft=6,
00083       BottomCenter=7,
00084       BottomRight=8,
00085    };
00086 
00087    //=========================================================
00091    enum OrientationGrp
00092    {
00093       LeftToRight=0,
00094       TopToBottom=1,
00095       RightToLeft=2,
00096       BottomToTop=3,
00097    };
00098 
00099 
00100    //==> Management
00101 
00102    //=========================================================
00105    CigiBaseSymbolTextDef(void);
00106 
00107    //=========================================================
00110    virtual ~CigiBaseSymbolTextDef(void);
00111 
00112    //=========================================================
00115    CigiBaseSymbolTextDef(const CigiBaseSymbolTextDef &BaseIn);
00116 
00117    //=========================================================
00120    CigiBaseSymbolTextDef & operator=(const CigiBaseSymbolTextDef &BaseIn);
00121 
00122 
00123    //==> Buffer Packing/Unpacking
00124 
00125    //=========================================================
00136    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00137 
00138    //=========================================================
00148    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00149 
00150    //=========================================================
00157         virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket)
00158    { return(PacketSize + refPacket.GetVariableDataSize()); }
00159 
00160    //=========================================================
00173         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00174                        CigiCnvtInfoType::Type &CnvtInfo);
00175 
00176 
00177 
00178    //==> Accessing Member Variable Values functions
00179 
00180    //+> SymbolID
00181 
00182    //=========================================================
00189    int SetSymbolID(const Cigi_uint16 SymbolIDIn, bool bndchk=true)
00190    {
00191       SymbolID = SymbolIDIn;
00192       return(CIGI_SUCCESS);
00193    }
00194 
00195    //=========================================================
00199    Cigi_uint16 GetSymbolID(void) const { return(SymbolID); }
00200    
00201 
00202    //+> Alignment
00203 
00204    //=========================================================
00214    int SetAlignment(const AlignmentGrp AlignmentIn, bool bndchk=true);
00215 
00216    //=========================================================
00222    AlignmentGrp GetAlignment(void) const { return(Alignment); }
00223 
00224 
00225    //+> Orientation
00226 
00227    //=========================================================
00236    int SetOrientation(const OrientationGrp OrientationIn, bool bndchk=true);
00237 
00238    //=========================================================
00243    OrientationGrp GetOrientation(void) const { return(Orientation); }
00244 
00245 
00246    //+> FontID
00247 
00248    //=========================================================
00256    int SetFontID(const Cigi_uint8 FontIDIn, bool bndchk=true)
00257    {
00258       FontID = FontIDIn;
00259       return(CIGI_SUCCESS);
00260    }
00261 
00262    //=========================================================
00266    Cigi_uint8 GetFontID(void) const { return(FontID); }
00267 
00268 
00269    //+> FontSize
00270 
00271    //=========================================================
00279    int SetFontSize(const float FontSizeIn, bool bndchk=true);
00280 
00281    //=========================================================
00285    float GetFontSize(void) const { return(FontSize); }
00286 
00287 
00288    //+> Text
00289 
00290    //=========================================================
00297    int SetText(const std::string &TextIn, bool bndchk=true);
00298 
00299    //=========================================================
00303    int GetTextSize(void) const { return(VariableDataSize); }
00304 
00305    //=========================================================
00308    const std::string & GetText(void) { return(Text); }
00309 
00310 
00311 
00312 protected:
00313 
00314    //==> Member variables
00315 
00316    //=========================================================
00320    Cigi_uint16 SymbolID;
00321 
00322    //=========================================================
00336    AlignmentGrp Alignment;
00337 
00338    //=========================================================
00346    OrientationGrp Orientation;
00347 
00348    //=========================================================
00352    Cigi_uint8 FontID;
00353 
00354    //=========================================================
00358    float FontSize;
00359 
00360    //=========================================================
00364    std::string Text;
00365 
00366    //=========================================================
00370    static const int MaxCharCnt = 235;
00371 
00372 };
00373 
00374 
00375 
00376 #endif   //  #if !defined(_CIGI_BASE_SYMBOL_TEXT_DEF_INCLUDED_)
00377 

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