OGRE  1.10.12
Object-Oriented Graphics Rendering Engine
Ogre::ScriptCompilerManager Class Reference

Manages threaded compilation of scripts. More...

#include <OgreScriptCompiler.h>

+ Inheritance diagram for Ogre::ScriptCompilerManager:

Public Member Functions

 ScriptCompilerManager ()
 
virtual ~ScriptCompilerManager ()
 
void addScriptPattern (const String &pattern)
 Adds a script extension that can be handled (e.g. *.material, *.pu, etc.) More...
 
void addTranslatorManager (ScriptTranslatorManager *man)
 Adds the given translator manager to the list of managers. More...
 
void clearTranslatorManagers ()
 Clears all translator managers. More...
 
ScriptCompilerListenergetListener ()
 Returns the currently set listener used for compiler instances. More...
 
Real getLoadingOrder (void) const
 Gets the relative loading order of scripts of this type. More...
 
const StringVectorgetScriptPatterns (void) const
 Gets the file patterns which should be used to find scripts for this class. More...
 
ScriptTranslatorgetTranslator (const AbstractNodePtr &node)
 Retrieves a ScriptTranslator from the supported managers. More...
 
void parseScript (DataStreamPtr &stream, const String &groupName)
 Parse a script file. More...
 
uint32 registerCustomWordId (const String &word)
 Adds a custom word id which can be used for custom script translators. More...
 
void removeTranslatorManager (ScriptTranslatorManager *man)
 Removes the given translator manager from the list of managers. More...
 
void setListener (ScriptCompilerListener *listener)
 Sets the listener used for compiler instances. More...
 

Static Public Member Functions

static ScriptCompilerManagergetSingleton (void)
 Get the singleton instance. More...
 
static ScriptCompilerManagergetSingletonPtr (void)
 Get the singleton instance. More...
 

Detailed Description

Manages threaded compilation of scripts.

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

Constructor & Destructor Documentation

◆ ScriptCompilerManager()

Ogre::ScriptCompilerManager::ScriptCompilerManager ( )

◆ ~ScriptCompilerManager()

virtual Ogre::ScriptCompilerManager::~ScriptCompilerManager ( )
virtual

Member Function Documentation

◆ setListener()

void Ogre::ScriptCompilerManager::setListener ( ScriptCompilerListener listener)

Sets the listener used for compiler instances.

◆ getListener()

ScriptCompilerListener* Ogre::ScriptCompilerManager::getListener ( )

Returns the currently set listener used for compiler instances.

◆ addTranslatorManager()

void Ogre::ScriptCompilerManager::addTranslatorManager ( ScriptTranslatorManager man)

Adds the given translator manager to the list of managers.

◆ removeTranslatorManager()

void Ogre::ScriptCompilerManager::removeTranslatorManager ( ScriptTranslatorManager man)

Removes the given translator manager from the list of managers.

◆ clearTranslatorManagers()

void Ogre::ScriptCompilerManager::clearTranslatorManagers ( )

Clears all translator managers.

◆ getTranslator()

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

Retrieves a ScriptTranslator from the supported managers.

◆ registerCustomWordId()

uint32 Ogre::ScriptCompilerManager::registerCustomWordId ( const String word)

Adds a custom word id which can be used for custom script translators.

Parameters
wordThe word to be registered.
Returns
The word id for the registered word.
Note
If the word is already registered, the already registered id is returned.

◆ addScriptPattern()

void Ogre::ScriptCompilerManager::addScriptPattern ( const String pattern)

Adds a script extension that can be handled (e.g. *.material, *.pu, etc.)

◆ getScriptPatterns()

const StringVector& Ogre::ScriptCompilerManager::getScriptPatterns ( void  ) const
virtual

Gets the file patterns which should be used to find scripts for this class.

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.

◆ parseScript()

void Ogre::ScriptCompilerManager::parseScript ( DataStreamPtr stream,
const String groupName 
)
virtual

Parse a script file.

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

Implements Ogre::ScriptLoader.

◆ getLoadingOrder()

Real Ogre::ScriptCompilerManager::getLoadingOrder ( void  ) const
virtual

Gets the relative loading order of scripts of this type.

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.

◆ getSingleton()

static ScriptCompilerManager& Ogre::ScriptCompilerManager::getSingleton ( void  )
static

Get the singleton instance.

◆ getSingletonPtr()

static ScriptCompilerManager* Ogre::ScriptCompilerManager::getSingletonPtr ( void  )
static

Get the singleton instance.


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