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
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenSkyNet::OgreCore::OgreObjectFactory Class Reference

#include <OgreObjectFactory.h>

Inheritance diagram for OpenSkyNet::OgreCore::OgreObjectFactory:
OpenSkyNet::Core::ObjectFactory

Public Member Functions

virtual void init (Graphics::OgreApp *ogreApp_)
 
virtual OpenSkyNet::Core::ObjectcreateObject (const char *name_, bool isPersistent_, CREATION_FLAG flag_,...)
 
Graphics::OgreAppgetOgreApp ()
 
virtual void loadCoreObjectsXML (const char *coreObjectsXML_)
 
virtual void serialize (const char *coreObjectsXML_)
 
- Public Member Functions inherited from OpenSkyNet::Core::ObjectFactory
void destroyAllObjects (bool doDestroyPersistentData_)
 
virtual CD::ShapecreateShape (CD::SHAPE_TYPE shapeType_,...)
 
CD::ShapegetShape (Utils::uint index_)
 
ObjectgetObject (const char *name_)
 
const std::map< std::string,
Object * > & 
getObjects () const
 

Static Public Member Functions

static void createInstance ()
 
static OgreObjectFactory *& getInstance ()
 
static void addUpdaters (TiXmlElement *objElement_, OpenSkyNet::Core::Object *obj_)
 
static void shutDown ()
 
- Static Public Member Functions inherited from OpenSkyNet::Core::ObjectFactory
static void createInstance ()
 
static ObjectFactory *& getInstance ()
 
static void shutDown ()
 

Protected Member Functions

 OgreObjectFactory ()
 
- Protected Member Functions inherited from OpenSkyNet::Core::ObjectFactory
 ObjectFactory ()
 

Additional Inherited Members

- Public Types inherited from OpenSkyNet::Core::ObjectFactory
enum  CREATION_FLAG {
  NONE, PHYSICAL, VISIBLE, PHYS_VIS,
  CAMERA
}
 
- Static Protected Member Functions inherited from OpenSkyNet::Core::ObjectFactory
static Utils::uint getColGroupUIntFromStr (const char *colGroup_)
 
static const char * getColGroupStrFromUInt (Utils::uint colGroup_)
 
- Protected Attributes inherited from OpenSkyNet::Core::ObjectFactory
std::vector< CD::Shape * > _nonPersistentShapes
 
std::map< std::string, Object * > _namesToObjs
 
std::vector< Object * > _nonPersistentObjs
 
- Static Protected Attributes inherited from OpenSkyNet::Core::ObjectFactory
static ObjectFactory_instance = 0
 

Detailed Description

Class to handle all game object creation and deletion.

Constructor & Destructor Documentation

OgreObjectFactory::OgreObjectFactory ( )
protected

Member Function Documentation

void OgreObjectFactory::addUpdaters ( TiXmlElement *  objElement_,
OpenSkyNet::Core::Object obj_ 
)
static
static void OpenSkyNet::OgreCore::OgreObjectFactory::createInstance ( )
inlinestatic
Core::Object * OgreObjectFactory::createObject ( const char *  name_,
bool  isPersistent_,
CREATION_FLAG  flag_,
  ... 
)
virtual

Reimplemented from OpenSkyNet::Core::ObjectFactory.

static OgreObjectFactory*& OpenSkyNet::OgreCore::OgreObjectFactory::getInstance ( )
inlinestatic
Graphics::OgreApp* OpenSkyNet::OgreCore::OgreObjectFactory::getOgreApp ( )
inline
void OgreObjectFactory::init ( Graphics::OgreApp ogreApp_)
virtual
void OgreObjectFactory::loadCoreObjectsXML ( const char *  coreObjectsXML_)
virtual

This method loads CoreObjects.xml. Here's a brief description of the linked schema CoreObjects.xsd: This schema associates objects created from the OgreObjectFactory with updaters from the Core::UpdateManager. <xs:element name="CoreObjects">

Every object must have a unique string name in the "name" attribute for creation via the OgreObjectFactory.
<xs:element name="Object" minOccurs="0" maxOccurs="unbounded">

    Every object must have a "Flag" element whose "name" attribute describes what type of object it is 
    and how to create it via the OgreObjectFactory. This is the CREATION_FLAG parameter in createObject().
    <xs:element name="Flag">

    Every object can have zero or more updaters that modify the object's data. The "name" attribute is 
    the string name of the updater's enum type. The list of possible updaters is the UPDATER_TYPE enum in 
    CUpdater.h. Adding multiple updaters of the same type to an object has no effect. All updaters are created 
    and called by the UpdateManager.
    <xs:element name="Updater" minOccurs="0" maxOccurs="unbounded">  
void OgreObjectFactory::serialize ( const char *  coreObjectsXML_)
virtual

Saves the current state of all non-persistent objects and their updaters.

Parameters
coreObjectsXML_the filename to save to
void OgreObjectFactory::shutDown ( )
static

The documentation for this class was generated from the following files: