Description
Namespaces
Classes
Initialization
Enumerations
Typedefs
Variables
Functions
|
|
|
|
bool |
isLocalVarLocation(const varLocation_t & l) |
|
|
bool |
isStaticVarLocation(const varLocation_t & l) |
|
|
bool |
isValidVarLocation(const varLocation_t & l) |
template< typename target_t > |
|
target_t |
convertTo( Runtime & void, ObjPtr void) |
template< class T > |
|
T * |
assertType( Runtime & void, const ObjPtr & void) |
|
|
void |
declareFunction( Type * type, StringId nameId, _functionPtr fn) Add a type Function attribute totype with given name. |
|
|
void |
declareFunction( Type * type, const char * name, _functionPtr fn) |
|
|
void |
declareFunction( Type * type, StringId nameId, int minParamCount, int maxParamCount, _functionPtr fn) |
|
|
void |
declareFunction( Type * type, const char * name, int minParamCount, int maxParamCount, _functionPtr fn) |
|
|
void |
declareConstant( Type * type, StringId nameId, const RtValue & value) |
|
|
void |
declareConstant( Type * type, const char * name, const RtValue & value) |
|
|
void |
declareFunction( Namespace * nameSpace, StringId nameId, _functionPtr fn) |
|
|
void |
declareFunction( Namespace * nameSpace, const char * name, _functionPtr fn) |
|
|
void |
declareFunction( Namespace * nameSpace, StringId nameId, int minParamCount, int maxParamCount, _functionPtr fn) |
|
|
void |
declareFunction( Namespace * nameSpace, const char * name, int minParamCount, int maxParamCount, _functionPtr fn) |
|
|
void |
declareConstant( Namespace * nameSpace, StringId nameId, const RtValue & value) |
|
|
void |
declareConstant( Namespace * nameSpace, const char * name, const RtValue & value) |
|
|
void |
declareObjectFunction( Type * type, const char * name, _functionPtr fn) Adds a function as object attribute (it is copied to each instance) |
|
|
void |
initPrintableName( Type * type, const std::string & printableName) |
|
|
void |
initPrintableName( ExtObject * type, const std::string & printableName) |
|
|
void |
markAttributeAsObjectAttribute( Type * type, StringId nameId) |
|
|
void |
markAttributeAsObjectAttribute( Type * type, const char * name) |
|
|
void |
copyAttributeAsAlias( Type * type, const char * originalName, const char * aliasName) |
|
|
identifierId |
stringToIdentifierId(const std::string & s) |
|
|
const std::string & |
identifierIdToString( identifierId id) |
|
|
hashvalue |
_hash(const std::string & s) (internal) |
|
|
void |
assertParamCount( Runtime & runtime, const ParameterValues & params, int min, int max) |
|
|
void |
assertParamCount( Runtime & runtime, const size_t paramCount, int min, int max) |
template< class T > |
|
T * |
assertType( Runtime & runtime, const ObjPtr & obj) |
|
|
ObjRef |
callMemberFunction( Runtime & rt, ObjPtr obj, StringId fnNameId, const ParameterValues & params) |
|
|
ObjRef |
callFunction( Runtime & rt, Object * function, const ParameterValues & params) |
|
|
ObjRef |
_eval( Runtime & runtime, const CodeFragment & code, const std::unordered_map< StringId , ObjRef > & staticVars) |
|
|
std::pair< bool, ObjRef > |
eval( Runtime & runtime, const StringData & code, const StringId & fileId, const std::unordered_map< StringId , ObjRef > & staticVars) |
|
|
std::pair< bool, ObjRef > |
eval( Runtime & runtime, const StringData & code, const StringId & fileId) |
|
|
std::pair< bool, ObjRef > |
executeStream( Runtime & runtime, std::istream & stream) |
|
|
ObjRef |
_loadAndExecute( Runtime & runtime, const std::string & filename, const std::unordered_map< StringId , ObjRef > & staticVars) |
|
|
std::pair< bool, ObjRef > |
loadAndExecute( Runtime & runtime, const std::string & filename) |
|
|
std::pair< bool, ObjRef > |
loadAndExecute( Runtime & runtime, const std::string & filename, const std::unordered_map< StringId , ObjRef > & staticVars) |
|
|
void |
throwRuntimeException(const std::string & what) creates and throws an Exception objects. |
template< > |
|
bool |
convertTo< bool >( Runtime & void, ObjPtr src) |
template< > |
|
double |
convertTo< double >( Runtime & rt, ObjPtr src) |
template< > |
|
float |
convertTo< float >( Runtime & rt, ObjPtr src) |
template< > |
|
long long |
convertTo< long long >( Runtime & rt, ObjPtr src) |
template< > |
|
unsigned long long |
convertTo< unsigned long long >( Runtime & rt, ObjPtr src) |
template< > |
|
long |
convertTo< long >( Runtime & rt, ObjPtr src) |
template< > |
|
unsigned long |
convertTo< unsigned long >( Runtime & rt, ObjPtr src) |
template< > |
|
int |
convertTo< int >( Runtime & rt, ObjPtr src) |
template< > |
|
unsigned int |
convertTo< unsigned int >( Runtime & rt, ObjPtr src) |
template< > |
|
short |
convertTo< short >( Runtime & rt, ObjPtr src) |
template< > |
|
unsigned short |
convertTo< unsigned short >( Runtime & rt, ObjPtr src) |
template< > |
|
std::string |
convertTo< std::string >( Runtime & void, ObjPtr src) |
|
|
Array * |
create(const std::vector< Object * > & void) |
|
|
String * |
create(const StringData & void) |
|
|
String * |
create(const std::string & void) |
|
|
String * |
create(const char * void) |
|
|
Void * |
create(std::nullptr_t void) |
|
|
Object * |
create(const ObjRef & obj) |
template< class T , class > |
|
Bool * |
create(T value) |
template< class T , class > |
|
Number * |
create(T value) |
template< typename source_t > |
|
RtValue |
value(source_t obj, typename std::enable_if< std::is_convertible< source_t, RtValue >::value >::type * void) |
template< typename source_t > |
|
RtValue |
value(source_t obj, typename std::enable_if<!std::is_convertible< source_t, RtValue >::value >::type * void) |
Documentation
typedef
EScript::libInitFunction
Defined in EScript/EScript/EScript.h:47
function
EScript::init
Init the EScript system and all registered libraries. Has to be called once before any script can be executed
Defined in EScript/EScript/EScript.h:51
function
EScript::initLibrary
Calls the the given init(…) function with the SGLOBALS-Object (static global namespace).
Note: Can be used manually as an alternative to the automatic registerLibraryForInitialization-way.
Defined in EScript/EScript/EScript.h:55
function
EScript::getSGlobals
(internal) Get the static super global namespace.
Defined in EScript/EScript/EScript.h:58
enum
EScript::variableType_t
Enumerator |
|
Description |
Enumerator |
|
Description |
LOCAL_VAR |
|
|
STATIC_VAR |
|
|
Defined in EScript/EScript/Compiler/VariableTypes.h:15
typedef
EScript::declaredVariableMap_t
Defined in EScript/EScript/Compiler/VariableTypes.h:19
typedef
EScript::varLocation_t
Defined in EScript/EScript/Compiler/VariableTypes.h:21
typedef
EScript::internalTypeId_t
Defined in EScript/EScript/Objects/typeIds.h:16
typedef
EScript::ObjPtr
Defined in EScript/EScript/Utils/ConversionBasics.h:18
typedef
EScript::ObjRef
Defined in EScript/EScript/Utils/DeclarationHelper.h:30
typedef
EScript::ParameterValues
Defined in EScript/EScript/Utils/DeclarationHelper.h:33
typedef
EScript::_functionPtr
Defined in EScript/EScript/Utils/DeclarationHelper.h:35
typedef
EScript::hashvalue
Defined in EScript/EScript/Utils/Hashing.h:15
typedef
EScript::identifierId
Defined in EScript/EScript/Utils/Hashing.h:16
typedef
EScript::ObjPtr_const
Defined in EScript/EScript/Utils/ObjRef.h:321
variable
EScript::ES_UNKNOWN_IDENTIFIER
Defined in EScript/EScript/Utils/Hashing.h:18
function
EScript::isLocalVarLocation
Defined in EScript/EScript/Compiler/VariableTypes.h:22
function
EScript::isStaticVarLocation
Defined in EScript/EScript/Compiler/VariableTypes.h:25
function
EScript::isValidVarLocation
Defined in EScript/EScript/Compiler/VariableTypes.h:28
function
EScript::convertTo
Convert the given EScript object to a desired typeif the conversion fails, an exception is thrown.
Defined in EScript/EScript/Utils/ConversionBasics.h:22
function
EScript::assertType
Defined in EScript/EScript/Utils/ConversionBasics.h:24
function
EScript::declareFunction
Add a type Function attribute totype
with given name.
Defined in EScript/EScript/Utils/DeclarationHelper.h:39
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:40
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:41
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:42
function
EScript::declareConstant
Defined in EScript/EScript/Utils/DeclarationHelper.h:43
function
EScript::declareConstant
Defined in EScript/EScript/Utils/DeclarationHelper.h:44
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:46
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:47
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:48
function
EScript::declareFunction
Defined in EScript/EScript/Utils/DeclarationHelper.h:49
function
EScript::declareConstant
Defined in EScript/EScript/Utils/DeclarationHelper.h:50
function
EScript::declareConstant
Defined in EScript/EScript/Utils/DeclarationHelper.h:51
function
EScript::declareObjectFunction
Adds a function as object attribute (it is copied to each instance)
Defined in EScript/EScript/Utils/DeclarationHelper.h:54
function
EScript::initPrintableName
Defined in EScript/EScript/Utils/DeclarationHelper.h:56
function
EScript::initPrintableName
Defined in EScript/EScript/Utils/DeclarationHelper.h:57
function
EScript::markAttributeAsObjectAttribute
Defined in EScript/EScript/Utils/DeclarationHelper.h:59
function
EScript::markAttributeAsObjectAttribute
Defined in EScript/EScript/Utils/DeclarationHelper.h:60
function
EScript::copyAttributeAsAlias
Defined in EScript/EScript/Utils/DeclarationHelper.h:62
function
EScript::stringToIdentifierId
Defined in EScript/EScript/Utils/Hashing.h:20
function
EScript::identifierIdToString
Defined in EScript/EScript/Utils/Hashing.h:21
function
EScript::_hash
(internal)
Defined in EScript/EScript/Utils/Hashing.h:24
function
EScript::assertParamCount
Check if the number of given parameters is in the given range (min <= number <= max). A range value of <0 accepts an arbitrary number of parameters. If too many parameters are given, a warning message is shown. If too few parameter are given, a runtime error is thrown.
Defined in EScript/EScript/Utils/RuntimeHelper.h:51
function
EScript::assertParamCount
Defined in EScript/EScript/Utils/RuntimeHelper.h:56
function
EScript::assertType
Try to cast the given object to the specified type. If the object is not of the appropriate type, a runtime error is thrown.
Defined in EScript/EScript/Utils/RuntimeHelper.h:66
function
EScript::callMemberFunction
Defined in EScript/EScript/Utils/RuntimeHelper.h:73
function
EScript::callFunction
Defined in EScript/EScript/Utils/RuntimeHelper.h:74
function
EScript::_eval
Compile and execute the given code and return the result.
Note: may throw ‘std::exception’ or ‘ Object *’ on failure.
Defined in EScript/EScript/Utils/RuntimeHelper.h:78
function
EScript::eval
Compile and execute the given code. If the code could be executed without an exception, (true,result) is returned; if an exception (of type Object*) occured (false,exception) is returned and the error message is sent to the runtime’s logger.
Parameters
- fileId
- Name used to identify the executed code in exception messages and stack traces; the default is ‘[inline]’
Returns
(success, result)
Defined in EScript/EScript/Utils/RuntimeHelper.h:85
function
EScript::eval
Defined in EScript/EScript/Utils/RuntimeHelper.h:86
function
EScript::executeStream
Returns
(success, result)
Defined in EScript/EScript/Utils/RuntimeHelper.h:89
function
EScript::_loadAndExecute
Returns
result (mmay throw an exception)
Defined in EScript/EScript/Utils/RuntimeHelper.h:92
function
EScript::loadAndExecute
Returns
(success, result)
Defined in EScript/EScript/Utils/RuntimeHelper.h:95
function
EScript::loadAndExecute
Defined in EScript/EScript/Utils/RuntimeHelper.h:96
function
EScript::throwRuntimeException
creates and throws an Exception objects.
Defined in EScript/EScript/Utils/RuntimeHelper.h:99
function
EScript::convertTo< bool >
Defined in EScript/EScript/Utils/StdConversions.h:18
function
EScript::convertTo< double >
Defined in EScript/EScript/Utils/StdConversions.h:24
function
EScript::convertTo< float >
Defined in EScript/EScript/Utils/StdConversions.h:26
function
EScript::convertTo< long long >
Defined in EScript/EScript/Utils/StdConversions.h:30
function
EScript::convertTo< unsigned long long >
Defined in EScript/EScript/Utils/StdConversions.h:34
function
EScript::convertTo< long >
Defined in EScript/EScript/Utils/StdConversions.h:38
function
EScript::convertTo< unsigned long >
Defined in EScript/EScript/Utils/StdConversions.h:42
function
EScript::convertTo< int >
Defined in EScript/EScript/Utils/StdConversions.h:46
function
EScript::convertTo< unsigned int >
Defined in EScript/EScript/Utils/StdConversions.h:50
function
EScript::convertTo< short >
Defined in EScript/EScript/Utils/StdConversions.h:54
function
EScript::convertTo< unsigned short >
Defined in EScript/EScript/Utils/StdConversions.h:58
function
EScript::convertTo< std::string >
Defined in EScript/EScript/Utils/StdConversions.h:64
function
EScript::create
Factories for types that are not results of unwanted implicit type conversions.
Defined in EScript/EScript/Utils/StdFactories.h:29
function
EScript::create
Defined in EScript/EScript/Utils/StdFactories.h:30
function
EScript::create
Defined in EScript/EScript/Utils/StdFactories.h:31
function
EScript::create
Defined in EScript/EScript/Utils/StdFactories.h:32
function
EScript::create
Defined in EScript/EScript/Utils/StdFactories.h:33
function
EScript::create
Defined in EScript/EScript/Utils/StdFactories.h:34
function
EScript::create
|
|
|
template< class T , class = typename std::enable_if<std::is_same<T,bool>::value>::type > |
|
|
Bool * create( |
T |
value ) |
Defined in EScript/EScript/Utils/StdFactories.h:50
function
EScript::create
|
|
|
|
|
|
|
template< class T , class = typename std::enable_if<std::is_same<T,double>::value |
|
std::is_same<T,float>::value |
|
std::is_same<T,int>::value |
|
std::is_same<T,uint32_t>::value>::type > |
Number * create( |
T |
value ) |
|
|
|
|
Defined in EScript/EScript/Utils/StdFactories.h:55
function
EScript::value
|
|
|
template< typename source_t > |
|
|
RtValue value( |
source_t |
obj, |
|
typename std::enable_if< std::is_convertible< source_t, RtValue >::value >::type * |
void |
) |
|
|
EScript::value(someValue) returns a RtValue wrapping ‘someValue’. If ‘someValue’ can not be represented as RtValue directly, a corresponding EScript object is created by calling EScript::create(someValue).
Note: All specific create functions must be present before this file is included in order to be found by the compiler.
See also: http://gcc.gnu.org/gcc-4.7/porting_to.html(Name lookup changes)
Defined in EScript/EScript/Utils/StdFactories.h:65
function
EScript::value
|
|
|
template< typename source_t > |
|
|
RtValue value( |
source_t |
obj, |
|
typename std::enable_if<!std::is_convertible< source_t, RtValue >::value >::type * |
void |
) |
|
|
Defined in EScript/EScript/Utils/StdFactories.h:70