OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreFontManager.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2 This source file is a part of OGRE
3 (Object-oriented Graphics Rendering Engine)
4 
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14 
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 THE SOFTWARE
25 -------------------------------------------------------------------------*/
26 
27 #ifndef _FontManager_H__
28 #define _FontManager_H__
29 
31 #include "OgreSingleton.h"
32 #include "OgreResourceManager.h"
33 #include "OgreFont.h"
34 
35 namespace Ogre
36 {
44  class _OgreOverlayExport FontManager : public ResourceManager, public Singleton< FontManager >
45  {
46  public:
47 
48  FontManager();
49  ~FontManager();
50 
53  FontPtr create (const String& name, const String& group,
54  bool isManual = false, ManualResourceLoader* loader = 0,
55  const NameValuePairList* createParams = 0);
56 
59  FontPtr getByName(const String& name, const String& groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
60 
61 
63  void parseScript(DataStreamPtr& stream, const String& groupName);
79  static FontManager& getSingleton(void);
95  static FontManager* getSingletonPtr(void);
96 
97  protected:
98 
100  Resource* createImpl(const String& name, ResourceHandle handle,
101  const String& group, bool isManual, ManualResourceLoader* loader,
102  const NameValuePairList* params);
103  void parseAttribute(const String& line, FontPtr& pFont);
104 
105  void logBadAttrib(const String& line, FontPtr& pFont);
106 
107 
108  };
111 }
112 
113 #endif
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
#define _OgreOverlayExport
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Interface describing a manual resource loader.
Definition: OgreResource.h:514
Manages Font resources, parsing .fontdef files and generally organising them.
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:79
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Defines a generic resource handler.
_StringBase String