VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFontManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 #include <boost/shared_ptr.hpp>
14 #include <boost/unordered_map.hpp>
15 #include <boost/smart_ptr.hpp>
16 #include <vector>
17 
18 namespace makVrv
19 {
20  class DtFont;
21 
22  typedef boost::shared_ptr<DtFont> DtFontSP;
23  typedef boost::weak_ptr<DtFont> DtFontWP;
24 
29  {
30  public:
32  DtFontManager(const std::string& fontPath);
33  ~DtFontManager();
34 
36  DtFontSP getFont(const std::string& filename, float size);
37 
38  //Deletes all fonts in memory.
39  void clear();
40 
42  void addTextureListForDeletion(const std::vector<unsigned int>& textures );
43 
46  void releaseResouces();
47 
49  void flushTextureList();
50 
51  protected:
52  typedef std::pair<std::string,float> FontId;
53  typedef boost::unordered_map< FontId, DtFontWP > FontMap;
54  std::vector<unsigned int> myTextures;
56  std::string myFontPath;
57  };
58 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)