ScummVM API documentation
asCScriptEngine Class Reference
Inheritance diagram for asCScriptEngine:
asIScriptEngine

Classes

struct  preMessage_t
 
struct  SContextClean
 
struct  SEngineClean
 
struct  SFunctionClean
 
struct  SModuleClean
 
struct  SScriptObjClean
 
struct  STypeInfoClean
 

Public Member Functions

virtual int AddRef () const
 
virtual int Release () const
 
virtual int ShutDownAndRelease ()
 
virtual int SetEngineProperty (asEEngineProp property, asPWORD value)
 
virtual asPWORD GetEngineProperty (asEEngineProp property) const
 
virtual int SetMessageCallback (const asSFuncPtr &callback, void *obj, asDWORD callConv)
 
virtual int ClearMessageCallback ()
 
virtual int WriteMessage (const char *section, int row, int col, asEMsgType type, const char *message)
 
virtual int SetJITCompiler (asIJITCompiler *compiler)
 
virtual asIJITCompilerGetJITCompiler () const
 
virtual int RegisterGlobalFunction (const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)
 
virtual asUINT GetGlobalFunctionCount () const
 
virtual asIScriptFunctionGetGlobalFunctionByIndex (asUINT index) const
 
virtual asIScriptFunctionGetGlobalFunctionByDecl (const char *declaration) const
 
virtual int RegisterGlobalProperty (const char *declaration, void *pointer)
 
virtual asUINT GetGlobalPropertyCount () const
 
virtual int GetGlobalPropertyByIndex (asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0, const char **configGroup=0, void **pointer=0, asDWORD *accessMask=0) const
 
virtual int GetGlobalPropertyIndexByName (const char *name) const
 
virtual int GetGlobalPropertyIndexByDecl (const char *decl) const
 
virtual int RegisterObjectType (const char *obj, int byteSize, asDWORD flags)
 
virtual int RegisterObjectProperty (const char *obj, const char *declaration, int byteOffset, int compositeOffset=0, bool isCompositeIndirect=false)
 
virtual int RegisterObjectMethod (const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)
 
virtual int RegisterObjectBehaviour (const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)
 
virtual int RegisterInterface (const char *name)
 
virtual int RegisterInterfaceMethod (const char *intf, const char *declaration)
 
virtual asUINT GetObjectTypeCount () const
 
virtual asITypeInfoGetObjectTypeByIndex (asUINT index) const
 
virtual int RegisterStringFactory (const char *datatype, asIStringFactory *factory)
 
virtual int GetStringFactoryReturnTypeId (asDWORD *flags) const
 
virtual int RegisterDefaultArrayType (const char *type)
 
virtual int GetDefaultArrayTypeId () const
 
virtual int RegisterEnum (const char *type)
 
virtual int RegisterEnumValue (const char *type, const char *name, int value)
 
virtual asUINT GetEnumCount () const
 
virtual asITypeInfoGetEnumByIndex (asUINT index) const
 
virtual int RegisterFuncdef (const char *decl)
 
virtual asUINT GetFuncdefCount () const
 
virtual asITypeInfoGetFuncdefByIndex (asUINT index) const
 
virtual int RegisterTypedef (const char *type, const char *decl)
 
virtual asUINT GetTypedefCount () const
 
virtual asITypeInfoGetTypedefByIndex (asUINT index) const
 
virtual int BeginConfigGroup (const char *groupName)
 
virtual int EndConfigGroup ()
 
virtual int RemoveConfigGroup (const char *groupName)
 
virtual asDWORD SetDefaultAccessMask (asDWORD defaultMask)
 
virtual int SetDefaultNamespace (const char *nameSpace)
 
virtual const char * GetDefaultNamespace () const
 
virtual asIScriptModuleGetModule (const char *module, asEGMFlags flag)
 
virtual int DiscardModule (const char *module)
 
virtual asUINT GetModuleCount () const
 
virtual asIScriptModuleGetModuleByIndex (asUINT index) const
 
virtual asIScriptFunctionGetFunctionById (int funcId) const
 
virtual int GetTypeIdByDecl (const char *decl) const
 
virtual const char * GetTypeDeclaration (int typeId, bool includeNamespace=false) const
 
virtual int GetSizeOfPrimitiveType (int typeId) const
 
virtual asITypeInfoGetTypeInfoById (int typeId) const
 
virtual asITypeInfoGetTypeInfoByName (const char *name) const
 
virtual asITypeInfoGetTypeInfoByDecl (const char *decl) const
 
virtual asIScriptContextCreateContext ()
 
virtual void * CreateScriptObject (const asITypeInfo *type)
 
virtual void * CreateScriptObjectCopy (void *obj, const asITypeInfo *type)
 
virtual void * CreateUninitializedScriptObject (const asITypeInfo *type)
 
virtual asIScriptFunctionCreateDelegate (asIScriptFunction *func, void *obj)
 
virtual int AssignScriptObject (void *dstObj, void *srcObj, const asITypeInfo *type)
 
virtual void ReleaseScriptObject (void *obj, const asITypeInfo *type)
 
virtual void AddRefScriptObject (void *obj, const asITypeInfo *type)
 
virtual int RefCastObject (void *obj, asITypeInfo *fromType, asITypeInfo *toType, void **newPtr, bool useOnlyImplicitCast=false)
 
virtual asILockableSharedBoolGetWeakRefFlagOfScriptObject (void *obj, const asITypeInfo *type) const
 
virtual asIScriptContextRequestContext ()
 
virtual void ReturnContext (asIScriptContext *ctx)
 
virtual int SetContextCallbacks (asREQUESTCONTEXTFUNC_t requestCtx, asRETURNCONTEXTFUNC_t returnCtx, void *param=0)
 
virtual asETokenClass ParseToken (const char *string, size_t stringLength=0, asUINT *tokenLength=0) const
 
virtual int GarbageCollect (asDWORD flags=asGC_FULL_CYCLE, asUINT numIterations=1)
 
virtual void GetGCStatistics (asUINT *currentSize, asUINT *totalDestroyed, asUINT *totalDetected, asUINT *newObjects, asUINT *totalNewDestroyed) const
 
virtual int NotifyGarbageCollectorOfNewObject (void *obj, asITypeInfo *type)
 
virtual int GetObjectInGC (asUINT idx, asUINT *seqNbr, void **obj=0, asITypeInfo **type=0)
 
virtual void GCEnumCallback (void *reference)
 
virtual void ForwardGCEnumReferences (void *ref, asITypeInfo *type)
 
virtual void ForwardGCReleaseReferences (void *ref, asITypeInfo *type)
 
virtual void SetCircularRefDetectedCallback (asCIRCULARREFFUNC_t callback, void *param=0)
 
virtual void * SetUserData (void *data, asPWORD type)
 
virtual void * GetUserData (asPWORD type) const
 
virtual void SetEngineUserDataCleanupCallback (asCLEANENGINEFUNC_t callback, asPWORD type)
 
virtual void SetModuleUserDataCleanupCallback (asCLEANMODULEFUNC_t callback, asPWORD type)
 
virtual void SetContextUserDataCleanupCallback (asCLEANCONTEXTFUNC_t callback, asPWORD type)
 
virtual void SetFunctionUserDataCleanupCallback (asCLEANFUNCTIONFUNC_t callback, asPWORD type)
 
virtual void SetTypeInfoUserDataCleanupCallback (asCLEANTYPEINFOFUNC_t callback, asPWORD type)
 
virtual void SetScriptObjectUserDataCleanupCallback (asCLEANSCRIPTOBJECTFUNC_t callback, asPWORD type)
 
virtual int SetTranslateAppExceptionCallback (asSFuncPtr callback, void *param, int callConv)
 
int RegisterMethodToObjectType (asCObjectType *objectType, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)
 
int RegisterBehaviourToObjectType (asCObjectType *objectType, asEBehaviours behaviour, const char *decl, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)
 
int VerifyVarTypeNotInFunction (asCScriptFunction *func)
 
void * CallAlloc (const asCObjectType *objType) const
 
void CallFree (void *obj) const
 
void * CallGlobalFunctionRetPtr (int func) const
 
void * CallGlobalFunctionRetPtr (int func, void *param1) const
 
void * CallGlobalFunctionRetPtr (asSSystemFunctionInterface *func, asCScriptFunction *desc) const
 
void * CallGlobalFunctionRetPtr (asSSystemFunctionInterface *i, asCScriptFunction *s, void *param1) const
 
void CallObjectMethod (void *obj, int func) const
 
void CallObjectMethod (void *obj, void *param, int func) const
 
void CallObjectMethod (void *obj, asSSystemFunctionInterface *func, asCScriptFunction *desc) const
 
void CallObjectMethod (void *obj, void *param, asSSystemFunctionInterface *func, asCScriptFunction *desc) const
 
bool CallObjectMethodRetBool (void *obj, int func) const
 
int CallObjectMethodRetInt (void *obj, int func) const
 
void * CallObjectMethodRetPtr (void *obj, int func) const
 
void * CallObjectMethodRetPtr (void *obj, int param1, asCScriptFunction *func) const
 
void CallGlobalFunction (void *param1, void *param2, asSSystemFunctionInterface *func, asCScriptFunction *desc) const
 
bool CallGlobalFunctionRetBool (void *param1, void *param2, asSSystemFunctionInterface *func, asCScriptFunction *desc) const
 
int CallScriptObjectMethod (void *obj, int func)
 
void ConstructScriptObjectCopy (void *mem, void *obj, asCObjectType *type)
 
void DeleteDiscardedModules ()
 
void RemoveTemplateInstanceType (asCObjectType *t)
 
asCConfigGroupFindConfigGroupForFunction (int funcId) const
 
asCConfigGroupFindConfigGroupForGlobalVar (int gvarId) const
 
asCConfigGroupFindConfigGroupForTypeInfo (const asCTypeInfo *type) const
 
asCConfigGroupFindConfigGroupForFuncDef (const asCFuncdefType *funcDef) const
 
int RequestBuild ()
 
void BuildCompleted ()
 
void PrepareEngine ()
 
int CreateContext (asIScriptContext **context, bool isInternal)
 
asCTypeInfoGetRegisteredType (const asCString &name, asSNameSpace *ns) const
 
asCObjectTypeGetListPatternType (int listPatternFuncId)
 
void DestroyList (asBYTE *buffer, const asCObjectType *listPatternType)
 
void DestroySubList (asBYTE *&buffer, asSListPatternNode *&patternNode)
 
int AddBehaviourFunction (asCScriptFunction &func, asSSystemFunctionInterface &internal)
 
asCString GetFunctionDeclaration (int funcId)
 
asCScriptFunctionGetScriptFunction (int funcId) const
 
asCModuleGetModule (const char *name, bool create)
 
asCModuleGetModuleFromFuncId (int funcId)
 
int GetMethodIdByDecl (const asCObjectType *ot, const char *decl, asCModule *mod)
 
int GetFactoryIdByDecl (const asCObjectType *ot, const char *decl)
 
int GetNextScriptFunctionId ()
 
void AddScriptFunction (asCScriptFunction *func)
 
void RemoveScriptFunction (asCScriptFunction *func)
 
void RemoveFuncdef (asCFuncdefType *func)
 
int ConfigError (int err, const char *funcName, const char *arg1, const char *arg2)
 
int GetTypeIdFromDataType (const asCDataType &dt) const
 
asCDataType GetDataTypeFromTypeId (int typeId) const
 
asCObjectTypeGetObjectTypeFromTypeId (int typeId) const
 
void RemoveFromTypeIdMap (asCTypeInfo *type)
 
bool IsTemplateType (const char *name) const
 
int SetTemplateRestrictions (asCObjectType *templateType, asCScriptFunction *func, const char *caller, const char *decl)
 
asCObjectTypeGetTemplateInstanceType (asCObjectType *templateType, asCArray< asCDataType > &subTypes, asCModule *requestingModule)
 
asCScriptFunctionGenerateTemplateFactoryStub (asCObjectType *templateType, asCObjectType *templateInstanceType, int origFactoryId)
 
bool GenerateNewTemplateFunction (asCObjectType *templateType, asCObjectType *templateInstanceType, asCScriptFunction *templateFunc, asCScriptFunction **newFunc)
 
asCFuncdefTypeGenerateNewTemplateFuncdef (asCObjectType *templateType, asCObjectType *templateInstanceType, asCFuncdefType *templateFuncdef)
 
asCDataType DetermineTypeForTemplate (const asCDataType &orig, asCObjectType *tmpl, asCObjectType *ot)
 
bool RequireTypeReplacement (asCDataType &type, asCObjectType *templateType)
 
asCModuleFindNewOwnerForSharedType (asCTypeInfo *type, asCModule *mod)
 
asCModuleFindNewOwnerForSharedFunc (asCScriptFunction *func, asCModule *mod)
 
asCFuncdefTypeFindMatchingFuncdef (asCScriptFunction *func, asCModule *mod)
 
int DetermineNameAndNamespace (const char *in_name, asSNameSpace *implicitNs, asCString &out_name, asSNameSpace *&out_ns) const
 
asCGlobalPropertyAllocateGlobalProperty ()
 
void RemoveGlobalProperty (asCGlobalProperty *prop)
 
int GetScriptSectionNameIndex (const char *name)
 
asSNameSpaceAddNameSpace (const char *name)
 
asSNameSpaceFindNameSpace (const char *name) const
 
asSNameSpaceGetParentNameSpace (asSNameSpace *ns) const
 

Public Attributes

bool isPrepared
 
asCMemoryMgr memoryMgr
 
asCObjectTypedefaultArrayObjectType
 
asCObjectType scriptTypeBehaviours
 
