#include <OgreParticleScriptCompiler.h>
Public Types | |
enum | { ID_ON = 1, ID_OFF = 2, ID_TRUE = 1, ID_FALSE = 2, ID_YES = 1, ID_NO = 2 } |
enum | { CE_STRINGEXPECTED, CE_NUMBEREXPECTED, CE_FEWERPARAMETERSEXPECTED, CE_VARIABLEEXPECTED, CE_UNDEFINEDVARIABLE, CE_OBJECTNAMEEXPECTED, CE_OBJECTALLOCATIONERROR, CE_INVALIDPARAMETERS, CE_DUPLICATEOVERRIDE, CE_UNEXPECTEDTOKEN, CE_OBJECTBASENOTFOUND, CE_UNSUPPORTEDBYRENDERSYSTEM, CE_REFERENCETOANONEXISTINGOBJECT } |
typedef list< ErrorPtr >::type | ErrorList |
typedef SharedPtr< Error > | ErrorPtr |
typedef map< String, uint32 >::type | IdMap |
Public Member Functions | |
ParticleScriptCompiler () | |
bool | _compile (AbstractNodeListPtr nodes, const String &group, bool doImports=true, bool doObjects=true, bool doVariables=true) |
Compiles the given abstract syntax tree. More... | |
bool | _fireEvent (ScriptCompilerEvent *evt, void *retval) |
Internal method for firing the handleEvent method. More... | |
AbstractNodeListPtr | _generateAST (const String &str, const String &source, bool doImports=false, bool doObjects=false, bool doVariables=false) |
Generates the AST from the given string script. More... | |
void | addError (uint32 code, const String &file, int line, const String &msg="") |
Adds the given error to the compiler's list of errors. More... | |
void | addNameExclusion (const String &type) |
Adds a name exclusion to the map. More... | |
bool | compile (const String &str, const String &source, const String &group) |
Takes in a string of script code and compiles it into resources. More... | |
bool | compile (const ConcreteNodeListPtr &nodes, const String &group) |
Compiles resources from the given concrete node list. More... | |
ScriptCompilerListener * | getListener () |
Returns the currently set listener. More... | |
ParticleSystem * | getParticleSystem () const |
Returns the particle system currently being compiled. More... | |
const String & | getResourceGroup () const |
Returns the resource group currently set for this compiler. More... | |
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 *) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info More... | |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, void *ptr) |
placement operator new More... | |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info More... | |
void * | operator new[] (size_t sz) |
void | removeNameExclusion (const String &type) |
Removes a name exclusion. More... | |
void | setListener (ParticleScriptCompilerListener *listener) |
Sets the listener for this compiler. More... | |
void | setListener (ScriptCompilerListener *listener) |
Sets the listener used by the compiler. More... | |
Static Public Member Functions | |
static String | formatErrorCode (uint32 code) |
Protected Member Functions | |
bool | compileImpl (ScriptNodeListPtr nodes) |
This begins the compilation of the particle system from the final transformed AST. More... | |
bool | errorRaised (const ScriptCompilerErrorPtr &error) |
Allows a listener to override error handling in the compiler. More... | |
ScriptNodeListPtr | loadImportPath (const String &name) |
This is the override for loading imports. More... | |
void | preParse () |
Allows a listener to override the word id map before parsing. More... | |
bool | processNode (ScriptNodeList::iterator &i, ScriptNodeList::iterator &end) |
Delegates to the listener if it can, otherwise returns false. If it returns true, then some input was consumed. More... | |
Private Member Functions | |
void | compileAffector (const ScriptNodePtr &node) |
void | compileEmitter (const ScriptNodePtr &node) |
void | compileParticleSystem (const ScriptNodePtr &node) |
String | getParameterValue (ScriptNodeList::iterator &i, ScriptNodeList::iterator &end) |
Private Attributes | |
ParticleScriptCompilerListener * | mListener |
ParticleSystem * | mSystem |
Definition at line 56 of file OgreParticleScriptCompiler.h.
|
inherited |
Definition at line 200 of file OgreScriptCompiler.h.
|
inherited |
Definition at line 199 of file OgreScriptCompiler.h.
|
inherited |
Definition at line 190 of file OgreScriptCompiler.h.
|
inherited |
Enumerator | |
---|---|
ID_ON | |
ID_OFF | |
ID_TRUE | |
ID_FALSE | |
ID_YES | |
ID_NO |
Definition at line 311 of file OgreScriptCompiler.h.
|
inherited |
Definition at line 203 of file OgreScriptCompiler.h.
Ogre::ParticleScriptCompiler::ParticleScriptCompiler | ( | ) |
|
inherited |
Compiles the given abstract syntax tree.
|
inherited |
Internal method for firing the handleEvent method.
|
inherited |
Generates the AST from the given string script.
|
inherited |
Adds the given error to the compiler's list of errors.
|
inherited |
Adds a name exclusion to the map.
Name exclusions identify object types which cannot accept names. This means that excluded types will always have empty names. All values in the object header are stored as object values.
|
inherited |
Takes in a string of script code and compiles it into resources.
str | The script code |
source | The source of the script code (e.g. a script file) |
group | The resource group to place the compiled resources into |
|
inherited |
Compiles resources from the given concrete node list.
|
private |
|
private |
|
protected |
This begins the compilation of the particle system from the final transformed AST.
|
private |
|
protected |
Allows a listener to override error handling in the compiler.
|
inherited |
Returns the currently set listener.
|
private |
ParticleSystem* Ogre::ParticleScriptCompiler::getParticleSystem | ( | ) | const |
Returns the particle system currently being compiled.
|
inherited |
Returns the resource group currently set for this compiler.
|
protected |
This is the override for loading imports.
|
inlineinherited |
Definition at line 95 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 101 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 107 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 112 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 118 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
operator new, with debug line info
Definition at line 67 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 72 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
placement operator new
Definition at line 78 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
array operator new, with debug line info
Definition at line 85 of file OgreMemoryAllocatedObject.h.
|
inlineinherited |
Definition at line 90 of file OgreMemoryAllocatedObject.h.
|
protected |
Allows a listener to override the word id map before parsing.
|
protected |
Delegates to the listener if it can, otherwise returns false. If it returns true, then some input was consumed.
|
inherited |
Removes a name exclusion.
void Ogre::ParticleScriptCompiler::setListener | ( | ParticleScriptCompilerListener * | listener | ) |
Sets the listener for this compiler.
|
inherited |
Sets the listener used by the compiler.
|
private |
Definition at line 82 of file OgreParticleScriptCompiler.h.
|
private |
Definition at line 85 of file OgreParticleScriptCompiler.h.