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);
396 class ScriptTranslator;
397 class ScriptTranslatorManager;
435 void clearTranslatorManagers();
453 void addScriptPattern(
const String &pattern);
459 Real getLoadingOrder(
void)
const;
555 :
ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
556 mSyntax(syntax), mProgramType(programType)
569 :
ScriptCompilerEvent(eventType), mFile(file), mName(name), mResourceGroup(resourceGroup), mSource(source),
570 mLanguage(language), mProgramType(programType)
879 #ifdef RTSHADER_SYSTEM_BUILD_CORE_SHADERS
multimap< String, String >::type ImportRequestMap
list< ConcreteNodePtr >::type ConcreteNodeList
map< String, String >::type mEnv
The ScriptTranslatorManager manages the lifetime and access to script translators.
float Real
Software floating point type.
vector< ScriptTranslatorManager * >::type mManagers
SharedPtr< Error > ErrorPtr
SharedPtr< ConcreteNode > ConcreteNodePtr
Variant type that can hold Any other type.
#define OGRE_THREAD_POINTER(T, var)
ScriptCompiler * mCompiler
CreateHighLevelGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source, const String &language, GpuProgramType programType)
Template class for creating single-instance global classes.
CreateGpuSharedParametersScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
AbstractNodeList overrides
GpuProgramType
Enumerates the types of programs which can run on the GPU.
ConcreteNodeType
These enums hold the types of the concrete parsed nodes.
Suport for shader model 5.0.
This abstract node represents an import statement.
Class encapsulates rendering properties of an object.
This is a listener for the compiler.
map< String, String >::type Environment
This abstract node represents a variable assignment.
uint32 mLargestRegisteredWordId
CreateGpuProgramScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup, const String &source, const String &syntax, GpuProgramType programType)
This class translates script AST (abstract syntax tree) into Ogre resources.
ProcessNameExclusionScriptCompilerEvent(const String &cls, AbstractNode *parent)
SharedPtr< ConcreteNodeList > ConcreteNodeListPtr
This abstract node represents a script property.
ResourceType mResourceType
SharedPtr< AbstractNodeList > AbstractNodeListPtr
Abstract class defining the interface used by classes which wish to perform script loading to define ...
This specific abstract node represents a script object.
CreateCompositorScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
AliasTextureNamePairList * mAliases
virtual ~ScriptCompiler()
virtual ~ScriptCompilerListener()
StringVector mScriptPatterns
virtual ~ScriptCompilerEvent()
This struct is a base class for events which can be thrown by the compilers and caught by subscribers...
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
list< AbstractNodePtr >::type AbstractNodeList
PreApplyTextureAliasesScriptCompilerEvent(Material *material, AliasTextureNamePairList *aliases)
vector< String >::type bases
ScriptCompilerEvent(const String &type)
ImportRequestMap mImportRequests
Manages threaded compilation of scripts.
CreateParticleSystemScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
vector< String >::type StringVector
AbstractNodeListPtr mNodes
AbstractNodeList children
map< String, AbstractNodeListPtr >::type ImportCacheMap
list< ErrorPtr >::type ErrorList
ScriptCompilerListener * mListener
ProcessResourceNameScriptCompilerEvent(ResourceType resourceType, const String &name)
ScriptCompilerListener * mListener
This is an abstract node which cannot be broken down further.
HashMap< String, uint32 > IdMap
SharedPtr< AbstractNode > AbstractNodePtr
GpuProgramType mProgramType
GpuProgramType mProgramType
ScriptTranslatorManager * mBuiltinTranslatorManager
AbstractNodeList mImportTable
Reference-counted shared pointer, used for objects where implicit destruction is required.
ConcreteNodeList children
This is the main class for the compiler.
AbstractNodeType
This enum holds the types of the possible abstract nodes.
CreateMaterialScriptCompilerEvent(const String &file, const String &name, const String &resourceGroup)
map< String, String >::type AliasTextureNamePairList
Alias / Texture name pair (first = alias, second = texture name)
ScriptCompilerEvent & operator=(const ScriptCompilerEvent &)