asCObjectType functionBehaviours
 
asCArray< asCObjectType * > registeredObjTypes
 
asCArray< asCTypedefType * > registeredTypeDefs
 
asCArray< asCEnumType * > registeredEnums
 
asCSymbolTable< asCGlobalPropertyregisteredGlobalProps
 
asCSymbolTable< asCScriptFunctionregisteredGlobalFuncs
 
asCArray< asCFuncdefType * > registeredFuncDefs
 
asCArray< asCObjectType * > registeredTemplateTypes
 
asIStringFactorystringFactory
 
asCDataType stringType
 
bool configFailed
 
asCMap< asSNameSpaceNamePair, asCTypeInfo * > allRegisteredTypes
 
asCArray< asCTypeInfo * > templateSubTypes
 
asCArray< asCObjectType * > templateInstanceTypes
 
asCArray< asCObjectType * > listPatternTypes
 
asCArray< asCGlobalProperty * > globalProperties
 
asCArray< int > freeGlobalPropertyIds
 
asCMap< void *, asCGlobalProperty * > varAddressMap
 
asCArray< asCScriptFunction * > scriptFunctions
 
asCArray< int > freeScriptFunctionIds
 
asCArray< asCScriptFunction * > signatureIds
 
asCArray< sBindInfo * > importedFunctions
 
asCArray< int > freeImportedFunctionIdxs
 
asCAtomic refCount
 
asCArray< asCModule * > scriptModules
 
asCModulelastModule
 
bool isBuilding
 
asCArray< asCModule * > discardedModules
 
bool deferValidationOfTemplateTypes
 
asCTokenizer tok
 
asCArray< asCTypeInfo * > sharedScriptTypes
 
asCArray< asCObjectType * > generatedTemplateTypes
 
asCArray< asCFuncdefType * > funcDefs
 
asCArray< asCString * > scriptSectionNames
 
int typeIdSeqNbr
 
asCMap< int, asCTypeInfo * > mapTypeIdToTypeInfo
 
asCGarbageCollector gc
 
asCConfigGroup defaultGroup
 
asCArray< asCConfigGroup * > configGroups
 
asCConfigGroupcurrentGroup
 
asDWORD defaultAccessMask
 
asSNameSpacedefaultNamespace
 
bool msgCallback
 
asSSystemFunctionInterface msgCallbackFunc
 
void * msgCallbackObj
 
struct asCScriptEngine::preMessage_t preMessage
 
asIJITCompilerjitCompiler
 
asCArray< asSNameSpace * > nameSpaces
 
asREQUESTCONTEXTFUNC_t requestCtxFunc
 
asRETURNCONTEXTFUNC_t returnCtxFunc
 
void * ctxCallbackParam
 
asCArray< asPWORD > userData
 
asCArray< SEngineCleancleanEngineFuncs
 
asCArray< SModuleCleancleanModuleFuncs
 
asCArray< SContextCleancleanContextFuncs
 
asCArray< SFunctionCleancleanFunctionFuncs
 
asCArray< STypeInfoCleancleanTypeInfoFuncs
 
asCArray< SScriptObjCleancleanScriptObjectFuncs
 
struct {
   bool   allowUnsafeReferences
 
   bool   optimizeByteCode
 
   bool   copyScriptSections
 
   asUINT   maximumContextStackSize
 
   asUINT   initContextStackSize
 
   bool   useCharacterLiterals
 
   bool   allowMultilineStrings
 
   bool   allowImplicitHandleTypes
 
   bool   buildWithoutLineCues
 
   bool   initGlobalVarsAfterBuild
 
   bool   requireEnumScope
 
   int   scanner
 
   bool   includeJitInstructions
 
   int   stringEncoding
 
   int   propertyAccessorMode
 
   bool   expandDefaultArrayToTemplate
 
   bool   autoGarbageCollect
 
   bool   disallowGlobalVars
 
   bool   alwaysImplDefaultConstruct
 
   int   compilerWarnings
 
   bool   disallowValueAssignForRefType
 
   int   alterSyntaxNamedArgs
 
   bool   disableIntegerDivision
 
   bool   disallowEmptyListElements
 
   bool   privatePropAsProtected
 
   bool   allowUnicodeIdentifiers
 
   int   heredocTrimMode
 
   asUINT   maxNestedCalls
 
   asUINT   genericCallMode
 
   asUINT   initCallStackSize
 
   asUINT   maxCallStackSize
 
ep
 
bool shuttingDown
 
bool inDestructor
 

Friends

int PrepareSystemFunction (asCScriptFunction *func, asSSystemFunctionInterface *internal, asCScriptEngine *engine)
 

The documentation for this class was generated from the following file: