Public Member Functions | |
Memory management | |
virtual int | AddRef ()=0 |
Increase reference counter. | |
virtual int | Release ()=0 |
Decrease reference counter. | |
Engine properties | |
virtual int | SetEngineProperty (asEEngineProp property, asPWORD value)=0 |
Dynamically change some engine properties. | |
virtual asPWORD | GetEngineProperty (asEEngineProp property)=0 |
Retrieve current engine property settings. | |
Compiler messages | |
virtual int | SetMessageCallback (const asSFuncPtr &callback, void *obj, asDWORD callConv)=0 |
Sets a message callback that will receive compiler messages. | |
virtual int | ClearMessageCallback ()=0 |
Clears the registered message callback routine. | |
virtual int | WriteMessage (const char *section, int row, int col, asEMsgType type, const char *message)=0 |
Writes a message to the message callback. | |
JIT compiler | |
virtual int | SetJITCompiler (asIJITCompiler *compiler)=0 |
Sets the JIT compiler. | |
virtual asIJITCompiler * | GetJITCompiler ()=0 |
Returns the JIT compiler. | |
Global functions | |
virtual int | RegisterGlobalFunction (const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv)=0 |
Registers a global function. | |
virtual int | GetGlobalFunctionCount ()=0 |
Returns the number of registered functions. | |
virtual int | GetGlobalFunctionIdByIndex (asUINT index)=0 |
Returns the function id of the registered function. | |
Global properties | |
virtual int | RegisterGlobalProperty (const char *declaration, void *pointer)=0 |
Registers a global property. | |
virtual int | GetGlobalPropertyCount ()=0 |
Returns the number of registered global properties. | |
virtual int | GetGlobalPropertyByIndex (asUINT index, const char **name, int *typeId=0, bool *isConst=0, const char **configGroup=0, void **pointer=0)=0 |
Returns the detail on the registered global property. | |
Object types | |
virtual int | RegisterObjectType (const char *obj, int byteSize, asDWORD flags)=0 |
Registers a new object type. | |
virtual int | RegisterObjectProperty (const char *obj, const char *declaration, int byteOffset)=0 |
Registers a property for the object type. | |
virtual int | RegisterObjectMethod (const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv)=0 |
Registers a method for the object type. | |
virtual int | RegisterObjectBehaviour (const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv)=0 |
Registers a behaviour for the object type. | |
virtual int | RegisterInterface (const char *name)=0 |
Registers an interface. | |
virtual int | RegisterInterfaceMethod (const char *intf, const char *declaration)=0 |
Registers an interface method. | |
virtual int | GetObjectTypeCount ()=0 |
Returns the number of registered object types. | |
virtual asIObjectType * | GetObjectTypeByIndex (asUINT index)=0 |
Returns the object type interface by index. | |
String factory | |
virtual int | RegisterStringFactory (const char *datatype, const asSFuncPtr &factoryFunc, asDWORD callConv)=0 |
Registers the string factory. | |
virtual int | GetStringFactoryReturnTypeId ()=0 |
Returns the type id of the type that the string factory returns. | |
Enums | |
virtual int | RegisterEnum (const char *type)=0 |
Registers an enum type. | |
virtual int | RegisterEnumValue (const char *type, const char *name, int value)=0 |
Registers an enum value. | |
virtual int | GetEnumCount ()=0 |
Returns the number of registered enum types. | |
virtual const char * | GetEnumByIndex (asUINT index, int *enumTypeId, const char **configGroup=0)=0 |
Returns the registered enum type. | |
virtual int | GetEnumValueCount (int enumTypeId)=0 |
Returns the number of enum values for the enum type. | |
virtual const char * | GetEnumValueByIndex (int enumTypeId, asUINT index, int *outValue)=0 |
Returns the name and value of the enum value for the enum type. | |
Typedefs | |
virtual int | RegisterTypedef (const char *type, const char *decl)=0 |
Registers a typedef. | |
virtual int | GetTypedefCount ()=0 |
Returns the number of registered typedefs. | |
virtual const char * | GetTypedefByIndex (asUINT index, int *typeId, const char **configGroup=0)=0 |
Returns a registered typedef. | |
Configuration groups | |
virtual int | BeginConfigGroup (const char *groupName)=0 |
Starts a new dynamic configuration group. | |
virtual int | EndConfigGroup ()=0 |
Ends the configuration group. | |
virtual int | RemoveConfigGroup (const char *groupName)=0 |
Removes a previously registered configuration group. | |
virtual int | SetConfigGroupModuleAccess (const char *groupName, const char *module, bool hasAccess)=0 |
Tell AngelScript which modules have access to which configuration groups. | |
Script modules | |
virtual asIScriptModule * | GetModule (const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0 |
Return an interface pointer to the module. | |
virtual int | DiscardModule (const char *module)=0 |
Discard a module. | |
Script functions | |
virtual asIScriptFunction * | GetFunctionDescriptorById (int funcId)=0 |
Returns the function descriptor for the script function. | |
Type identification | |
virtual asIObjectType * | GetObjectTypeById (int typeId)=0 |
Returns the object type interface for type. | |
virtual int | GetTypeIdByDecl (const char *decl)=0 |
Returns a type id by declaration. | |
virtual const char * | GetTypeDeclaration (int typeId)=0 |
Returns a type declaration. | |
virtual int | GetSizeOfPrimitiveType (int typeId)=0 |
Returns the size of a primitive type. | |
Script execution | |
virtual asIScriptContext * | CreateContext ()=0 |
Creates a new script context. | |
virtual void * | CreateScriptObject (int typeId)=0 |
Creates a script object defined by its type id. | |
virtual void * | CreateScriptObjectCopy (void *obj, int typeId)=0 |
Creates a copy of a script object. | |
virtual void | CopyScriptObject (void *dstObj, void *srcObj, int typeId)=0 |
Copy one script object to another. | |
virtual void | ReleaseScriptObject (void *obj, int typeId)=0 |
Release the script object pointer. | |
virtual void | AddRefScriptObject (void *obj, int typeId)=0 |
Increase the reference counter for the script object. | |
virtual bool | IsHandleCompatibleWithObject (void *obj, int objTypeId, int handleTypeId)=0 |
Returns true if the object referenced by a handle compatible with the specified type. | |
String interpretation | |
virtual asETokenClass | ParseToken (const char *string, size_t stringLength=0, int *tokenLength=0)=0 |
Returns the class and length of the first token in the string. | |
Garbage collection | |
virtual int | GarbageCollect (asDWORD flags=asGC_FULL_CYCLE)=0 |
Perform garbage collection. | |
virtual void | GetGCStatistics (asUINT *currentSize, asUINT *totalDestroyed=0, asUINT *totalDetected=0)=0 |
Obtain statistics from the garbage collector. | |
virtual void | NotifyGarbageCollectorOfNewObject (void *obj, int typeId)=0 |
Notify the garbage collector of a new object that needs to be managed. | |
virtual void | GCEnumCallback (void *reference)=0 |
Used by the garbage collector to enumerate all references held by an object. | |
User data | |
virtual void * | SetUserData (void *data)=0 |
Register the memory address of some user data. | |
virtual void * | GetUserData ()=0 |
Returns the address of the previously registered user data. | |
Deprecated | |
virtual int | ExecuteString (const char *module, const char *script, asIScriptContext **ctx=0, asDWORD flags=0)=0 |
virtual int asIScriptEngine::AddRef | ( | ) | [pure virtual] |
virtual void asIScriptEngine::AddRefScriptObject | ( | void * | obj, | |
int | typeId | |||
) | [pure virtual] |
[in] | obj | A pointer to the object. |
[in] | typeId | The type id of the object. |
This only works for objects.
virtual int asIScriptEngine::BeginConfigGroup | ( | const char * | groupName | ) | [pure virtual] |
[in] | groupName | The name of the configuration group |
asNAME_TAKEN | Another group with the same name already exists. | |
asNOT_SUPPORTED | Nesting configuration groups is not supported. |
virtual int asIScriptEngine::ClearMessageCallback | ( | ) | [pure virtual] |
virtual void asIScriptEngine::CopyScriptObject | ( | void * | dstObj, | |
void * | srcObj, | |||
int | typeId | |||
) | [pure virtual] |
[in] | dstObj | A pointer to the destination object. |
[in] | srcObj | A pointer to the source object. |
[in] | typeId | The type id of the objects. |
This only works for objects.
virtual asIScriptContext* asIScriptEngine::CreateContext | ( | ) | [pure virtual] |
virtual void* asIScriptEngine::CreateScriptObject | ( | int | typeId | ) | [pure virtual] |
[in] | typeId | The type id of the object to create. |
This only works for objects, for primitive types and object handles the method doesn't do anything and returns a null pointer.
virtual void* asIScriptEngine::CreateScriptObjectCopy | ( | void * | obj, | |
int | typeId | |||
) | [pure virtual] |
[in] | obj | A pointer to the source object. |
[in] | typeId | The type id of the object. |
This only works for objects, for primitive types and object handles the method doesn't do anything and returns a null pointer.
virtual int asIScriptEngine::DiscardModule | ( | const char * | module | ) | [pure virtual] |
[in] | module | The name of the module |
asNO_MODULE | The module was not found. |
virtual int asIScriptEngine::EndConfigGroup | ( | ) | [pure virtual] |
asNOT_SUPPORTED | Can't end a group that hasn't been begun. |
virtual int asIScriptEngine::ExecuteString | ( | const char * | module, | |
const char * | script, | |||
asIScriptContext ** | ctx = 0 , |
|||
asDWORD | flags = 0 | |||
) | [pure virtual] |
virtual int asIScriptEngine::GarbageCollect | ( | asDWORD | flags = asGC_FULL_CYCLE |
) | [pure virtual] |
[in] | flags | Set to a combination of the asEGCFlags. |
It is not necessary to do a full cycle with every call. This makes it possible to spread out the garbage collection time over a large period, thus not impacting the responsiveness of the application.
virtual void asIScriptEngine::GCEnumCallback | ( | void * | reference | ) | [pure virtual] |
[in] | reference | A pointer to the referenced object. |
virtual asPWORD asIScriptEngine::GetEngineProperty | ( | asEEngineProp | property | ) | [pure virtual] |
[in] | property | One of the asEEngineProp values. |
virtual const char* asIScriptEngine::GetEnumByIndex | ( | asUINT | index, | |
int * | enumTypeId, | |||
const char ** | configGroup = 0 | |||
) | [pure virtual] |
[in] | index | The index of the enum type. |
[out] | enumTypeId | Receives the type if of the enum type. |
[out] | configGroup | Receives the config group in which the enum was registered. |
virtual int asIScriptEngine::GetEnumCount | ( | ) | [pure virtual] |
virtual const char* asIScriptEngine::GetEnumValueByIndex | ( | int | enumTypeId, | |
asUINT | index, | |||
int * | outValue | |||
) | [pure virtual] |
[in] | enumTypeId | The type id of the enum type. |
[in] | index | The index of the enum value. |
[out] | outValue | Receives the value of the enum value. |
virtual int asIScriptEngine::GetEnumValueCount | ( | int | enumTypeId | ) | [pure virtual] |
[in] | enumTypeId | The type id of the enum type. |
virtual asIScriptFunction* asIScriptEngine::GetFunctionDescriptorById | ( | int | funcId | ) | [pure virtual] |
[in] | funcId | The id of the function or method. |
virtual void asIScriptEngine::GetGCStatistics | ( | asUINT * | currentSize, | |
asUINT * | totalDestroyed = 0 , |
|||
asUINT * | totalDetected = 0 | |||
) | [pure virtual] |
[out] | currentSize | The current number of objects known to the garbage collector. |
[out] | totalDestroyed | The total number of objects destroyed by the garbage collector. |
[out] | totalDetected | The total number of objects detected as garbage with circular references. |
virtual int asIScriptEngine::GetGlobalFunctionCount | ( | ) | [pure virtual] |
virtual int asIScriptEngine::GetGlobalFunctionIdByIndex | ( | asUINT | index | ) | [pure virtual] |
[in] | index | The index of the registered global function. |
asINVALID_ARG | index is too large. |
virtual int asIScriptEngine::GetGlobalPropertyByIndex | ( | asUINT | index, | |
const char ** | name, | |||
int * | typeId = 0 , |
|||
bool * | isConst = 0 , |
|||
const char ** | configGroup = 0 , |
|||
void ** | pointer = 0 | |||
) | [pure virtual] |
[in] | index | The index of the global variable. |
[out] | name | Receives the name of the property. |
[out] | typeId | Receives the typeId of the property. |
[out] | isConst | Receives the constness indicator of the property. |
[out] | configGroup | Receives the config group in which the property was registered. |
[out] | pointer | Receives the pointer of the property. |
asINVALID_ARG | index is too large. |
virtual int asIScriptEngine::GetGlobalPropertyCount | ( | ) | [pure virtual] |
virtual asIScriptModule* asIScriptEngine::GetModule | ( | const char * | module, | |
asEGMFlags | flag = asGM_ONLY_IF_EXISTS | |||
) | [pure virtual] |
[in] | module | The name of the module |
[in] | flag | One of the asEGMFlags flags |
If asGM_ALWAYS_CREATE is informed as the flag the previous module with the same name will be discarded, thus any pointers that the engine holds to it will be invalid after the call.
virtual asIObjectType* asIScriptEngine::GetObjectTypeById | ( | int | typeId | ) | [pure virtual] |
[in] | typeId | The type id of the type. |
virtual asIObjectType* asIScriptEngine::GetObjectTypeByIndex | ( | asUINT | index | ) | [pure virtual] |
[in] | index | The index of the type. |
virtual int asIScriptEngine::GetObjectTypeCount | ( | ) | [pure virtual] |
virtual int asIScriptEngine::GetSizeOfPrimitiveType | ( | int | typeId | ) | [pure virtual] |
[in] | typeId | The type id of the type. |
virtual int asIScriptEngine::GetStringFactoryReturnTypeId | ( | ) | [pure virtual] |
asNO_FUNCTION | The string factory has not been registered. |
virtual const char* asIScriptEngine::GetTypeDeclaration | ( | int | typeId | ) | [pure virtual] |
[in] | typeId | The type id of the type. |
virtual const char* asIScriptEngine::GetTypedefByIndex | ( | asUINT | index, | |
int * | typeId, | |||
const char ** | configGroup = 0 | |||
) | [pure virtual] |
[in] | index | The index of the typedef. |
[out] | typeId | The type that the typedef aliases. |
[out] | configGroup | Receives the config group in which the type def was registered. |
virtual int asIScriptEngine::GetTypedefCount | ( | ) | [pure virtual] |
virtual int asIScriptEngine::GetTypeIdByDecl | ( | const char * | decl | ) | [pure virtual] |
[in] | decl | The declaration of the type. |
asINVALID_TYPE | decl is not a valid type. |
The type id is based on a sequence number and depends on the order in which the type ids are queried, thus is not guaranteed to always be the same for each execution of the application. The asETypeIdFlags can be used to obtain some information about the type directly from the id.
A base type yields the same type id whether the declaration is const or not, however if the const is for the subtype then the type id is different, e.g. string@ isn't the same as const string@ but string is the same as const string.
This method is only able to return the type id that are not specific for a script module, i.e. built-in types and application registered types. Type ids for script declared types should be obtained through the script module's GetTypeIdByDecl.
virtual void* asIScriptEngine::GetUserData | ( | ) | [pure virtual] |
virtual bool asIScriptEngine::IsHandleCompatibleWithObject | ( | void * | obj, | |
int | objTypeId, | |||
int | handleTypeId | |||
) | [pure virtual] |
[in] | obj | A pointer to the object. |
[in] | objTypeId | The type id of the object. |
[in] | handleTypeId | The type id of the handle. |
virtual void asIScriptEngine::NotifyGarbageCollectorOfNewObject | ( | void * | obj, | |
int | typeId | |||
) | [pure virtual] |
[in] | obj | A pointer to the newly created object. |
[in] | typeId | The type id of the object. |
virtual asETokenClass asIScriptEngine::ParseToken | ( | const char * | string, | |
size_t | stringLength = 0 , |
|||
int * | tokenLength = 0 | |||
) | [pure virtual] |
[in] | string | The string to parse. |
[in] | stringLength | The length of the string. Can be 0 if the string is null terminated. |
[out] | tokenLength | Gives the length of the identified token. |
virtual int asIScriptEngine::RegisterEnum | ( | const char * | type | ) | [pure virtual] |
[in] | type | The name of the enum type. |
asINVALID_NAME | type is null. | |
asALREADY_REGISTERED | Another type with this name already exists. | |
asERROR | The type couldn't be parsed. | |
asINVALID_NAME | The type is not an identifier, or it is a reserved keyword. | |
asNAME_TAKEN | The type name is already taken. |
virtual int asIScriptEngine::RegisterEnumValue | ( | const char * | type, | |
const char * | name, | |||
int | value | |||
) | [pure virtual] |
[in] | type | The name of the enum type. |
[in] | name | The name of the enum value. |
[in] | value | The integer value of the enum value. |
asWRONG_CONFIG_GROUP | The enum type was registered in a different configuration group. | |
asINVALID_TYPE | The type is invalid. | |
asALREADY_REGISTERED | The name is already registered for this enum. |
virtual int asIScriptEngine::RegisterGlobalFunction | ( | const char * | declaration, | |
const asSFuncPtr & | funcPointer, | |||
asDWORD | callConv | |||
) | [pure virtual] |
[in] | declaration | The declaration of the global function in script syntax. |
[in] | funcPointer | The function pointer. |
[in] | callConv | The calling convention for the function. |
asNOT_SUPPORTED | The calling convention is not supported. | |
asWRONG_CALLING_CONV | The function's calling convention doesn't match callConv. | |
asINVALID_DECLARATION | The function declaration is invalid. | |
asNAME_TAKEN | The function name is already used elsewhere. |
virtual int asIScriptEngine::RegisterGlobalProperty | ( | const char * | declaration, | |
void * | pointer | |||
) | [pure virtual] |
[in] | declaration | The declaration of the global property in script syntax. |
[in] | pointer | The address of the property that will be used to access the property value. |
asINVALID_DECLARATION | The declaration has invalid syntax. | |
asINVALID_TYPE | The declaration is a reference. | |
asNAME_TAKEN | The name is already taken. |
When registering the property, the application must pass the address to the actual value. The application must also make sure that this address remains valid throughout the life time of this registration, i.e. until the engine is released or the dynamic configuration group is removed.
virtual int asIScriptEngine::RegisterInterface | ( | const char * | name | ) | [pure virtual] |
[in] | name | The name of the interface. |
asINVALID_NAME | The name is null, or a reserved keyword. | |
asALREADY_REGISTERED | An object type with this name already exists. | |
asERROR | The name is not a proper identifier. | |
asNAME_TAKEN | The name is already used elsewhere. |
virtual int asIScriptEngine::RegisterInterfaceMethod | ( | const char * | intf, | |
const char * | declaration | |||
) | [pure virtual] |
[in] | intf | The name of the interface. |
[in] | declaration | The method declaration. |
asWRONG_CONFIG_GROUP | The interface was registered in another configuration group. | |
asINVALID_TYPE | intf is not an interface type. | |
asINVALID_DECLARATION | The declaration is invalid. | |
asNAME_TAKEN | The method name is already taken. |
virtual int asIScriptEngine::RegisterObjectBehaviour | ( | const char * | obj, | |
asEBehaviours | behaviour, | |||
const char * | declaration, | |||
const asSFuncPtr & | funcPointer, | |||
asDWORD | callConv | |||
) | [pure virtual] |
[in] | obj | The name of the type. |
[in] | behaviour | One of the object behaviours from asEBehaviours. |
[in] | declaration | The declaration of the method in script syntax. |
[in] | funcPointer | The method or function pointer. |
[in] | callConv | The calling convention for the method or function. |
asWRONG_CONFIG_GROUP | The object type was registered in a different configuration group. | |
asINVALID_ARG | obj is not set, or a global behaviour is given in behaviour. | |
asWRONG_CALLING_CONV | The function's calling convention isn't compatible with callConv. | |
asNOT_SUPPORTED | The calling convention or the behaviour signature is not supported. | |
asINVALID_TYPE | The obj parameter is not a valid object name. | |
asINVALID_DECLARATION | The declaration is invalid. | |
asILLEGAL_BEHAVIOUR_FOR_TYPE | The behaviour is not allowed for this type. | |
asALREADY_REGISTERED | The behaviour is already registered with the same signature. |
virtual int asIScriptEngine::RegisterObjectMethod | ( | const char * | obj, | |
const char * | declaration, | |||
const asSFuncPtr & | funcPointer, | |||
asDWORD | callConv | |||
) | [pure virtual] |
[in] | obj | The name of the type. |
[in] | declaration | The declaration of the method in script syntax. |
[in] | funcPointer | The method or function pointer. |
[in] | callConv | The calling convention for the method or function. |
asWRONG_CONFIG_GROUP | The object type was registered in a different configuration group. | |
asNOT_SUPPORTED | The calling convention is not supported. | |
asINVALID_TYPE | The obj parameter is not a valid object name. | |
asINVALID_DECLARATION | The declaration is invalid. | |
asNAME_TAKEN | The name conflicts with other members. | |
asWRONG_CALLING_CONV | The function's calling convention isn't compatible with callConv. |
virtual int asIScriptEngine::RegisterObjectProperty | ( | const char * | obj, | |
const char * | declaration, | |||
int | byteOffset | |||
) | [pure virtual] |
[in] | obj | The name of the type. |
[in] | declaration | The property declaration in script syntax. |
[in] | byteOffset | The offset into the memory block where this property is found. |
asWRONG_CONFIG_GROUP | The object type was registered in a different configuration group. | |
asINVALID_OBJECT | The obj does not specify an object type. | |
asINVALID_TYPE | The obj parameter has invalid syntax. | |
asINVALID_DECLARATION | The declaration is invalid. | |
asNAME_TAKEN | The name conflicts with other members. |
struct MyType {float prop;}; r = engine->RegisterObjectProperty("MyType", "float prop", offsetof(MyType, prop)));
virtual int asIScriptEngine::RegisterObjectType | ( | const char * | obj, | |
int | byteSize, | |||
asDWORD | flags | |||
) | [pure virtual] |
[in] | obj | The name of the type. |
[in] | byteSize | The size of the type in bytes. Only necessary for value types. |
[in] | flags | One or more of the asEObjTypeFlags. |
asINVALID_ARG | The flags are invalid. | |
asINVALID_NAME | The name is invalid. | |
asALREADY_REGISTERED | Another type of the same name already exists. | |
asNAME_TAKEN | The name conflicts with other symbol names. | |
asLOWER_ARRAY_DIMENSION_NOT_REGISTERED | When registering an array type the array element must be a primitive or a registered type. | |
asINVALID_TYPE | The array type was not properly formed. | |
asNOT_SUPPORTED | The array type is not supported, or already in use preventing it from being overloaded. |
virtual int asIScriptEngine::RegisterStringFactory | ( | const char * | datatype, | |
const asSFuncPtr & | factoryFunc, | |||
asDWORD | callConv | |||
) | [pure virtual] |
[in] | datatype | The datatype that the string factory returns |
[in] | factoryFunc | The pointer to the factory function |
[in] | callConv | The calling convention of the factory function |
asNOT_SUPPORTED | The calling convention is not supported. | |
asWRONG_CALLING_CONV | The function's calling convention doesn't match callConv. | |
asINVALID_TYPE | The datatype is not a valid type. |
// Our string factory implementation std::string StringFactory(unsigned int byteLength, const char *s) { return std::string(s, byteLength); } // Registering the string factory int r = engine->RegisterStringFactory("string", asFUNCTION(StringFactory), asCALL_CDECL); assert( r >= 0 );
The example assumes that the std::string type has been registered as the string type, with RegisterObjectType.
virtual int asIScriptEngine::RegisterTypedef | ( | const char * | type, | |
const char * | decl | |||
) | [pure virtual] |
[in] | type | The name of the new typedef |
[in] | decl | The datatype that the typedef represents |
asINVALID_NAME | The type is null. | |
asALREADY_REGISTERED | A type with the same name already exists. | |
asINVALID_TYPE | The decl is not a primitive type. | |
asINVALID_NAME | The type is not an identifier, or it is a reserved keyword. | |
asNAME_TAKEN | The name is already used elsewhere. |
Currently typedefs can only be registered for built-in primitive types.
virtual int asIScriptEngine::Release | ( | ) | [pure virtual] |
virtual void asIScriptEngine::ReleaseScriptObject | ( | void * | obj, | |
int | typeId | |||
) | [pure virtual] |
[in] | obj | A pointer to the object. |
[in] | typeId | The type id of the object. |
This only works for objects.
virtual int asIScriptEngine::RemoveConfigGroup | ( | const char * | groupName | ) | [pure virtual] |
[in] | groupName | The name of the configuration group |
asCONFIG_GROUP_IS_IN_USE | The group is in use and cannot be removed. |
virtual int asIScriptEngine::SetConfigGroupModuleAccess | ( | const char * | groupName, | |
const char * | module, | |||
bool | hasAccess | |||
) | [pure virtual] |
[in] | groupName | The name of the configuration group |
[in] | module | The module name |
[in] | hasAccess | Whether the module has access or not to the group members |
asWRONG_CONFIG_GROUP | No group with the groupName was found. |
The default module access is granted. The default for a group can be changed by specifying the modulename asALL_MODULES.
virtual int asIScriptEngine::SetEngineProperty | ( | asEEngineProp | property, | |
asPWORD | value | |||
) | [pure virtual] |
[in] | property | One of the asEEngineProp values. |
[in] | value | The new value of the property. |
asINVALID_ARG | Invalid property. |
virtual int asIScriptEngine::SetMessageCallback | ( | const asSFuncPtr & | callback, | |
void * | obj, | |||
asDWORD | callConv | |||
) | [pure virtual] |
[in] | callback | A function or class method pointer. |
[in] | obj | The object for methods, or an optional parameter for functions. |
[in] | callConv | The calling convention. |
asINVALID_ARG | One of the arguments is incorrect, e.g. obj is null for a class method. | |
asNOT_SUPPORTED | The arguments are not supported, e.g. asCALL_GENERIC. |
void MyClass::MessageCallback(const asSMessageInfo *msg); r = engine->SetMessageCallback(asMETHOD(MyClass,MessageCallback), &obj, asCALL_THISCALL);
void MessageCallback(const asSMessageInfo *msg, void *param); r = engine->SetMessageCallback(asFUNCTION(MessageCallback), param, asCALL_CDECL);
virtual void* asIScriptEngine::SetUserData | ( | void * | data | ) | [pure virtual] |
[in] | data | A pointer to the user data. |
virtual int asIScriptEngine::WriteMessage | ( | const char * | section, | |
int | row, | |||
int | col, | |||
asEMsgType | type, | |||
const char * | message | |||
) | [pure virtual] |
[in] | section | The name of the script section. |
[in] | row | The row number. |
[in] | col | The column number. |
[in] | type | The message type. |
[in] | message | The message text. |
asINVALID_ARG | The section or message is null. |