Go to the documentation of this file.
29 #ifndef __SCRIPTCOMPILER_H_
30 #define __SCRIPTCOMPILER_H_
105 virtual String getValue()
const = 0;
119 void parseNumber()
const;
140 void addVariable(
const String &name);
141 void setVariable(
const String &name,
const String &value);
142 std::pair<bool,String> getVariable(
const String &name)
const;
192 typedef HashMap<String,uint32>
IdMap;
218 CE_REFERENCETOANONEXISTINGOBJECT
237 bool _compile(
AbstractNodeListPtr nodes,
const String &group,
bool doImports =
true,
bool doObjects =
true,
bool doVariables =
true);
245 const String &getResourceGroup()
const;
252 void addNameExclusion(
const String &type);
254 void removeNameExclusion(
const String &type);
378 class ScriptTranslator;
379 class ScriptTranslatorManager;
417 void clearTranslatorManagers();
422 void addScriptPattern(
const String &pattern);
428 Real getLoadingOrder(
void)
const;
524 :
ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
525 mSyntax(syntax), mProgramType(programType)
538 :
ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
539 mLanguage(language), mProgramType(programType)
848 #ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
SharedPtr< ConcreteNodeList > ConcreteNodeListPtr
HashMap< String, uint32 > IdMap
GpuProgramType mProgramType
ScriptCompilerListener * mListener
GpuProgramType mProgramType
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
This class translates script AST (abstract syntax tree) into Ogre resources.
ProcessResourceNameScriptCompilerEvent(ResourceType resourceType, const String &name)
#define OGRE_THREAD_POINTER(T, var)
AbstractNodeList overrides
This abstract node represents a variable assignment.
@ ID_SHADOW_CASTER_VERTEX_PROGRAM_REF
@ ID_POLYGON_MODE_OVERRIDEABLE
vector< String >::type bases
@ ID_CAMERA_FAR_CORNERS_VIEW_SPACE
This abstract node represents an import statement.
vector< String >::type StringVector
@ ID_GEOMETRY_PROGRAM_REF
This struct is a base class for events which can be thrown by the compilers and caught by subscribers...
@ ID_TESSELATION_HULL_PROGRAM
Suport for shader model 5.0.
@ CE_OBJECTALLOCATIONERROR
@ ID_SEPARATE_SCENE_BLEND_OP
@ ID_SHADOW_CASTER_MATERIAL
@ ID_SHADOW_RECEIVER_MATERIAL
@ ID_SHADOW_CASTER_FRAGMENT_PROGRAM_REF
@ ID_TRANSPARENCY_CASTS_SHADOWS
Class encapsulates rendering properties of an object.
Variant type that can hold Any other type.
ScriptCompilerEvent & operator=(const ScriptCompilerEvent &)
@ ID_ONE_MINUS_DEST_COLOUR
This specific abstract node represents a script object.
ConcreteNodeType
These enums hold the types of the concrete parsed nodes.
map< String, String >::type Environment
list< ErrorPtr >::type ErrorList
@ ID_CAMERA_FAR_CORNERS_WORLD_SPACE
ScriptCompilerListener * mListener
CreateGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source, const String &syntax, GpuProgramType programType)
StringVector mScriptPatterns
GpuProgramType
Enumerates the types of programs which can run on the GPU.
SharedPtr< ConcreteNode > ConcreteNodePtr
virtual ~ScriptCompiler()
AbstractNodeList mImportTable
@ ID_ONE_MINUS_SRC_COLOUR
CreateCompositorScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
PreApplyTextureAliasesScriptCompilerEvent(Material *material, AliasTextureNamePairList *aliases)
@ ID_BLEND_DIFFUSE_COLOUR
ImportRequestMap mImportRequests
This is the main class for the compiler.
@ ID_SHADOW_RECEIVER_FRAGMENT_PROGRAM_REF
SharedPtr< AbstractNodeList > AbstractNodeListPtr
The ScriptTranslatorManager manages the lifetime and access to script translators.
@ CE_FEWERPARAMETERSEXPECTED
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
Template class for creating single-instance global classes.
CreateHighLevelGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source, const String &language, GpuProgramType programType)
@ ID_SEPARATE_SCENE_BLEND
Manages threaded compilation of scripts.
ScriptTranslatorManager * mBuiltinTranslatorManager
virtual ~ScriptCompilerListener()
@ ID_TARGET_HEIGHT_SCALED
ScriptCompilerEvent(const String &type)
@ CE_UNSUPPORTEDBYRENDERSYSTEM
@ ID_POINT_SIZE_ATTENUATION
Abstract class defining the interface used by classes which wish to perform script loading to define ...
Reference-counted shared pointer, used for objects where implicit destruction is required.
CreateParticleSystemScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
AbstractNodeListPtr mNodes
list< ConcreteNodePtr >::type ConcreteNodeList
@ ID_COLOUR_OP_MULTIPASS_FALLBACK
list< AbstractNodePtr >::type AbstractNodeList
This is an abstract node which cannot be broken down further.
virtual ~ScriptCompilerEvent()
AbstractNodeType
This enum holds the types of the possible abstract nodes.
@ ID_TESSELATION_HULL_PROGRAM_REF
ProcessNameExclusionScriptCompilerEvent(const String &cls, AbstractNode *parent)
float Real
Software floating point type.
AliasTextureNamePairList * mAliases
vector< ScriptTranslatorManager * >::type mManagers
@ ID_FRAGMENT_PROGRAM_REF
ConcreteNodeList children
@ ID_ITERATION_DEPTH_BIAS
This abstract node represents a script property.
map< String, AbstractNodeListPtr >::type ImportCacheMap
@ ID_ONE_MINUS_DEST_ALPHA
multimap< String, String >::type ImportRequestMap
@ ID_TESSELATION_DOMAIN_PROGRAM_REF
map< String, String >::type mEnv
ScriptCompiler * mCompiler
AbstractNodeList children
@ ID_SHADOW_RECEIVER_VERTEX_PROGRAM_REF
SharedPtr< Error > ErrorPtr
This is a listener for the compiler.
SharedPtr< AbstractNode > AbstractNodePtr
@ ID_TESSELATION_DOMAIN_PROGRAM
ResourceType mResourceType
CreateMaterialScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15