Defines | |
#define | asFUNCTION(f) asFunctionPtr(f) |
Returns an asSFuncPtr representing the function specified by the name. | |
#define | asFUNCTIONPR(f, p, r) asFunctionPtr((void (*)())((r (*)p)(f))) |
Returns an asSFuncPtr representing the function specified by the name, parameter list, and return type. | |
#define | asMETHOD(c, m) asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m)) |
Returns an asSFuncPtr representing the class method specified by class and method name. | |
#define | asMETHODPR(c, m, p, r) asSMethodPtr<sizeof(void (c::*)())>::Convert((r (c::*)p)(&c::m)) |
Returns an asSFuncPtr representing the class method specified by class, method name, parameter list, return type. | |
Functions | |
AS_API asIScriptEngine * | asCreateScriptEngine (asDWORD version) |
Creates the script engine. | |
AS_API const char * | asGetLibraryVersion () |
Returns the version of the compiled library. | |
AS_API const char * | asGetLibraryOptions () |
Returns the options used to compile the library. | |
AS_API asIScriptContext * | asGetActiveContext () |
Returns the currently active context. | |
AS_API int | asThreadCleanup () |
Cleans up memory allocated for the current thread. | |
AS_API int | asSetGlobalMemoryFunctions (asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc) |
Set the memory management functions that AngelScript should use. | |
AS_API int | asResetGlobalMemoryFunctions () |
Remove previously registered memory management functions. |
AS_API asIScriptEngine* asCreateScriptEngine | ( | asDWORD | version | ) |
[in] | version | The library version. Should always be ANGELSCRIPT_VERSION. |
AS_API asIScriptContext* asGetActiveContext | ( | ) |
If the script library is compiled with multithread support, this function will return the context that is currently active in the thread that is being executed. It will thus work even if there are multiple threads executing scripts at the same time.
AS_API const char* asGetLibraryOptions | ( | ) |
AS_API const char* asGetLibraryVersion | ( | ) |
AS_API int asResetGlobalMemoryFunctions | ( | ) |
AS_API int asSetGlobalMemoryFunctions | ( | asALLOCFUNC_t | allocFunc, | |
asFREEFUNC_t | freeFunc | |||
) |
[in] | allocFunc | The function that will be used to allocate memory. |
[in] | freeFunc | The function that will be used to free the memory. |
If not called, AngelScript will use the malloc and free functions from the standard C library.
AS_API int asThreadCleanup | ( | ) |
asCONTEXT_ACTIVE | A context is still active. |
It's not necessary to call this if only a single thread accesses the engine.