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

Ogre::ParticleScriptCompilerListener Class Reference

This is the specific listener for the particle script compiler. More...

#include <OgreParticleScriptCompiler.h>

Inheritance diagram for Ogre::ParticleScriptCompilerListener:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ParticleScriptCompilerListener ()
virtual bool processNode (ScriptNodeList::iterator &iter, ScriptNodeList::iterator &end, ParticleScriptCompiler *)
 Override this to do custom processing of the script nodes.
virtual ParticleSystemgetParticleSystem (const String &name, const String &group)
 This provides the compiler with the particle system it wishes to compile into. Override it for custom system allocations.
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 specific listener for the particle script compiler.

It allows overriding behavior for specific functionality of this compiler.

Definition at line 41 of file OgreParticleScriptCompiler.h.


Constructor & Destructor Documentation

Ogre::ParticleScriptCompilerListener::ParticleScriptCompilerListener  ) 
 


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

virtual ParticleSystem* Ogre::ParticleScriptCompilerListener::getParticleSystem const String name,
const String group
[virtual]
 

This provides the compiler with the particle system it wishes to compile into. Override it for custom system allocations.

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::ParticleScriptCompilerListener::processNode ScriptNodeList::iterator &  iter,
ScriptNodeList::iterator &  end,
ParticleScriptCompiler
[virtual]
 

Override this to do custom processing of the script nodes.


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:50:23 2009