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

Ogre::CompositorScriptCompilerListener Class Reference

This is the listener specific to the compositor compiler. More...

#include <OgreCompositorScriptCompiler2.h>

Inheritance diagram for Ogre::CompositorScriptCompilerListener:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CompositorScriptCompilerListener ()
CompositorgetCompositor (const String &name, const String &group)
 Override this to customly allocate compositors.
virtual bool processNode (ScriptNodeList::iterator &iter, ScriptNodeList::iterator &end, CompositorScriptCompiler2 *)
 Override this to do custom processing.
virtual ConcreteNodeListPtr importFile (ScriptCompiler *compiler, const String &name)
 Returns the concrete node list from the given file.
virtual void preConversion (ScriptCompiler *compiler, ConcreteNodeListPtr nodes)
 Allows for responding to and overriding behavior before a CST is translated into an AST.
virtual bool postConversion (ScriptCompiler *compiler, const AbstractNodeListPtr &)
virtual void handleError (ScriptCompiler *compiler, uint32 code, const String &file, int line, const String &msg)
 Called when an error occurred.
virtual bool handleEvent (ScriptCompiler *compiler, const String &name, const std::vector< Ogre::Any > &args, Ogre::Any *retval)
virtual Ogre::Any createObject (ScriptCompiler *compiler, const String &type, const std::vector< Ogre::Any > &args)

Detailed Description

This is the listener specific to the compositor compiler.

It allows for notifications and overriding of compiler functions.

Definition at line 45 of file OgreCompositorScriptCompiler2.h.


Constructor & Destructor Documentation

Ogre::CompositorScriptCompilerListener::CompositorScriptCompilerListener  ) 
 


Member Function Documentation

virtual Ogre::Any Ogre::ScriptCompilerListener::createObject ScriptCompiler compiler,
const String type,
const std::vector< Ogre::Any > &  args
[virtual, inherited]
 

Remarks:
This function is called when a translator needs to create an Ogre object during comilation. If a valid object is returned from this function it is used instead of a default object created from Ogre's resource managers. The object types are: Material arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file GpuProgram arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file arg4 is the specified source file arg5 is the GpuProgramType arg6 is the program's syntax code UnifiedGpuProgram arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file arg4 is the GpuProgramType HighLevelGpuProgram arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file arg4 is the specified language arg5 is the GpuProgramType arg6 is the specified source file ParticleSystem arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file Compositor arg1 is a string holding the file where the object is compiled from arg2 is the name for the material specified in the script file arg3 is the resource group of the compiling script file
  • compiler A reference to the compiler
  • type The type of the requested object
  • args Creation arguments for the object
Returns:
A reference (pointer) to the created object wrapped in an Any

Compositor* Ogre::CompositorScriptCompilerListener::getCompositor const String name,
const String group
 

Override this to customly allocate compositors.

virtual void Ogre::ScriptCompilerListener::handleError ScriptCompiler compiler,
uint32  code,
const String file,
int  line,
const String msg
[virtual, inherited]
 

Called when an error occurred.

virtual bool Ogre::ScriptCompilerListener::handleEvent ScriptCompiler compiler,
const String name,
const std::vector< Ogre::Any > &  args,
Ogre::Any retval
[virtual, inherited]
 

Remarks:
This function is called from the translators when an event occurs that that can be responded to. Often this is overriding names. The support events are: preApplyTextureAliases - Allows overriding texture aliases before they are set arg1 is a Material* arg2 is an AliasTextureNamePairList* holding the aliases processTextureNames - Allows overriding referenced textures arg1 is a String* arg2 is the size of the array No return value processMaterialName - Allows overriding referenced materials arg1 is a single String* No return value processGpuProgramName - Allows overriding referenced gpu programs arg1 is a single String* No return value processNameExclusion - Allows forcing a name exclusion arg1 is a String of the node object's class ("material", "particle_system", etc.) arg2 is an AbstractNode* which is the object's parent No return value
  • compiler A reference to the compiler
  • name The name of the event
  • args The vector of argument for the event
  • retval A possible return value from handlers
Returns:
True if the handler processed the event

virtual ConcreteNodeListPtr Ogre::ScriptCompilerListener::importFile ScriptCompiler compiler,
const String name
[virtual, inherited]
 

Returns the concrete node list from the given file.

virtual bool Ogre::ScriptCompilerListener::postConversion ScriptCompiler compiler,
const AbstractNodeListPtr
[virtual, inherited]
 

Remarks:
Once the script is turned completely into an AST, including import and override handling, this function allows a listener to exit the compilation process.
Returns:
True continues compilation, false aborts

virtual void Ogre::ScriptCompilerListener::preConversion ScriptCompiler compiler,
ConcreteNodeListPtr  nodes
[virtual, inherited]
 

Allows for responding to and overriding behavior before a CST is translated into an AST.

virtual bool Ogre::CompositorScriptCompilerListener::processNode ScriptNodeList::iterator &  iter,
ScriptNodeList::iterator &  end,
CompositorScriptCompiler2
[virtual]
 

Override this to do custom processing.


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:47:27 2009