Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Ogre::ScriptCompilerManager Class Reference

Manages threaded compilation of scripts. More...

#include <OgreScriptCompiler.h>

Inheritance diagram for Ogre::ScriptCompilerManager:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ScriptCompilerManager ()
virtual ~ScriptCompilerManager ()
void setListener (ScriptCompilerListener *listener)
 Sets the listener used for compiler instances.
ScriptCompilerListenergetListener ()
 Returns the currently set listener used for compiler instances.
void addTranslatorManager (ScriptTranslatorManager *man)
 Adds the given translator manager to the list of managers.
void removeTranslatorManager (ScriptTranslatorManager *man)
 Removes the given translator manager from the list of managers.
void clearTranslatorManagers ()
 Clears all translator managers.
ScriptTranslatorgetTranslator (const AbstractNodePtr &node)
 Retrieves a ScriptTranslator from the supported managers.
const StringVectorgetScriptPatterns (void) const
 
Remarks:
This method is called when a resource group is loaded if you use ResourceGroupManager::_registerScriptLoader.
Returns:
A list of file patterns, in the order they should be searched in.

void parseScript (DataStreamPtr &stream, const String &groupName)
 
Parameters:
stream Weak reference to a data stream which is the source of the script
groupName The name of a resource group which should be used if any resources are created during the parse of this script.

Real getLoadingOrder (void) const
 
Remarks:
There are dependencies between some kinds of scripts, and to enforce this all implementors of this interface must define a loading order.
Returns:
A value representing the relative loading order of these scripts compared to other script users, where higher values load later.

 Singleton (void)
 AllocatedObject ()
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
void * operator new (size_t sz)
void * operator new (size_t sz, void *ptr)
 placement operator new
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
void * operator new[] (size_t sz)
void operator delete (void *ptr)
void operator delete (void *ptr, void *)
void operator delete (void *ptr, const char *, int, const char *)
void operator delete[] (void *ptr)
void operator delete[] (void *ptr, const char *, int, const char *)

Static Public Member Functions

static ScriptCompilerManagergetSingleton (void)
 Override standard Singleton retrieval.
static ScriptCompilerManagergetSingletonPtr (void)
 Override standard Singleton retrieval.

Static Protected Attributes

static ScriptCompilerManagerms_Singleton

Private Member Functions

 OGRE_THREAD_POINTER (ScriptCompiler, mScriptCompiler)

Private Attributes

OGRE_AUTO_MUTEX StringVector mScriptPatterns
ScriptCompilerListenermListener
std::vector< ScriptTranslatorManager * > mManagers
ScriptTranslatorManagermBuiltinTranslatorManager

Detailed Description

Manages threaded compilation of scripts.

This script loader forwards scripts compilations to a specific compiler instance.

Definition at line 418 of file OgreScriptCompiler.h.


Constructor & Destructor Documentation

Ogre::ScriptCompilerManager::ScriptCompilerManager  ) 
 

virtual Ogre::ScriptCompilerManager::~ScriptCompilerManager  )  [virtual]
 


Member Function Documentation

void Ogre::ScriptCompilerManager::addTranslatorManager ScriptTranslatorManager man  ) 
 

Adds the given translator manager to the list of managers.

Ogre::AllocatedObject< ScriptingAllocPolicy >::AllocatedObject  )  [explicit, inherited]
 

Definition at line 55 of file OgreMemoryAllocatedObject.h.

void Ogre::ScriptCompilerManager::clearTranslatorManagers  ) 
 

Clears all translator managers.

ScriptCompilerListener* Ogre::ScriptCompilerManager::getListener  ) 
 

Returns the currently set listener used for compiler instances.

Real Ogre::ScriptCompilerManager::getLoadingOrder void   )  const [virtual]
 

Remarks:
There are dependencies between some kinds of scripts, and to enforce this all implementors of this interface must define a loading order.
Returns:
A value representing the relative loading order of these scripts compared to other script users, where higher values load later.

Implements Ogre::ScriptLoader.

const StringVector& Ogre::ScriptCompilerManager::getScriptPatterns void   )  const [virtual]
 

Remarks:
This method is called when a resource group is loaded if you use ResourceGroupManager::_registerScriptLoader.
Returns:
A list of file patterns, in the order they should be searched in.

Implements Ogre::ScriptLoader.

static ScriptCompilerManager& Ogre::ScriptCompilerManager::getSingleton void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< ScriptCompilerManager >.

static ScriptCompilerManager* Ogre::ScriptCompilerManager::getSingletonPtr void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from Ogre::Singleton< ScriptCompilerManager >.

ScriptTranslator* Ogre::ScriptCompilerManager::getTranslator const AbstractNodePtr node  ) 
 

Retrieves a ScriptTranslator from the supported managers.

Ogre::ScriptCompilerManager::OGRE_THREAD_POINTER ScriptCompiler  ,
mScriptCompiler 
[private]
 

void Ogre::AllocatedObject< ScriptingAllocPolicy >::operator delete void *  ptr,
const char *  ,
int  ,
const char * 
[inherited]
 

Definition at line 101 of file OgreMemoryAllocatedObject.h.

void Ogre::AllocatedObject< ScriptingAllocPolicy >::operator delete void *  ptr,
void * 
[inherited]
 

Definition at line 95 of file OgreMemoryAllocatedObject.h.

void Ogre::AllocatedObject< ScriptingAllocPolicy >::operator delete void *  ptr  )  [inherited]
 

Definition at line 89 of file OgreMemoryAllocatedObject.h.

void Ogre::AllocatedObject< ScriptingAllocPolicy >::operator delete[] void *  ptr,
const char *  ,
int  ,
const char * 
[inherited]
 

Definition at line 112 of file OgreMemoryAllocatedObject.h.

void Ogre::AllocatedObject< ScriptingAllocPolicy >::operator delete[] void *  ptr  )  [inherited]
 

Definition at line 106 of file OgreMemoryAllocatedObject.h.

void* Ogre::AllocatedObject< ScriptingAllocPolicy >::operator new size_t  sz,
void *  ptr
[inherited]
 

placement operator new

Definition at line 73 of file OgreMemoryAllocatedObject.h.

void* Ogre::AllocatedObject< ScriptingAllocPolicy >::operator new size_t  sz  )  [inherited]
 

Definition at line 67 of file OgreMemoryAllocatedObject.h.

void* Ogre::AllocatedObject< ScriptingAllocPolicy >::operator new size_t  sz,
const char *  file,
int  line,
const char *  func
[inherited]
 

operator new, with debug line info

Definition at line 62 of file OgreMemoryAllocatedObject.h.

void* Ogre::AllocatedObject< ScriptingAllocPolicy >::operator new[] size_t  sz  )  [inherited]
 

Definition at line 84 of file OgreMemoryAllocatedObject.h.

void* Ogre::AllocatedObject< ScriptingAllocPolicy >::operator new[] size_t  sz,
const char *  file,
int  line,
const char *  func
[inherited]
 

array operator new, with debug line info

Definition at line 79 of file OgreMemoryAllocatedObject.h.

void Ogre::ScriptCompilerManager::parseScript DataStreamPtr stream,
const String groupName
[virtual]
 

Parameters:
stream Weak reference to a data stream which is the source of the script
groupName The name of a resource group which should be used if any resources are created during the parse of this script.

Implements Ogre::ScriptLoader.

void Ogre::ScriptCompilerManager::removeTranslatorManager ScriptTranslatorManager man  ) 
 

Removes the given translator manager from the list of managers.

void Ogre::ScriptCompilerManager::setListener ScriptCompilerListener listener  ) 
 

Sets the listener used for compiler instances.

Ogre::Singleton< ScriptCompilerManager >::Singleton void   )  [inherited]
 

Definition at line 64 of file OgreSingleton.h.


Member Data Documentation

ScriptTranslatorManager* Ogre::ScriptCompilerManager::mBuiltinTranslatorManager [private]
 

Definition at line 433 of file OgreScriptCompiler.h.

ScriptCompilerListener* Ogre::ScriptCompilerManager::mListener [private]
 

Definition at line 427 of file OgreScriptCompiler.h.

std::vector<ScriptTranslatorManager*> Ogre::ScriptCompilerManager::mManagers [private]
 

Definition at line 430 of file OgreScriptCompiler.h.

ScriptCompilerManager * Ogre::Singleton< ScriptCompilerManager >::ms_Singleton [static, protected, inherited]
 

Definition at line 61 of file OgreSingleton.h.

OGRE_AUTO_MUTEX StringVector Ogre::ScriptCompilerManager::mScriptPatterns [private]
 

Definition at line 424 of file OgreScriptCompiler.h.


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

Copyright © 2008 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sat Apr 11 13:53:47 2009