VR-Forces 4.0.4 Class Documentation
include/vrvGraphics/DtCharacterEncodingMap.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #pragma once
00011 #include <vrvGraphics/vrvGraphics.h>
00012 #include <boost/unordered_map.hpp>
00013 
00014 namespace makVrv
00015 {
00016    class DtFreeTypeFace;
00017 
00020    class DT_DLL_VRVGRAPHICS DtCharacterEncodingMap
00021    {
00022    public:
00023       // CTOR
00024       DtCharacterEncodingMap(DtFreeTypeFace* face);
00025       ~DtCharacterEncodingMap();
00026 
00028       unsigned int encoding() const;
00029 
00031       bool setEncoding(unsigned int  encoding);
00032 
00035       unsigned int indexOfGlyph(const unsigned int characterCode) const;
00036 
00039       unsigned int indexInFont(unsigned int characterCode) const;
00040 
00042       void setGlyphIndex(const unsigned int characterCode, const size_t glyphIndex);
00043 
00044    protected:
00045 
00046       typedef boost::unordered_map<unsigned int, unsigned int> CharacterMap;
00047 
00048       DtFreeTypeFace* myFace;
00049       CharacterMap myGlyphMap;
00050 
00051       unsigned int myEncoding;
00052       static const unsigned int TheCacheSize = 128;
00053       unsigned int myIndexCache[TheCacheSize];
00054    };
00055 }

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)