VR-Forces 4.0.4 Class Documentation
include/vrvGraphics/DtFontManager.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 
00012 #include <vrvGraphics/vrvGraphics.h>
00013 #include <boost/shared_ptr.hpp>
00014 #include <boost/unordered_map.hpp>
00015 #include <boost/smart_ptr.hpp>
00016 #include <vector>
00017 
00018 namespace makVrv
00019 {
00020    class DtFont;
00021 
00022    typedef boost::shared_ptr<DtFont> DtFontSP;
00023    typedef boost::weak_ptr<DtFont> DtFontWP;
00024 
00028    class DT_DLL_VRVGRAPHICS DtFontManager
00029    {
00030    public:
00032       DtFontManager(const std::string& fontPath);
00033       ~DtFontManager();
00034 
00036       DtFontSP getFont(const std::string& filename, float size);
00037 
00038       //Deletes all fonts in memory.
00039       void clear();
00040 
00042       void addTextureListForDeletion(const std::vector<unsigned int>& textures );        
00043 
00046       void releaseResouces();
00047 
00049       void flushTextureList();
00050 
00051    protected:
00052       typedef std::pair<std::string,float> FontId;
00053       typedef boost::unordered_map< FontId, DtFontWP > FontMap;
00054       std::vector<unsigned int> myTextures;
00055       FontMap myMap;
00056       std::string myFontPath;
00057    };
00058 }

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)