VR-Forces 4.0.4 Class Documentation
include/symbolMapper/unicodeTTFSymbolDesc.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2000 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: unicodeTTFSymbolDesc.h,v $ $Revision: 1.10 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef UNITTFSYMBOLDESC_H
00013 #define UNITTFSYMBOLDESC_H
00014 
00015 #include "symbolMapper/ttfSymbolDesc.h"
00016 
00020 #include "symbolMapper/symbolMapperDefines.h"
00021 
00025 class DT_DLL_symbolMapper DtUTTFDecoder
00026 {
00027 public:
00028    DtUTTFDecoder();
00029    virtual ~DtUTTFDecoder();
00030 
00031    static DtUTTFDecoder* create();
00032 
00033    virtual bool getUnitSymbolFont(const DtEntityMapperKey& entType, 
00034       unsigned short& outlineCharacter, unsigned short& echelonCharacter,
00035       unsigned short& fillCharacter, bool useForceAsFill = false) const;
00036 
00037    virtual unsigned short fillCharacterForUnitSymbolFont( const unsigned short outline, const DtEntityMapperKey& entType, 
00038       const int forceType ) const;
00039    virtual unsigned short outlineCharacterForUnitSymbolFont( const unsigned short character, 
00040       const int forceType ) const;
00041    virtual unsigned short echelonCharacterForUnitSymbolFont( 
00042       const DtEntityMapperKey& entType ) const;
00043 
00044    virtual bool fillCharacterByOutline(unsigned short outline,
00045       const QString& lowerB, const QString& upperB, const QString& fillStart,
00046       unsigned short& fill, bool equipment = false) const;
00047 };
00048 
00049 typedef DtUTTFDecoder* (*DtUTTFDecoderCreatorFcn)();
00050 
00051 class DT_DLL_symbolMapper DtUnicodeTTFSymbolDescriptor : public DtTtfSymbolDescriptor
00052 {
00053 public:
00054 
00056    DtUnicodeTTFSymbolDescriptor();
00057 
00059    virtual ~DtUnicodeTTFSymbolDescriptor();
00060 
00062    DtUnicodeTTFSymbolDescriptor(const DtUnicodeTTFSymbolDescriptor& orig);
00063 
00065    virtual DtSymbolDescriptor& operator=(const DtSymbolDescriptor& rhs);
00066    virtual bool operator==(const DtSymbolDescriptor&) const;
00067 
00068    virtual QString type() const;
00069 
00070    virtual QString info() const;
00071 
00072    virtual unsigned short echelonUnicodeChar() const;
00073    virtual void setEchelonUnicodeChar(const unsigned short echelon);
00074    virtual void setEchelonUnicodeChar(const QString& hexString);
00075 
00077    virtual unsigned short outlineUnicodeChar(int force = -1) const;
00078    unsigned short outlineUnicodeCharRawValue() const
00079    {
00080       return myOutlineUnicodeChar;
00081    }
00082 
00083    virtual void setOutlineUnicodeChar(const unsigned short outline);
00084    virtual void setOutlineUnicodeChar(const QString& hexString);
00085 
00086    virtual unsigned short fillUnicodeChar() const;
00087 
00089    virtual unsigned short fillUnicodeChar( const DtEntityMapperKey& entType, 
00090       const int forceType ) const;
00091 
00092    virtual void setFillUnicodeChar(const unsigned short fill);
00093    virtual void setFillUnicodeChar(const QString& hexString);
00094 
00095    static unsigned short convertHexStringToMultibyteCharacter( const QString& hexChar );
00096 
00097    virtual DtSymbol* createSymbol(DtSymbolDrawer& drawer, const DtEntityMapperKey& key) const;
00098 
00099    void setOptional(const QString& optional);
00100    const QString& optional() const;
00101 
00102    virtual DtSymbolDescriptor* clone();
00103 
00104    virtual QString descriptorInformation() const;
00105 
00106    void setModifyFillByForce(bool);
00107    bool modifyFillByForce() const;
00108 
00109    void setComment(const QString&);
00110    const QString& comment() const;
00111 
00112    void setIsExtendedFormat(bool);
00113    bool isExtendedFormat() const;
00114 
00115    static void setDecoderCreator(DtUTTFDecoderCreatorFcn);
00116    static DtUTTFDecoderCreatorFcn decoderCreator();
00117 
00118 protected:
00119    unsigned short myEchelonUnicodeChar;
00120    unsigned short myOutlineUnicodeChar;
00121    unsigned short myFillUnicodeChar;
00122 
00123    QString  myOptional;
00124    QString  myComment;
00125 
00126    bool myModifyFillByForce;
00127    bool myIsExtendedFormat;
00128    static DtUTTFDecoderCreatorFcn theDecoderCreator;
00129 };
00130 
00131 inline void DtUnicodeTTFSymbolDescriptor::setModifyFillByForce(bool b)
00132 {
00133    myModifyFillByForce = b;
00134 }
00135 
00136 inline bool DtUnicodeTTFSymbolDescriptor::modifyFillByForce() const
00137 {
00138    return myModifyFillByForce;
00139 }
00140 
00141 inline void DtUnicodeTTFSymbolDescriptor::setIsExtendedFormat(bool b)
00142 {
00143    myIsExtendedFormat = b;
00144 }
00145 
00146 inline bool DtUnicodeTTFSymbolDescriptor::isExtendedFormat() const
00147 {
00148    return myIsExtendedFormat;
00149 }
00150 
00151 inline void DtUnicodeTTFSymbolDescriptor::setOptional(const QString& opt)
00152 {
00153    myOptional = opt;
00154 }
00155 
00156 inline const QString& DtUnicodeTTFSymbolDescriptor::optional() const
00157 {
00158    return myOptional;
00159 }
00160 
00161 inline void DtUnicodeTTFSymbolDescriptor::setComment(const QString& s)
00162 {
00163    myComment = s;
00164 }
00165 
00166 inline const QString& DtUnicodeTTFSymbolDescriptor::comment() const
00167 {
00168    return myComment;
00169 }
00170 
00171 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)