OGRE  1.8
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-2013 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 
30 #include "OgrePrerequisites.h"
31 #include "OgreSingleton.h"
32 #include "OgreResourceManager.h"
33 #include "OgreFont.h"
34 
35 namespace Ogre
36 {
44  class _OgreExport FontManager : public ResourceManager, public Singleton< FontManager >
45  {
46  public:
47 
48  FontManager();
49  ~FontManager();
50 
52  void parseScript(DataStreamPtr& stream, const String& groupName);
68  static FontManager& getSingleton(void);
84  static FontManager* getSingletonPtr(void);
85 
86  protected:
87 
89  Resource* createImpl(const String& name, ResourceHandle handle,
90  const String& group, bool isManual, ManualResourceLoader* loader,
91  const NameValuePairList* params);
92  void parseAttribute(const String& line, FontPtr& pFont);
93 
94  void logBadAttrib(const String& line, FontPtr& pFont);
95 
96 
97  };
100 }
101 
102 #endif
#define _OgreExport
Definition: OgrePlatform.h:233
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:553
Template class for creating single-instance global classes.
Definition: OgreSingleton.h:64
Interface describing a manual resource loader.
Definition: OgreResource.h:513
Manages Font resources, parsing .fontdef files and generally organising them.
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:78
unsigned long long int ResourceHandle
Definition: OgreResource.h:40
Specialisation of SharedPtr to allow SharedPtr to be assigned to FontPtr.
Definition: OgreFont.h:425
Defines a generic resource handler.
_StringBase String