Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OgreObjectFactory.h
Go to the documentation of this file.
1 // Copyright (C) 2004-2011 Dylan Blair
3 //
4 // email: dblair@alumni.cs.utexas.edu
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 
21 #ifndef OGRE_OBJECT_FACTORY_H
22 #define OGRE_OBJECT_FACTORY_H
23 
24 #include "OgrePhysVisObject.h"
25 #include "OgreCinematographer.h"
26 
27 #include "../Core_LIB/CObjectFactory.h"
28 #include "../Graphics_LIB/GOgreApp.h"
29 
30 #define OgreObjFac OpenSkyNet::OgreCore::OgreObjectFactory::getInstance()
31 
32 class TiXmlElement;
33 
34 namespace OpenSkyNet {
35  namespace OgreCore {
38  private:
39  static OgreObjectFactory* _instance;
40  Graphics::OgreApp* _ogreApp;
41  Ogre::SceneNode* _visColVols;
42 
43  protected:
45 
46  public:
47  static inline void createInstance() { _instance = new OgreObjectFactory(); }
48 
49  static inline OgreObjectFactory*& getInstance() { return _instance; }
50 
51  static void addUpdaters(TiXmlElement* objElement_, OpenSkyNet::Core::Object* obj_);
52 
53  static void shutDown();
54 
55  virtual void init(Graphics::OgreApp* ogreApp_);
56 
57  virtual OpenSkyNet::Core::Object* createObject(const char* name_, bool isPersistent_, CREATION_FLAG flag_, ...);
58 
59  inline Graphics::OgreApp* getOgreApp() { return _ogreApp; }
60 
77  virtual void loadCoreObjectsXML(const char* coreObjectsXML_);
78 
81  virtual void serialize(const char* coreObjectsXML_);
82  };
83  }
84 }
85 
86 #endif //OGRE_OBJECT_FACTORY_H
#define OGRECORE_DLL
Definition: OgreCoreDLL.h:57
Graphics::OgreApp * getOgreApp()
Definition: OgreObjectFactory.h:59
Definition: CObjectFactory.h:36
Definition: OgreObjectFactory.h:37
int serialize(std::ofstream &fout_, const std::vector< T > &vector_)
Definition: AIBase.h:193
Definition: IObject.h:36
static void createInstance()
Definition: OgreObjectFactory.h:47
Definition: GOgreApp.h:34
static OgreObjectFactory *& getInstance()
Definition: OgreObjectFactory.h:49