code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIScriptGeneric Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

List of all members

asIScriptGeneric Class Referenceabstract
Secondary interfaces

The interface for the generic calling convention.

Public Member Functions

Miscellaneous

virtual asIScriptEngine * 	GetEngine () const =0

 	Returns a pointer to the script engine.

virtual asIScriptFunction * 	GetFunction () const =0

 	Returns the function that is being called.

virtual void * 	GetAuxiliary () const =0

 	Return the auxiliary registered with the function.

Object

virtual void * 	GetObject ()=0

 	Returns the object pointer if this is a class method, or null if it not.

virtual int 	GetObjectTypeId () const =0

 	Returns the type id of the object if this is a class method.

Arguments

virtual int 	GetArgCount () const =0

 	Returns the number of arguments.

virtual int 	GetArgTypeId (asUINT arg, asDWORD *flags=0) const =0

 	Returns the type id of the argument.

virtual asBYTE 	GetArgByte (asUINT arg)=0

 	Returns the value of an 8-bit argument.

virtual asWORD 	GetArgWord (asUINT arg)=0

 	Returns the value of a 16-bit argument.

virtual asDWORD 	GetArgDWord (asUINT arg)=0

 	Returns the value of a 32-bit integer argument.

virtual asQWORD 	GetArgQWord (asUINT arg)=0

 	Returns the value of a 64-bit integer argument.

virtual float 	GetArgFloat (asUINT arg)=0

 	Returns the value of a float argument.

virtual double 	GetArgDouble (asUINT arg)=0

 	Returns the value of a double argument.

virtual void * 	GetArgAddress (asUINT arg)=0

 	Returns the address held in a reference or handle argument.

virtual void * 	GetArgObject (asUINT arg)=0

 	Returns a pointer to the object in a object argument.

virtual void * 	GetAddressOfArg (asUINT arg)=0

 	Returns a pointer to the argument value.

Return value

virtual int 	GetReturnTypeId (asDWORD *flags=0) const =0

 	Gets the type id of the return value.

virtual int 	SetReturnByte (asBYTE val)=0

 	Sets the 8-bit return value.

virtual int 	SetReturnWord (asWORD val)=0

 	Sets the 16-bit return value.

virtual int 	SetReturnDWord (asDWORD val)=0

 	Sets the 32-bit integer return value.

virtual int 	SetReturnQWord (asQWORD val)=0

 	Sets the 64-bit integer return value.

virtual int 	SetReturnFloat (float val)=0

 	Sets the float return value.

virtual int 	SetReturnDouble (double val)=0

 	Sets the double return value.

virtual int 	SetReturnAddress (void *addr)=0

 	Sets the address return value when the return is a reference or handle.

virtual int 	SetReturnObject (void *obj)=0

 	Sets the object return value.

virtual void * 	GetAddressOfReturnLocation ()=0

 	Gets the address to the memory where the return value should be placed.

Member Function Documentation

◆ GetAddressOfArg()

          virtual void * asIScriptGeneric::GetAddressOfArg
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

A pointer to the argument value.

◆ GetAddressOfReturnLocation()

          virtual void * asIScriptGeneric::GetAddressOfReturnLocation
          (
          	)

pure virtual

Returns

A pointer to the memory where the return values is to be placed.

The memory is not initialized, so if you're going to return a complex type by value you shouldn't use the assignment operator to initialize it. Instead use the placement new operator to call the type's copy constructor to perform the initialization.

new(gen->GetAddressOfReturnLocation()) std::string(myRetValue);

The placement new operator works for primitive types too, so this method is ideal for writing automatically generated functions that works the same way for all types.

◆ GetArgAddress()

          virtual void * asIScriptGeneric::GetArgAddress
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The address argument value, which can be a reference or and object handle.

Don't release the pointer if this is an object or object handle, the asIScriptGeneric object will do that for you.

◆ GetArgByte()

          virtual asBYTE asIScriptGeneric::GetArgByte
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The 1 byte argument value.

◆ GetArgCount()

          virtual int asIScriptGeneric::GetArgCount
          (
          	)
           const

pure virtual

Returns

The number of arguments to the function.

◆ GetArgDouble()

          virtual double asIScriptGeneric::GetArgDouble
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The double argument value.

◆ GetArgDWord()

          virtual asDWORD asIScriptGeneric::GetArgDWord
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The 4 byte argument value.

◆ GetArgFloat()

          virtual float asIScriptGeneric::GetArgFloat
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The float argument value.

◆ GetArgObject()

          virtual void * asIScriptGeneric::GetArgObject
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

A pointer to the object argument, which can be an object value or object handle.

Don't release the pointer if this is an object handle, the asIScriptGeneric object will do that for you.

◆ GetArgQWord()

          virtual asQWORD asIScriptGeneric::GetArgQWord
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The 8 byte argument value.

◆ GetArgTypeId()

          virtual int asIScriptGeneric::GetArgTypeId
          (
          asUINT
          arg,

          asDWORD *
          flags = 0

          )
          	 const

pure virtual

Parameters

[in]	arg	The argument index.

[out]	flags	A combination of asETypeModifiers.

Returns

The type id of the argument.

◆ GetArgWord()

          virtual asWORD asIScriptGeneric::GetArgWord
          (
          asUINT
          arg	)

pure virtual

Parameters

[in]	arg	The argument index.

Returns

The 2 byte argument value.

◆ GetAuxiliary()

          virtual void * asIScriptGeneric::GetAuxiliary
          (
          	)
           const

pure virtual

Returns

The auxiliary registered with the function.

◆ GetEngine()

          virtual asIScriptEngine * asIScriptGeneric::GetEngine
          (
          	)
           const

pure virtual

Returns

A pointer to the engine.

◆ GetFunction()

          virtual asIScriptFunction * asIScriptGeneric::GetFunction
          (
          	)
           const

pure virtual

Returns

The function that is being called.

◆ GetObject()

          virtual void * asIScriptGeneric::GetObject
          (
          	)

pure virtual

Returns

A pointer to the object, if this is a method.

◆ GetObjectTypeId()

          virtual int asIScriptGeneric::GetObjectTypeId
          (
          	)
           const

pure virtual

Returns

The type id of the object if this is a method.

◆ GetReturnTypeId()

          virtual int asIScriptGeneric::GetReturnTypeId
          (
          asDWORD *
          flags = 0	)
           const

pure virtual

Parameters

[out]	flags	A combination of asETypeModifiers.

Returns

The type id of the return value.

◆ SetReturnAddress()

          virtual int asIScriptGeneric::SetReturnAddress
          (
          void *
          addr	)

pure virtual

Parameters

[in]	addr	The return value, which is an address.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a reference or handle.

Sets the address return value. If an object handle the application must first increment the reference counter, unless it won't keep a reference itself.

◆ SetReturnByte()

          virtual int asIScriptGeneric::SetReturnByte
          (
          asBYTE
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not an 8-bit value. Sets the 1 byte return value.

◆ SetReturnDouble()

          virtual int asIScriptGeneric::SetReturnDouble
          (
          double
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a 64-bit value. Sets the double return value.

◆ SetReturnDWord()

          virtual int asIScriptGeneric::SetReturnDWord
          (
          asDWORD
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a 32-bit value. Sets the 4 byte return value.

◆ SetReturnFloat()

          virtual int asIScriptGeneric::SetReturnFloat
          (
          float
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a 32-bit value. Sets the float return value.

◆ SetReturnObject()

          virtual int asIScriptGeneric::SetReturnObject
          (
          void *
          obj	)

pure virtual

Parameters

[in]	obj	A pointer to the object return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not an object value or handle.

If the function returns an object, the library will automatically do what is necessary based on how the object was declared, i.e. if the function was registered to return a handle then the library will call the addref behaviour. If it was registered to return an object by value, then the library will make a copy of the object.

◆ SetReturnQWord()

          virtual int asIScriptGeneric::SetReturnQWord
          (
          asQWORD
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a 64-bit value. Sets the 8 byte return value.

◆ SetReturnWord()

          virtual int asIScriptGeneric::SetReturnWord
          (
          asWORD
          val	)

pure virtual

Parameters

[in]	val	The return value.

Returns

A negative value on error.

Return values

asINVALID_TYPE	The return type is not a 16-bit value. Sets the 2 byte return value.

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

angelscript.h

asIScriptGeneric

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

asIScriptModule Member List

This is the complete list of members for asIScriptModule, including all inherited members.

AddScriptSection(const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0	asIScriptModule	pure virtual

BindAllImportedFunctions()=0	asIScriptModule	pure virtual

BindImportedFunction(asUINT importIndex, asIScriptFunction *func)=0	asIScriptModule	pure virtual

Build()=0	asIScriptModule	pure virtual

CompileFunction(const char *sectionName, const char *code, int lineOffset, asDWORD compileFlags, asIScriptFunction **outFunc)=0	asIScriptModule	pure virtual

CompileGlobalVar(const char *sectionName, const char *code, int lineOffset)=0	asIScriptModule	pure virtual

Discard()=0	asIScriptModule	pure virtual

GetAddressOfGlobalVar(asUINT index)=0	asIScriptModule	pure virtual

GetDefaultNamespace() const =0	asIScriptModule	pure virtual

GetEngine() const =0	asIScriptModule	pure virtual

GetEnumByIndex(asUINT index) const =0	asIScriptModule	pure virtual

GetEnumCount() const =0	asIScriptModule	pure virtual

GetFunctionByDecl(const char *decl) const =0	asIScriptModule	pure virtual

GetFunctionByIndex(asUINT index) const =0	asIScriptModule	pure virtual

GetFunctionByName(const char *name) const =0	asIScriptModule	pure virtual

GetFunctionCount() const =0	asIScriptModule	pure virtual

GetGlobalVar(asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0) const =0	asIScriptModule	pure virtual

GetGlobalVarCount() const =0	asIScriptModule	pure virtual

GetGlobalVarDeclaration(asUINT index, bool includeNamespace=false) const =0	asIScriptModule	pure virtual

GetGlobalVarIndexByDecl(const char *decl) const =0	asIScriptModule	pure virtual

GetGlobalVarIndexByName(const char *name) const =0	asIScriptModule	pure virtual

GetImportedFunctionCount() const =0	asIScriptModule	pure virtual

GetImportedFunctionDeclaration(asUINT importIndex) const =0	asIScriptModule	pure virtual

GetImportedFunctionIndexByDecl(const char *decl) const =0	asIScriptModule	pure virtual

GetImportedFunctionSourceModule(asUINT importIndex) const =0	asIScriptModule	pure virtual

GetName() const =0	asIScriptModule	pure virtual

GetObjectTypeByIndex(asUINT index) const =0	asIScriptModule	pure virtual

GetObjectTypeCount() const =0	asIScriptModule	pure virtual

GetTypedefByIndex(asUINT index) const =0	asIScriptModule	pure virtual

GetTypedefCount() const =0	asIScriptModule	pure virtual

GetTypeIdByDecl(const char *decl) const =0	asIScriptModule	pure virtual

GetTypeInfoByDecl(const char *decl) const =0	asIScriptModule	pure virtual

GetTypeInfoByName(const char *name) const =0	asIScriptModule	pure virtual

GetUserData(asPWORD type=0) const =0	asIScriptModule	pure virtual

LoadByteCode(asIBinaryStream *in, bool *wasDebugInfoStripped=0)=0	asIScriptModule	pure virtual

RemoveFunction(asIScriptFunction *func)=0	asIScriptModule	pure virtual

RemoveGlobalVar(asUINT index)=0	asIScriptModule	pure virtual

ResetGlobalVars(asIScriptContext *ctx=0)=0	asIScriptModule	pure virtual

SaveByteCode(asIBinaryStream *out, bool stripDebugInfo=false) const =0	asIScriptModule	pure virtual

SetAccessMask(asDWORD accessMask)=0	asIScriptModule	pure virtual

SetDefaultNamespace(const char *nameSpace)=0	asIScriptModule	pure virtual

SetName(const char *name)=0	asIScriptModule	pure virtual

SetUserData(void *data, asPWORD type=0)=0	asIScriptModule	pure virtual

UnbindAllImportedFunctions()=0	asIScriptModule	pure virtual

UnbindImportedFunction(asUINT importIndex)=0	asIScriptModule	pure virtual

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6

repo_name: Antidote/openrpgeditor

license: mit


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIScriptModule Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

List of all members

asIScriptModule Class Referenceabstract
Principal interfaces

The interface to the script modules.
 More...

Public Member Functions

Miscellaneous

virtual asIScriptEngine * 	GetEngine () const =0

 	Returns a pointer to the engine.

virtual void 	SetName (const char *name)=0

 	Sets the name of the module.

virtual const char * 	GetName () const =0

 	Gets the name of the module.

virtual void 	Discard ()=0

 	Discards the module.

Compilation

virtual int 	AddScriptSection (const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0

 	Add a script section for the next build.

virtual int 	Build ()=0

 	Build the previously added script sections.

virtual int 	CompileFunction (const char *sectionName, const char *code, int lineOffset, asDWORD compileFlags, asIScriptFunction **outFunc)=0

 	Compile a single function.

virtual int 	CompileGlobalVar (const char *sectionName, const char *code, int lineOffset)=0

 	Compile a single global variable and add it to the scope of the module.

virtual asDWORD 	SetAccessMask (asDWORD accessMask)=0

 	Sets the access mask that should be used during the compilation.

virtual int 	SetDefaultNamespace (const char *nameSpace)=0

 	Sets the default namespace that should be used in the following calls.

virtual const char * 	GetDefaultNamespace () const =0

 	Returns the current default namespace.

Functions

virtual asUINT 	GetFunctionCount () const =0

 	Returns the number of global functions in the module.

virtual asIScriptFunction * 	GetFunctionByIndex (asUINT index) const =0

 	Returns the function by index.

virtual asIScriptFunction * 	GetFunctionByDecl (const char *decl) const =0

 	Returns the function by its declaration.

virtual asIScriptFunction * 	GetFunctionByName (const char *name) const =0

 	Returns the function by its name.

virtual int 	RemoveFunction (asIScriptFunction *func)=0

 	Remove a single function from the scope of the module.

Global variables

virtual int 	ResetGlobalVars (asIScriptContext *ctx=0)=0

 	Reset the global variables of the module.

virtual asUINT 	GetGlobalVarCount () const =0

 	Returns the number of global variables in the module.

virtual int 	GetGlobalVarIndexByName (const char *name) const =0

 	Returns the global variable index by name.

virtual int 	GetGlobalVarIndexByDecl (const char *decl) const =0

 	Returns the global variable index by declaration.

virtual const char * 	GetGlobalVarDeclaration (asUINT index, bool includeNamespace=false) const =0

 	Returns the global variable declaration.

virtual int 	GetGlobalVar (asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0) const =0

 	Returns the global variable properties.

virtual void * 	GetAddressOfGlobalVar (asUINT index)=0

 	Returns the pointer to the global variable.

virtual int 	RemoveGlobalVar (asUINT index)=0

 	Remove the global variable from the scope of the module.

Type identification

virtual asUINT 	GetObjectTypeCount () const =0

 	Returns the number of object types.

virtual asITypeInfo * 	GetObjectTypeByIndex (asUINT index) const =0

 	Returns the object type interface by index.

virtual int 	GetTypeIdByDecl (const char *decl) const =0

 	Returns a type id by declaration.

virtual asITypeInfo * 	GetTypeInfoByName (const char *name) const =0

 	Returns the type interface by name.

virtual asITypeInfo * 	GetTypeInfoByDecl (const char *decl) const =0

 	Returns a type by declaration.

Enums

virtual asUINT 	GetEnumCount () const =0

 	Returns the number of enum types declared in the module.

virtual asITypeInfo * 	GetEnumByIndex (asUINT index) const =0

 	Returns the enum type.

Typedefs

virtual asUINT 	GetTypedefCount () const =0

 	Returns the number of typedefs in the module.

virtual asITypeInfo * 	GetTypedefByIndex (asUINT index) const =0

 	Returns the typedef.

Dynamic binding between modules

virtual asUINT 	GetImportedFunctionCount () const =0

 	Returns the number of functions declared for import.

virtual int 	GetImportedFunctionIndexByDecl (const char *decl) const =0

 	Returns the imported function index by declaration.

virtual const char * 	GetImportedFunctionDeclaration (asUINT importIndex) const =0

 	Returns the imported function declaration.

virtual const char * 	GetImportedFunctionSourceModule (asUINT importIndex) const =0

 	Returns the declared imported function source module.

virtual int 	BindImportedFunction (asUINT importIndex, asIScriptFunction *func)=0

 	Binds an imported function to the function from another module.

virtual int 	UnbindImportedFunction (asUINT importIndex)=0

 	Unbinds an imported function.

virtual int 	BindAllImportedFunctions ()=0

 	Binds all imported functions in a module, by searching their equivalents in the declared source modules.

virtual int 	UnbindAllImportedFunctions ()=0

 	Unbinds all imported functions.

Byte code saving and loading

virtual int 	SaveByteCode (asIBinaryStream *out, bool stripDebugInfo=false) const =0

 	Save compiled byte code to a binary stream.

virtual int 	LoadByteCode (asIBinaryStream *in, bool *wasDebugInfoStripped=0)=0

 	Load pre-compiled byte code from a binary stream.

User data

virtual void * 	SetUserData (void *data, asPWORD type=0)=0

 	Register the memory address of some user data.

virtual void * 	GetUserData (asPWORD type=0) const =0

 	Returns the address of the previously registered user data.

Detailed Description

A script module can be thought of a library of script functions, classes, and global variables.

A pointer to the module interface is obtained by calling asIScriptEngine::GetModule. The module can then be built from a single or multiple script files, also known as script sections. Alternatively pre-built bytecode can be loaded, if it has been saved from a previous build.

See also

Script modules

Member Function Documentation

◆ AddScriptSection()

          virtual int asIScriptModule::AddScriptSection
          (
          const char *
          name,

          const char *
          code,

          size_t
          codeLength = 0,

          int
          lineOffset = 0

          )

pure virtual

Parameters

[in]	name	The name of the script section

[in]	code	The script code buffer

[in]	codeLength	The length of the script code

[in]	lineOffset	An offset that will be added to compiler message line numbers

Returns

A negative value on error.

Return values

asINVALID_ARG	The code argument is null.

asNOT_SUPPORTED	Compiler support is disabled in the engine.

asOUT_OF_MEMORY	The necessary memory to hold the script code couldn't be allocated.

This adds a script section to the module. The script section isn't processed with this call. Only when Build is called will the script be parsed and compiled into executable byte code.

Error messages from the compiler will refer to the name of the script section and the position within it. Normally each section is the content of a source file, so it is recommended to name the script sections as the name of the source file.

The code added is copied by the engine, so there is no need to keep the original buffer after the call. Note that this can be changed by setting the engine property asEP_COPY_SCRIPT_SECTIONS with asIScriptEngine::SetEngineProperty.

◆ BindAllImportedFunctions()

          virtual int asIScriptModule::BindAllImportedFunctions
          (
          	)

pure virtual

Returns

A negative value on error.

Return values

asERROR	An error occurred.

asCANT_BIND_ALL_FUNCTIONS	Not all functions where bound.

This functions tries to bind all imported functions in the module by searching for matching functions in the suggested modules. If a function cannot be bound the function will give an error asCANT_BIND_ALL_FUNCTIONS, but it will continue binding the rest of the functions.

◆ BindImportedFunction()

          virtual int asIScriptModule::BindImportedFunction
          (
          asUINT
          importIndex,

          asIScriptFunction *
          func

          )

pure virtual

Parameters

[in]	importIndex	The index of the imported function.

[in]	func	The true function that will be bound to the imported function.

Returns

A negative value on error.

Return values

asNO_FUNCTION	importIndex or func is incorrect.

asINVALID_ARG	importIndex is invalid or func is null.

asNOT_SUPPORTED	func is not a script function or registered function.

asINVALID_INTERFACE	The signature of function doesn't match the import statement.

The imported function is only bound if the functions have the exact same signature, i.e the same return type, and parameters.

Delegate objects are not supported.

◆ Build()

          virtual int asIScriptModule::Build
          (
          	)

pure virtual

Returns

A negative value on error

Return values

asINVALID_CONFIGURATION	The engine configuration is invalid.

asERROR	The script failed to build.

asBUILD_IN_PROGRESS	Another thread is currently building.

asINIT_GLOBAL_VARS_FAILED	It was not possible to initialize at least one of the global variables.

asNOT_SUPPORTED	Compiler support is disabled in the engine.

asMODULE_IS_IN_USE	The code in the module is still being used and and cannot be removed.

Builds the script based on the previously added sections, registered types and functions. After the build is complete the script sections are removed to free memory.

Before starting the build the Build method removes any previously compiled script content, including the dynamically added content from CompileFunction and CompileGlobalVar. If the script module needs to be rebuilt all of the script sections needs to be added again.

Compiler messages are sent to the message callback function set with asIScriptEngine::SetMessageCallback. If there are no errors or warnings, no messages will be sent to the callback function.

Any global variables found in the script will be initialized by the compiler if the engine property asEP_INIT_GLOBAL_VARS_AFTER_BUILD is set. If you get the error asINIT_GLOBAL_VARS_FAILED, then it is probable that one of the global variables during the initialization is trying to access another global variable before it has been initialized.

See also

Compiling scripts

◆ CompileFunction()

          virtual int asIScriptModule::CompileFunction
          (
          const char *
          sectionName,

          const char *
          code,

          int
          lineOffset,

          asDWORD
          compileFlags,

          asIScriptFunction **
          outFunc

          )

pure virtual

Parameters

[in]	sectionName	The name of the script section

[in]	code	The script code buffer

[in]	lineOffset	An offset that will be added to compiler message line numbers

[in]	compileFlags	One of asECompileFlags values

[out]	outFunc	Optional parameter to receive the compiled function descriptor

Returns

A negative value on error

Return values

asINVALID_ARG	One or more arguments have invalid values.

asINVALID_CONFIGURATION	The engine configuration is invalid.

asBUILD_IN_PROGRESS	Another build is in progress.

asERROR	The compilation failed.

asNOT_SUPPORTED	Compiler support is disabled in the engine.

Use this to compile a single function. Any existing compiled code in the module can be used by the function.

The newly compiled function can be optionally added to the scope of the module where it can later be referred to by the application or used in subsequent compilations. If not added to the module the function can still be returned in the output parameter, which will allow the application to execute it and then discard it when it is no longer needed.

If the output function parameter is set, remember to release the function object when you're done with it.

◆ CompileGlobalVar()

          virtual int asIScriptModule::CompileGlobalVar
          (
          const char *
          sectionName,

          const char *
          code,

          int
          lineOffset

          )

pure virtual

Parameters

[in]	sectionName	The name of the script section

[in]	code	The script code buffer

[in]	lineOffset	An offset that will be added to compiler message line numbers

Returns

A negative value on error

Return values

asINVALID_ARG	One or more arguments have invalid values.

asINVALID_CONFIGURATION	The engine configuration is invalid.

asBUILD_IN_PROGRESS	Another build is in progress.

asERROR	The compilation failed.

asNOT_SUPPORTED	Compiler support is disabled in the engine.

Use this to add a single global variable to the scope of a module. The variable can then be referred to by the application and subsequent compilations.

The script code may contain an initialization expression, which will be executed by the compiler if the engine property asEP_INIT_GLOBAL_VARS_AFTER_BUILD is set.

Any existing compiled code in the module can be used in the initialization expression.

◆ Discard()

          virtual void asIScriptModule::Discard
          (
          	)

pure virtual

This method is used to discard the module and any compiled bytecode it has. After calling this method the module pointer is no longer valid and shouldn't be used by the application.

◆ GetAddressOfGlobalVar()

          virtual void * asIScriptModule::GetAddressOfGlobalVar
          (
          asUINT
          index	)

pure virtual

Parameters

[in]	index	The index of the global variable.

Returns

A pointer to the global variable, or null if not found.

This method should be used to retrieve the pointer of a variable that you wish to access.

◆ GetDefaultNamespace()

          virtual const char * asIScriptModule::GetDefaultNamespace
          (
          	)
           const

pure virtual

Returns

The current default namespace

◆ GetEngine()

          virtual asIScriptEngine * asIScriptModule::GetEngine
          (
          	)
           const

pure virtual

Returns

A pointer to the engine.

◆ GetEnumByIndex()

          virtual asITypeInfo * asIScriptModule::GetEnumByIndex
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The index of the enum type.

Returns

The type info of the enum type, or null on error.

◆ GetEnumCount()

          virtual asUINT asIScriptModule::GetEnumCount
          (
          	)
           const

pure virtual

Returns

The number of enum types in the module.

◆ GetFunctionByDecl()

          virtual asIScriptFunction * asIScriptModule::GetFunctionByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The function declaration.

Returns

The function or null in case of error.

◆ GetFunctionByIndex()

          virtual asIScriptFunction * asIScriptModule::GetFunctionByIndex
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The index of the function

Returns

The function or null in case of error.

◆ GetFunctionByName()

          virtual asIScriptFunction * asIScriptModule::GetFunctionByName
          (
          const char *
          name	)
           const

pure virtual

Parameters

[in]	name	The function name

Returns

The function or null if not found or there are multiple matches.

The search for functions will be performed in the default namespace as given by SetDefaultNamespace unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace.

◆ GetFunctionCount()

          virtual asUINT asIScriptModule::GetFunctionCount
          (
          	)
           const

pure virtual

Returns

The number of global functions in this module.

This method retrieves the number of compiled script functions.

◆ GetGlobalVar()

          virtual int asIScriptModule::GetGlobalVar
          (
          asUINT
          index,

          const char **
          name,

          const char **
          nameSpace = 0,

          int *
          typeId = 0,

          bool *
          isConst = 0

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the global variable.

[out]	name	The name of the variable.

[out]	nameSpace	The namespace of the variable.

[out]	typeId	The type of the variable.

[out]	isConst	Whether or not the variable is const.

Returns

A negative value on error.

Return values

asINVALID_ARG	The index is out of range.

◆ GetGlobalVarCount()

          virtual asUINT asIScriptModule::GetGlobalVarCount
          (
          	)
           const

pure virtual

Returns

The number of global variables in the module.

◆ GetGlobalVarDeclaration()

          virtual const char * asIScriptModule::GetGlobalVarDeclaration
          (
          asUINT
          index,

          bool
          includeNamespace = false

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the global variable.

[in]	includeNamespace	Set to true if the namespace should be included in the declaration.

Returns

A null terminated string with the variable declaration, or null if not found.

This method can be used to retrieve the variable declaration of the script variables that the host application will access. Verifying the declaration is important because, even though the script may compile correctly the user may not have used the variable types as intended.

◆ GetGlobalVarIndexByDecl()

          virtual int asIScriptModule::GetGlobalVarIndexByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The global variable declaration.

Returns

A negative value on error, or the global variable index.

Return values

asERROR	The module was not built successfully.

asNO_GLOBAL_VAR	No matching global variable was found.

asINVALID_DECLARATION	The given declaration is invalid.

This method should be used to retrieve the index of the script variable that you wish to access.

The method will find the script variable with the exact same declaration.

If the variable is declared in a namespace first call SetDefaultNamespace to set the namespace that should be searched first for the variable.

◆ GetGlobalVarIndexByName()

          virtual int asIScriptModule::GetGlobalVarIndexByName
          (
          const char *
          name	)
           const

pure virtual

Parameters

[in]	name	The name of the global variable.

Returns

A negative value on error, or the global variable index.

Return values

asINVALID_ARG	The name and scope for search cannot be determined

asNO_GLOBAL_VAR	The matching global variable was found.

This method should be used to retrieve the index of the script variable that you wish to access.

The search for global variables will be performed in the default namespace as given by SetDefaultNamespace unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace.

◆ GetImportedFunctionCount()

          virtual asUINT asIScriptModule::GetImportedFunctionCount
          (
          	)
           const

pure virtual

Returns

The number of imported functions.

This function returns the number of functions that are imported in a module. These functions need to be bound before they can be used, or a script exception will be thrown.

◆ GetImportedFunctionDeclaration()

          virtual const char * asIScriptModule::GetImportedFunctionDeclaration
          (
          asUINT
          importIndex	)
           const

pure virtual

Parameters

[in]	importIndex	The index of the imported function.

Returns

A null terminated string with the function declaration, or null if not found.

Use this function to get the declaration of the imported function. The returned declaration can be used to find a matching function in another module that can be bound to the imported function.

◆ GetImportedFunctionIndexByDecl()

          virtual int asIScriptModule::GetImportedFunctionIndexByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The function declaration of the imported function.

Returns

A negative value on error, or the index of the imported function.

Return values

asERROR	The module was not built successfully.

asMULTIPLE_FUNCTIONS	Found multiple matching functions.

asNO_FUNCTION	Didn't find any matching function.

This function is used to find a specific imported function by its declaration.

◆ GetImportedFunctionSourceModule()

          virtual const char * asIScriptModule::GetImportedFunctionSourceModule
          (
          asUINT
          importIndex	)
           const

pure virtual

Parameters

[in]	importIndex	The index of the imported function.

Returns

A null terminated string with the name of the source module, or null if not found.

Use this function to get the name of the suggested module to import the function from.

◆ GetName()

          virtual const char * asIScriptModule::GetName
          (
          	)
           const

pure virtual

Returns

The name of the module.

◆ GetObjectTypeByIndex()

          virtual asITypeInfo * asIScriptModule::GetObjectTypeByIndex
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The index of the type.

Returns

The object type interface for the type, or null if not found.

This does not increase the reference count of the returned object.

◆ GetObjectTypeCount()

          virtual asUINT asIScriptModule::GetObjectTypeCount
          (
          	)
           const

pure virtual

Returns

The number of object types declared in the module.

◆ GetTypedefByIndex()

          virtual asITypeInfo * asIScriptModule::GetTypedefByIndex
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The index of the typedef.

Returns

The type info of the typedef, or null on error.

◆ GetTypedefCount()

          virtual asUINT asIScriptModule::GetTypedefCount
          (
          	)
           const

pure virtual

Returns

The number of typedefs in the module.

◆ GetTypeIdByDecl()

          virtual int asIScriptModule::GetTypeIdByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The declaration of the type.

Returns

A negative value on error, or the type id of the type.

Return values

asINVALID_TYPE	decl is not a valid type.

Translates a type declaration into a type id. The returned type id is valid for as long as the type is valid, so you can safely store it for later use to avoid potential overhead from calling this function each time. Just remember to update the type id, any time the type is changed within the engine, e.g. when recompiling script declared classes, or changing the engine configuration.

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.

◆ GetTypeInfoByDecl()

          virtual asITypeInfo * asIScriptModule::GetTypeInfoByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The declaration of the type.

Returns

The type or null on error.

Translates a type declaration into the type info. The returned type is valid for as long as the type is valid, so you can safely store it for later use to avoid potential overhead from calling this function each time. Just remember to update the type info pointer any time the type is changed within the engine, e.g. when recompiling script declared classes, or changing the engine configuration.

◆ GetTypeInfoByName()

          virtual asITypeInfo * asIScriptModule::GetTypeInfoByName
          (
          const char *
          name	)
           const

pure virtual

Parameters

[in]	name	The name of the type.

Returns

The type interface for the type, or null if not found.

The search for types will be performed in the default namespace as given by SetDefaultNamespace unless the name is prefixed with a scope, using the scoping operator ::. If the scope starts with :: it will be used as the absolute scope, otherwise it will be relative to the default namespace.

◆ GetUserData()

          virtual void * asIScriptModule::GetUserData
          (
          asPWORD
          type = 0	)
           const

pure virtual

Parameters

[in]	type	An identifier specifying the user data to set.

Returns

The pointer to the user data.

◆ LoadByteCode()

          virtual int asIScriptModule::LoadByteCode
          (
          asIBinaryStream *
          in,

          bool *
          wasDebugInfoStripped = 0

          )

pure virtual

Parameters

[in]	in	The input stream.

[out]	wasDebugInfoStripped	Set to true if the byte code was saved without debug information.

Returns

A negative value on error.

Return values

asINVALID_ARG	The stream object wasn't specified.

asBUILD_IN_PROGRESS	Another thread is currently building.

asOUT_OF_MEMORY	The engine ran out of memory while loading the byte code.

asMODULE_IS_IN_USE	The code in the module is still being used and and cannot be removed.

asERROR	It was not possible to load the byte code.

This method is used to load pre-compiled byte code from disk or memory. The application must implement an object that inherits from asIBinaryStream to provide the necessary stream operations.

It is expected that the application performs the necessary validations to make sure the pre-compiled byte code is from a trusted source. The application should also make sure the pre-compiled byte code is compatible with the current engine configuration, i.e. that the engine has been configured in the same way as when the byte code was first compiled.

If the method returns asERROR it is either because the byte code is incorrect, e.g. corrupted due to disk failure, or it has been compiled with a different engine configuration. If possible the engine provides information about the type of error that caused the failure while loading the byte code to the message stream.

See also

Pre-compiled byte code

◆ RemoveFunction()

          virtual int asIScriptModule::RemoveFunction
          (
          asIScriptFunction *
          func	)

pure virtual

Parameters

[in]	func	The pointer to the function that should be removed.

Returns

A negative value on error.

Return values

asNO_FUNCTION	The function is not part of the scope.

This method allows the application to remove a single function from the scope of the module. The function is not destroyed immediately though, only when no more references point to it.

◆ RemoveGlobalVar()

          virtual int asIScriptModule::RemoveGlobalVar
          (
          asUINT
          index	)

pure virtual

Parameters

[in]	index	The index of the global variable.

Returns

A negative value on error.

Return values

asINVALID_ARG	The index is out of range.

The global variable is removed from the scope of the module, but it is not destroyed until all functions that access it are freed.

◆ ResetGlobalVars()

          virtual int asIScriptModule::ResetGlobalVars
          (
          asIScriptContext *
          ctx = 0	)

pure virtual

Parameters

[in]	ctx	Optional script context.

Returns

A negative value on error.

Return values

asERROR	The module was not compiled successfully.

asINIT_GLOBAL_VARS_FAILED	The initialization of the global variables failed.

Resets the global variables declared in this module to their initial value. The context should be informed if the application needs to have extra control over how the initialization is done, for example for debugging, or for catching exceptions.

◆ SaveByteCode()

          virtual int asIScriptModule::SaveByteCode
          (
          asIBinaryStream *
          out,

          bool
          stripDebugInfo = false

          )
          	 const

pure virtual

Parameters

[in]	out	The output stream.

[in]	stripDebugInfo	Set to true to skip saving the debug information.

Returns

A negative value on error.

Return values

asINVALID_ARG	The stream object wasn't specified.

asNOT_SUPPORTED	Compiler support is disabled in the engine.

asERROR	Nothing has been compiled in the module.

This method is used to save pre-compiled byte code to disk or memory, for a later restoral. The application must implement an object that inherits from asIBinaryStream to provide the necessary stream operations.

See also

Pre-compiled byte code

◆ SetAccessMask()

          virtual asDWORD asIScriptModule::SetAccessMask
          (
          asDWORD
          accessMask	)

pure virtual

Parameters

[in]	accessMask	The access bit mask

Returns

The previous access mask.

The module's access mask with be bitwise and-ed with the registered entity's access mask in order to determine if the module is allowed to access the entity. If the result is 0 then the script in the module will not be able to use the entity.

This can be used to provide different interfaces to scripts that serve different purposes in the application.

See also

Access masks and exposing different interfaces

◆ SetDefaultNamespace()

          virtual int asIScriptModule::SetDefaultNamespace
          (
          const char *
          nameSpace	)

pure virtual

Parameters

[in]	nameSpace	The namespace that should be used.

Returns

A negative value on error.

Return values

asINVALID_ARG	The namespace is null.

asINVALID_DECLARATION	The namespace is invalid.

Set the default namespace that should be used in the following calls for searching for declared entities, or when compiling new individual entities.

◆ SetName()

          virtual void asIScriptModule::SetName
          (
          const char *
          name	)

pure virtual

Parameters

[in]	name	The new name.

Sets the name of the script module.

◆ SetUserData()

          virtual void * asIScriptModule::SetUserData
          (
          void *
          data,

          asPWORD
          type = 0

          )

pure virtual

Parameters

[in]	data	A pointer to the user data.

[in]	type	An identifier specifying the user data to set.

Returns

The previous pointer stored in the module

This method allows the application to associate a value, e.g. a pointer, with the module instance.

The type values 1000 through 1999 are reserved for use by the official add-ons.

Optionally, a callback function can be registered to clean up the user data when the module is destroyed.

◆ UnbindAllImportedFunctions()

          virtual int asIScriptModule::UnbindAllImportedFunctions
          (
          	)

pure virtual

Returns

A negative value on error.

Unbinds all imported functions in the module.

◆ UnbindImportedFunction()

          virtual int asIScriptModule::UnbindImportedFunction
          (
          asUINT
          importIndex	)

pure virtual

Parameters

[in]	importIndex	The index of the imported function.

Returns

A negative value on error.

Return values

asINVALID_ARG	The index is not valid.

Unbinds the imported function.

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

angelscript.h

asIScriptModule

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

asIScriptObject Member List

This is the complete list of members for asIScriptObject, including all inherited members.

AddRef() const =0	asIScriptObject	pure virtual

CopyFrom(const asIScriptObject *other)=0	asIScriptObject	pure virtual

GetAddressOfProperty(asUINT prop)=0	asIScriptObject	pure virtual

GetEngine() const =0	asIScriptObject	pure virtual

GetObjectType() const =0	asIScriptObject	pure virtual

GetPropertyCount() const =0	asIScriptObject	pure virtual

GetPropertyName(asUINT prop) const =0	asIScriptObject	pure virtual

GetPropertyTypeId(asUINT prop) const =0	asIScriptObject	pure virtual

GetTypeId() const =0	asIScriptObject	pure virtual

GetUserData(asPWORD type=0) const =0	asIScriptObject	pure virtual

GetWeakRefFlag() const =0	asIScriptObject	pure virtual

Release() const =0	asIScriptObject	pure virtual

SetUserData(void *data, asPWORD type=0)=0	asIScriptObject	pure virtual

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIScriptObject Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

List of all members

asIScriptObject Class Referenceabstract
Secondary interfaces

The interface for an instance of a script object.

Public Member Functions

Memory management

virtual int 	AddRef () const =0

 	Increase reference counter.

virtual int 	Release () const =0

 	Decrease reference counter.

virtual asILockableSharedBool * 	GetWeakRefFlag () const =0

 	Returns the weak ref flag for the object.

Type info

virtual int 	GetTypeId () const =0

 	Returns the type id of the object.

virtual asITypeInfo * 	GetObjectType () const =0

 	Returns the object type interface for the object.

Properties

virtual asUINT 	GetPropertyCount () const =0

 	Returns the number of properties that the object contains.

virtual int 	GetPropertyTypeId (asUINT prop) const =0

 	Returns the type id of the property referenced by prop.

virtual const char * 	GetPropertyName (asUINT prop) const =0

 	Returns the name of the property referenced by prop.

virtual void * 	GetAddressOfProperty (asUINT prop)=0

 	Returns a pointer to the property referenced by prop.

Miscellaneous

virtual asIScriptEngine * 	GetEngine () const =0

 	Return the script engine.

virtual int 	CopyFrom (const asIScriptObject *other)=0

 	Copies the content from another object of the same type.

User data

virtual void * 	SetUserData (void *data, asPWORD type=0)=0

 	Sets user data on the script object instance.

virtual void * 	GetUserData (asPWORD type=0) const =0

 	Gets user data from the script object instance.

Member Function Documentation

◆ AddRef()

          virtual int asIScriptObject::AddRef
          (
          	)
           const

pure virtual

Returns

The number of references to this object.

Call this method when storing an additional reference to the object.

◆ CopyFrom()

          virtual int asIScriptObject::CopyFrom
          (
          const asIScriptObject *
          other	)

pure virtual

Parameters

[in]	other	A pointer to the source object.

Returns

A negative value on error.

Return values

asINVALID_ARG	The argument is null.

asINVALID_TYPE	The other object is of different type.

This method copies the contents of the other object to this one.

◆ GetAddressOfProperty()

          virtual void * asIScriptObject::GetAddressOfProperty
          (
          asUINT
          prop	)

pure virtual

Parameters

[in]	prop	The property index.

Returns

A pointer to the property value.

The method returns a pointer to the memory location for the property. Use the type id for the property to determine the content of the pointer, and how to handle it.

◆ GetEngine()

          virtual asIScriptEngine * asIScriptObject::GetEngine
          (
          	)
           const

pure virtual

Returns

The script engine.

◆ GetObjectType()

          virtual asITypeInfo * asIScriptObject::GetObjectType
          (
          	)
           const

pure virtual

Returns

The object type interface of the script object.

This does not increase the reference count of the returned object type.

◆ GetPropertyCount()

          virtual asUINT asIScriptObject::GetPropertyCount
          (
          	)
           const

pure virtual

Returns

The number of member properties of the script object.

◆ GetPropertyName()

          virtual const char * asIScriptObject::GetPropertyName
          (
          asUINT
          prop	)
           const

pure virtual

Parameters

[in]	prop	The property index.

Returns

A null terminated string with the property name.

◆ GetPropertyTypeId()

          virtual int asIScriptObject::GetPropertyTypeId
          (
          asUINT
          prop	)
           const

pure virtual

Parameters

[in]	prop	The property index.

Returns

The type id of the member property, or a negative value on error.

Return values

asINVALID_ARG	prop is too large

◆ GetTypeId()

          virtual int asIScriptObject::GetTypeId
          (
          	)
           const

pure virtual

Returns

The type id of the script object.

◆ GetUserData()

          virtual void * asIScriptObject::GetUserData
          (
          asPWORD
          type = 0	)
           const

pure virtual

Parameters

[in]	type	An identifier used to identify which user data to get.

Returns

The pointer to the user data.

◆ GetWeakRefFlag()

          virtual asILockableSharedBool * asIScriptObject::GetWeakRefFlag
          (
          	)
           const

pure virtual

Returns

The weak ref flag for the object.

This is a short-cut for the asIScriptEngine::GetWeakRefFlagOfScriptObject method.

◆ Release()

          virtual int asIScriptObject::Release
          (
          	)
           const

pure virtual

Returns

The number of references to this object.

Call this method when you will no longer use the references that you own.

◆ SetUserData()

          virtual void * asIScriptObject::SetUserData
          (
          void *
          data,

          asPWORD
          type = 0

          )

pure virtual

Parameters

[in]	data	A pointer to the user data.

[in]	type	An identifier used to identify which user data to set.

Returns

The previous pointer stored in the object type.

This method allows the application to associate a value, e.g. a pointer, with the script object instance. Multiple different values can be defined where the type argument identifies which is referred to.

The user data types identifiers between 1000 and 1999 are reserved for use by official add-ons.

Optionally, a callback function can be registered to clean up the user data when the script object is destroyed.

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

angelscript.h

asIScriptObject

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

asIStringFactory Member List

This is the complete list of members for asIStringFactory, including all inherited members.

GetRawStringData(const void *str, char *data, asUINT *length) const =0	asIStringFactory	pure virtual

GetStringConstant(const char *data, asUINT length)=0	asIStringFactory	pure virtual

ReleaseStringConstant(const void *str)=0	asIStringFactory	pure virtual

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIStringFactory Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

Public Member Functions |
List of all members

asIStringFactory Class Referenceabstract
Secondary interfaces

The interface for the string factory.
 More...

Public Member Functions

virtual const void * 	GetStringConstant (const char *data, asUINT length)=0

 	Called by engine to instantiate a string constant.

virtual int 	ReleaseStringConstant (const void *str)=0

 	Called by engine when the string constant is no longer used.

virtual int 	GetRawStringData (const void *str, char *data, asUINT *length) const =0

 	Called by engine to get the raw string data for serialization.

Detailed Description

This interface is used to manage the string constants that the scripts use. If string constants should be supported the application must implement this object and register it with asIScriptEngine::RegisterStringFactory.

Member Function Documentation

◆ GetRawStringData()

          virtual int asIStringFactory::GetRawStringData
          (
          const void *
          str,

          char *
          data,

          asUINT *
          length

          )
          	 const

pure virtual

Parameters

[in]	str	The same pointer returned by GetStringConstant

[out]	data	A pointer to the data buffer that should be filled with the content

[out]	length	A pointer to the variable that should be set with the length of the data

Returns

A negative value on error.

The engine will first call this with data set to null to retrieve the size of the buffer that must be allocated. Then the engine will call the method once more with the allocated data buffer to be filled with the content. The length should always be informed in number of bytes.

◆ GetStringConstant()

          virtual const void * asIStringFactory::GetStringConstant
          (
          const char *
          data,

          asUINT
          length

          )

pure virtual

Parameters

[in]	data	The content of the string

[in]	length	The length in bytes of the data buffer

Returns

The pointer to the instantiated string constant

The contents of data must be copied by the string factory, as the engine will not keep a copy of the original data.

The string factory can cache and return a pointer to the same instance multiple times if the same string content is requested multiple times. If the same instance is returned multiple times the string factory must keep track of the number of instances as ReleaseStringConstant will be called for each of them.

◆ ReleaseStringConstant()

          virtual int asIStringFactory::ReleaseStringConstant
          (
          const void *
          str	)

pure virtual

Parameters

[in]	str	The same pointer returned by GetStringConstant

Returns

A negative value on error.

The engine will call this method for each pointer returned by GetStringConstant. If the string factory returns a pointer to the same instance multiple times, then the string instance can only be destroyed when the last call to ReleaseStringConstant for that pointer is made.

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

angelscript.h

asIStringFactory

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

asIThreadManager Member List

This is the complete list of members for asIThreadManager, including all inherited members.

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asIThreadManager Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

List of all members

asIThreadManager Class Reference
Auxiliary functions

The interface for the thread manager.
 More...

Detailed Description

This interface is used to represent the internal thread manager prepared with asPrepareMultithread() and returned by asGetThreadManager(). The application shouldn't do anything with this except pass it to another call to asPrepareMultithread() in case there is a need to share a common thread manager across multiple application modules (dlls).

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

angelscript.h

asIThreadManager

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

asITypeInfo Member List

This is the complete list of members for asITypeInfo, including all inherited members.

AddRef() const =0	asITypeInfo	pure virtual

DerivesFrom(const asITypeInfo *objType) const =0	asITypeInfo	pure virtual

GetAccessMask() const =0	asITypeInfo	pure virtual

GetBaseType() const =0	asITypeInfo	pure virtual

GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const =0	asITypeInfo	pure virtual

GetBehaviourCount() const =0	asITypeInfo	pure virtual

GetChildFuncdef(asUINT index) const =0	asITypeInfo	pure virtual

GetChildFuncdefCount() const =0	asITypeInfo	pure virtual

GetConfigGroup() const =0	asITypeInfo	pure virtual

GetEngine() const =0	asITypeInfo	pure virtual

GetEnumValueByIndex(asUINT index, int *outValue) const =0	asITypeInfo	pure virtual

GetEnumValueCount() const =0	asITypeInfo	pure virtual

GetFactoryByDecl(const char *decl) const =0	asITypeInfo	pure virtual

GetFactoryByIndex(asUINT index) const =0	asITypeInfo	pure virtual

GetFactoryCount() const =0	asITypeInfo	pure virtual

GetFlags() const =0	asITypeInfo	pure virtual

GetFuncdefSignature() const =0	asITypeInfo	pure virtual

GetInterface(asUINT index) const =0	asITypeInfo	pure virtual

GetInterfaceCount() const =0	asITypeInfo	pure virtual

GetMethodByDecl(const char *decl, bool getVirtual=true) const =0	asITypeInfo	pure virtual

GetMethodByIndex(asUINT index, bool getVirtual=true) const =0	asITypeInfo	pure virtual

GetMethodByName(const char *name, bool getVirtual=true) const =0	asITypeInfo	pure virtual

GetMethodCount() const =0	asITypeInfo	pure virtual

GetModule() const =0	asITypeInfo	pure virtual

GetName() const =0	asITypeInfo	pure virtual

GetNamespace() const =0	asITypeInfo	pure virtual

GetParentType() const =0	asITypeInfo	pure virtual

GetProperty(asUINT index, const char **name, int *typeId=0, bool *isPrivate=0, bool *isProtected=0, int *offset=0, bool *isReference=0, asDWORD *accessMask=0, int *compositeOffset=0, bool *isCompositeIndirect=0) const =0	asITypeInfo	pure virtual

GetPropertyCount() const =0	asITypeInfo	pure virtual

GetPropertyDeclaration(asUINT index, bool includeNamespace=false) const =0	asITypeInfo	pure virtual

GetSize() const =0	asITypeInfo	pure virtual

GetSubType(asUINT subTypeIndex=0) const =0	asITypeInfo	pure virtual

GetSubTypeCount() const =0	asITypeInfo	pure virtual

GetSubTypeId(asUINT subTypeIndex=0) const =0	asITypeInfo	pure virtual

GetTypedefTypeId() const =0	asITypeInfo	pure virtual

GetTypeId() const =0	asITypeInfo	pure virtual

GetUserData(asPWORD type=0) const =0	asITypeInfo	pure virtual

Implements(const asITypeInfo *objType) const =0	asITypeInfo	pure virtual

Release() const =0	asITypeInfo	pure virtual

SetUserData(void *data, asPWORD type=0)=0	asITypeInfo	pure virtual

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: asITypeInfo Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

List of all members

asITypeInfo Class Referenceabstract
Secondary interfaces

The interface for describing types This interface is used to describe the types in the script engine.
 More...

Public Member Functions

Miscellaneous

virtual asIScriptEngine * 	GetEngine () const =0

 	Returns a pointer to the script engine.

virtual const char * 	GetConfigGroup () const =0

 	Returns the config group in which the type was registered.

virtual asDWORD 	GetAccessMask () const =0

 	Returns the access mask for this type.

virtual asIScriptModule * 	GetModule () const =0

 	Returns the module where the type is declared.

Memory management

virtual int 	AddRef () const =0

 	Increases the reference counter.

virtual int 	Release () const =0

 	Decrease reference counter.

Type info

virtual const char * 	GetName () const =0

 	Returns a temporary pointer to the name of the datatype.

virtual const char * 	GetNamespace () const =0

 	Return the namespace of the type.

virtual asITypeInfo * 	GetBaseType () const =0

 	Returns the object type that this type derives from.

virtual bool 	DerivesFrom (const asITypeInfo *objType) const =0

 	Returns true if the type inherits directly or indirectly from the informed type.

virtual asDWORD 	GetFlags () const =0

 	Returns the type flags.

virtual asUINT 	GetSize () const =0

 	Returns the size of the object type.

virtual int 	GetTypeId () const =0

 	Returns the type id for the object type.

virtual int 	GetSubTypeId (asUINT subTypeIndex=0) const =0

 	Returns the type id of the template sub type.

virtual asITypeInfo * 	GetSubType (asUINT subTypeIndex=0) const =0

 	Returns the template subtype, in case it is an object type.

virtual asUINT 	GetSubTypeCount () const =0

 	Returns the number of template sub types.

Interfaces

virtual asUINT 	GetInterfaceCount () const =0

 	Returns the number of interfaces implemented.

virtual asITypeInfo * 	GetInterface (asUINT index) const =0

 	Returns a temporary pointer to the specified interface or null if none are found.

virtual bool 	Implements (const asITypeInfo *objType) const =0

 	Returns true if the type implements the informed interface type.

Factories

virtual asUINT 	GetFactoryCount () const =0

 	Returns the number of factory functions for the object type.

virtual asIScriptFunction * 	GetFactoryByIndex (asUINT index) const =0

 	Returns the factory function by the index.

virtual asIScriptFunction * 	GetFactoryByDecl (const char *decl) const =0

 	Returns the factory function by the declaration.

Methods

virtual asUINT 	GetMethodCount () const =0

 	Returns the number of methods for the object type.

virtual asIScriptFunction * 	GetMethodByIndex (asUINT index, bool getVirtual=true) const =0

 	Returns the method by index.

virtual asIScriptFunction * 	GetMethodByName (const char *name, bool getVirtual=true) const =0

 	Returns the method by name.

virtual asIScriptFunction * 	GetMethodByDecl (const char *decl, bool getVirtual=true) const =0

 	Returns the method by declaration.

Properties

virtual asUINT 	GetPropertyCount () const =0

 	Returns the number of properties that the object contains.

virtual int 	GetProperty (asUINT index, const char **name, int *typeId=0, bool *isPrivate=0, bool *isProtected=0, int *offset=0, bool *isReference=0, asDWORD *accessMask=0, int *compositeOffset=0, bool *isCompositeIndirect=0) const =0

 	Returns the attributes of the property.

virtual const char * 	GetPropertyDeclaration (asUINT index, bool includeNamespace=false) const =0

 	Returns the declaration of the property.

Behaviours

virtual asUINT 	GetBehaviourCount () const =0

 	Returns the number of behaviours.

virtual asIScriptFunction * 	GetBehaviourByIndex (asUINT index, asEBehaviours *outBehaviour) const =0

 	Returns the function and type of the behaviour.

Child types

virtual asUINT 	GetChildFuncdefCount () const =0

 	Returns the number of child funcdefs declared in the class.

virtual asITypeInfo * 	GetChildFuncdef (asUINT index) const =0

 	Returns a child funcdef by index.

virtual asITypeInfo * 	GetParentType () const =0

 	Returns the parent type if this is a child type.

Enums

virtual asUINT 	GetEnumValueCount () const =0

 	Returns the number of values defined for the enum type.

virtual const char * 	GetEnumValueByIndex (asUINT index, int *outValue) const =0

 	Returns the name and value of the enum value for the enum type.

Typedef

virtual int 	GetTypedefTypeId () const =0

 	Returns the type id that the typedef represents.

Funcdef

virtual asIScriptFunction * 	GetFuncdefSignature () const =0

 	Returns the function description for the funcdef type.

User data

virtual void * 	SetUserData (void *data, asPWORD type=0)=0

 	Register the memory address of some user data.

virtual void * 	GetUserData (asPWORD type=0) const =0

 	Returns the address of the previously registered user data.

Detailed Description

It can represent object types, funcdefs, typedefs, and enums. To determine which family the type belong to verify the flags.

Member Function Documentation

◆ AddRef()

          virtual int asITypeInfo::AddRef
          (
          	)
           const

pure virtual

Returns

The number of references to this object.

Call this method when storing an additional reference to the object.

◆ DerivesFrom()

          virtual bool asITypeInfo::DerivesFrom
          (
          const asITypeInfo *
          objType	)
           const

pure virtual

Parameters

[in]	objType	The potential parent type.

Returns

True if the type inherits directly or indirectly from the informed type.

◆ GetAccessMask()

          virtual asDWORD asITypeInfo::GetAccessMask
          (
          	)
           const

pure virtual

Returns

The access mask for this type.

◆ GetBaseType()

          virtual asITypeInfo * asITypeInfo::GetBaseType
          (
          	)
           const

pure virtual

Returns

A pointer to the object type that this type derives from.

This method will only return a pointer in case of script classes that derives from another script class.

This does not increase the reference count of the returned object type.

◆ GetBehaviourByIndex()

          virtual asIScriptFunction * asITypeInfo::GetBehaviourByIndex
          (
          asUINT
          index,

          asEBehaviours *
          outBehaviour

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the behaviour.

[out]	outBehaviour	Receives the type of the behaviour.

Returns

The function of the behaviour, or null on error.

◆ GetBehaviourCount()

          virtual asUINT asITypeInfo::GetBehaviourCount
          (
          	)
           const

pure virtual

Returns

The number of behaviours for this type.

◆ GetChildFuncdef()

          virtual asITypeInfo * asITypeInfo::GetChildFuncdef
          (
          asUINT
          index	)
           const

pure virtual

Returns

The child funcdef matching the index.

◆ GetChildFuncdefCount()

          virtual asUINT asITypeInfo::GetChildFuncdefCount
          (
          	)
           const

pure virtual

Returns

The number of child funcdefs declared in the class.

◆ GetConfigGroup()

          virtual const char * asITypeInfo::GetConfigGroup
          (
          	)
           const

pure virtual

Returns

The name of the config group, or null if not set.

◆ GetEngine()

          virtual asIScriptEngine * asITypeInfo::GetEngine
          (
          	)
           const

pure virtual

Returns

A pointer to the engine.

◆ GetEnumValueByIndex()

          virtual const char * asITypeInfo::GetEnumValueByIndex
          (
          asUINT
          index,

          int *
          outValue

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the enum value.

[out]	outValue	Receives the value of the enum value.

Returns

The name of the enum value.

◆ GetEnumValueCount()

          virtual asUINT asITypeInfo::GetEnumValueCount
          (
          	)
           const

pure virtual

Returns

The number of enum values.

◆ GetFactoryByDecl()

          virtual asIScriptFunction * asITypeInfo::GetFactoryByDecl
          (
          const char *
          decl	)
           const

pure virtual

Parameters

[in]	decl	The declaration of the function

Returns

The matching factory function or null if there are no matches

◆ GetFactoryByIndex()

          virtual asIScriptFunction * asITypeInfo::GetFactoryByIndex
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The index of the factory function.

Returns

The factory function or null if the index is invalid.

◆ GetFactoryCount()

          virtual asUINT asITypeInfo::GetFactoryCount
          (
          	)
           const

pure virtual

Returns

The number of factory functions for this object.

◆ GetFlags()

          virtual asDWORD asITypeInfo::GetFlags
          (
          	)
           const

pure virtual

Returns

A bit mask with the flags from asEObjTypeFlags.

Object types are identified by having the flags asOBJ_REF or asOBJ_VALUE set.

Enums are identified by having the flag asOBJ_ENUM set.

Funcdefs are identified by having the flag asOBJ_FUNCDEF set.

Typedefs are identified by having the flag asOBJ_TYPEDEF set.

Script classes are identified by having the asOBJ_SCRIPT_OBJECT flag set. Interfaces are identified as a script class with a size of 0.

See also

GetSize

◆ GetFuncdefSignature()

          virtual asIScriptFunction * asITypeInfo::GetFuncdefSignature
          (
          	)
           const

pure virtual

Returns

A pointer to the function description interface, or null if not a funcdef type.

This does not increment the reference count of the returned function interface.

◆ GetInterface()

          virtual asITypeInfo * asITypeInfo::GetInterface
          (
          asUINT
          index	)
           const

pure virtual

Parameters

[in]	index	The interface index.

Returns

A pointer to the interface type.

◆ GetInterfaceCount()

          virtual asUINT asITypeInfo::GetInterfaceCount
          (
          	)
           const

pure virtual

Returns

The number of interfaces implemented by this type.

◆ GetMethodByDecl()

          virtual asIScriptFunction * asITypeInfo::GetMethodByDecl
          (
          const char *
          decl,

          bool
          getVirtual = true

          )
          	 const

pure virtual

Parameters

[in]	decl	The method signature.

[in]	getVirtual	Set to true if the virtual method or the real method should be retrieved.

Returns

The method or null on error.

This method should be used to retrieve the script method for the object that you wish to execute. The method is then sent to the context's Prepare method.

The method will find the script method with the exact same declaration.

◆ GetMethodByIndex()

          virtual asIScriptFunction * asITypeInfo::GetMethodByIndex
          (
          asUINT
          index,

          bool
          getVirtual = true

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the method.

[in]	getVirtual	Set to true if the virtual method or the real method should be retrieved.

Returns

The method or null on error.

This method should be used to retrieve the script method for the object that you wish to execute. The method is then sent to the context's Prepare method.

By default this returns the virtual method for script classes. This will allow you to call the virtual method on classes, and rely on the polymorphism to call the correct implementation. If you wish to inspect the real method, then you should set the second parameter to false to retrieve the real method.

◆ GetMethodByName()

          virtual asIScriptFunction * asITypeInfo::GetMethodByName
          (
          const char *
          name,

          bool
          getVirtual = true

          )
          	 const

pure virtual

Parameters

[in]	name	The name of the method.

[in]	getVirtual	Set to true if the virtual method or the real method should be retrieved.

Returns

Tthe method or null in case of error

This method should be used to retrieve the script method for the object that you wish to execute. The method is then sent to the context's Prepare method.

◆ GetMethodCount()

          virtual asUINT asITypeInfo::GetMethodCount
          (
          	)
           const

pure virtual

Returns

The number of methods for this object.

◆ GetModule()

          virtual asIScriptModule * asITypeInfo::GetModule
          (
          	)
           const

pure virtual

Returns

The module where the type is declared.

The returned value can be null if the module doesn't exist anymore, or the type is not owned by any module, i.e. registered by the application.

◆ GetName()

          virtual const char * asITypeInfo::GetName
          (
          	)
           const

pure virtual

Returns

A null terminated string with the name of the object type.

◆ GetNamespace()

          virtual const char * asITypeInfo::GetNamespace
          (
          	)
           const

pure virtual

Returns

The namespace of the type, or null if not defined.

If the namespace is not defined it means that this is a child type.

◆ GetParentType()

          virtual asITypeInfo * asITypeInfo::GetParentType
          (
          	)
           const

pure virtual

Returns

The parent type if this is a child type.

◆ GetProperty()

          virtual int asITypeInfo::GetProperty
          (
          asUINT
          index,

          const char **
          name,

          int *
          typeId = 0,

          bool *
          isPrivate = 0,

          bool *
          isProtected = 0,

          int *
          offset = 0,

          bool *
          isReference = 0,

          asDWORD *
          accessMask = 0,

          int *
          compositeOffset = 0,

          bool *
          isCompositeIndirect = 0

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the property

[out]	name	The name of the property

[out]	typeId	The type of the property

[out]	isPrivate	Whether the property is private or not

[out]	isProtected	Whether the property is protected or not

[out]	offset	The offset into the object where the property is stored

[out]	isReference	True if the property is not stored inline

[out]	accessMask	The access mask of the property

[out]	compositeOffset	The offset to composite type if used

[out]	isCompositeIndirect	Set to false if the composite type is inline

Returns

A negative value on error

Return values

asINVALID_ARG	The index is out of bounds

◆ GetPropertyCount()

          virtual asUINT asITypeInfo::GetPropertyCount
          (
          	)
           const

pure virtual

Returns

The number of member properties of the script object.

◆ GetPropertyDeclaration()

          virtual const char * asITypeInfo::GetPropertyDeclaration
          (
          asUINT
          index,

          bool
          includeNamespace = false

          )
          	 const

pure virtual

Parameters

[in]	index	The index of the property

[in]	includeNamespace	Set to true if the namespace should be included in the declaration.

Returns

The declaration of the property, or null on error.

◆ GetSize()

          virtual asUINT asITypeInfo::GetSize
          (
          	)
           const

pure virtual

Returns

The number of bytes necessary to store instances of this type.

Application registered reference types doesn't store this information, as the script engine doesn't allocate memory for these itself.

◆ GetSubType()

          virtual asITypeInfo * asITypeInfo::GetSubType
          (
          asUINT
          subTypeIndex = 0	)
           const

pure virtual

Parameters

[in]	subTypeIndex	The zero based index of the template sub type.

Returns

The type info of the template sub type, or null if the template subtype is a primitive.

◆ GetSubTypeCount()

          virtual asUINT asITypeInfo::GetSubTypeCount
          (
          	)
           const

pure virtual

Returns

The number of template sub types.

◆ GetSubTypeId()

          virtual int asITypeInfo::GetSubTypeId
          (
          asUINT
          subTypeIndex = 0	)
           const

pure virtual

Parameters

[in]	subTypeIndex	The zero based index of the template sub type.

Returns

The type id of the template sub type, or a negative value on error.

Return values

asERROR	The type is not a template type.

◆ GetTypedefTypeId()

          virtual int asITypeInfo::GetTypedefTypeId
          (
          	)
           const

pure virtual

Returns

The type id that the typedef represents.

◆ GetTypeId()

          virtual int asITypeInfo::GetTypeId
          (
          	)
           const

pure virtual

Returns

The type id for the object type.

◆ GetUserData()

          virtual void * asITypeInfo::GetUserData
          (
          asPWORD
          type = 0	)
           const

pure virtual

Parameters

[in]	type	An identifier used to identify which user data to get.

Returns

The pointer to the user data.

◆ Implements()

          virtual bool asITypeInfo::Implements
          (
          const asITypeInfo *
          objType	)
           const

pure virtual

Parameters

[in]	objType	The interface type.

Returns

True if the type implements the informed interface type.

◆ Release()

          virtual int asITypeInfo::Release
          (
          	)
           const

pure virtual

Returns

The number of references to this object.

Call this method when you will no longer use the references that you own.

◆ SetUserData()

          virtual void * asITypeInfo::SetUserData
          (
          void *
          data,

          asPWORD
          type = 0

          )

pure virtual

Parameters

[in]	data	A pointer to the user data.

[in]	type	An identifier used to identify which user data to set.

Returns

The previous pointer stored in the object type.

This method allows the application to associate a value, e.g. a pointer, with the object type instance. Multiple different values can be defined where the type argument identifies which is referred to.

The user data types identifiers between 1000 and 1999 are reserved for use by official add-ons.

Optionally, a callback function can be registered to clean up the user data when the object type is destroyed.

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

angelscript.h

asITypeInfo

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Deprecated List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

Deprecated List

Member asIScriptContext::GetVarName  (asUINT varIndex, asUINT stackLevel=0)=0

Since 2.36.0. Use asIScriptContext::GetVar instead

Member asIScriptContext::GetVarTypeId  (asUINT varIndex, asUINT stackLevel=0)=0

Since 2.36.0. Use asIScriptContext::GetVar instead

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: source Directory Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

source Directory Reference

Files

file  	angelscript.h

 	The API definition for AngelScript.

source

Generated on Sun May 21 2023 10:12:40 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Add-ons</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

Add-ons

This page gives a brief description of the add-ons that you'll find in the /sdk/add_on/ folder.

Application modules

Script extensions

Generated on Sun May 21 2023 10:12:39 for AngelScript by  1.9.6


code:
var doc_addon =
[
    [ "Application modules", "doc_addon_application.html", "doc_addon_application" ],
    [ "Script extensions", "doc_addon_script.html", "doc_addon_script" ]
];


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: any object</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

any object

Path: /sdk/add_on/scriptany/

The any type is a generic container that can hold any value. It is a reference type.

The type is registered with RegisterScriptAny(asIScriptEngine*).

Public C++ interface

class CScriptAny

{

public:

  // Constructors

  CScriptAny(asIScriptEngine *engine);

  CScriptAny(void *ref, int refTypeId, asIScriptEngine *engine);

  // Memory management

  int AddRef() const;

  int Release() const;

  // Copy the stored value from another any object

  CScriptAny &operator=(const CScriptAny&);

  int CopyFrom(const CScriptAny *other);

  // Store the value, either as variable type, integer number, or real number

  void Store(void *ref, int refTypeId);

  void Store(asINT64 &value);

  void Store(double &value);

  // Retrieve the stored value, either as variable type, integer number, or real number

  bool Retrieve(void *ref, int refTypeId) const;

  bool Retrieve(asINT64 &value) const;

  bool Retrieve(double &value) const;

  // Get the type id of the stored value

  int GetTypeId() const;

};

asINT64

__int64 asINT64

64 bit integer

Definition: angelscript.h:630

asIScriptEngine

The engine interface.

Definition: angelscript.h:1102

Public script interface

  class any
  {
    any();
    any(? &in value);
    any(int64 &in value);
    any(double &in value);

    any &opAssign(const any &in other);

    void store(? &in value);
    void store(int64 &in value);
    void store(double &in value);

    bool retrieve(? &out value) const;
    bool retrieve(int64 &out value) const;
    bool retrieve(double &out value) const;
  }

any()

 any(? &in value)

 any(int64 &in value)

 any(double &in value)

The default constructor creates an empty object, and the second initializes the object with the provided value.

The int64 and double overloads make sure that all numbers are converted to 64bit before being stored in the object.

any &opAssign(const any &in other)

The assignment operator will copy the contained value from the other object.

void store(? &in value)

 void store(int64 &in value)

 void store(double &in value)

These methods sets the value in the object.

The int64 and double overloads make sure that all numbers are converted to 64bit before being stored in the object.

bool retrieve(? &out value) const

 bool retrieve(int64 &out value) const

 bool retrieve(double &out value) const

These methods retrieve the value stored in the object. The methods will return true if the stored value is compatible with the requested type.

Example usage

In the scripts it can be used as follows:

  int value;
  obj object;
  obj @handle;
  any a,b,c;
  a.store(value);      // store the value
  b.store(@handle);    // store an object handle
  c.store(object);     // store a copy of the object

  a.retrieve(value);   // retrieve the value
  b.retrieve(@handle); // retrieve the object handle
  c.retrieve(object);  // retrieve a copy of the object

In C++ the type can be used as follows:

CScriptAny *myAny;

int typeId = engine->GetTypeIdByDecl("string@");

CScriptString *str = new CScriptString("hello world");

myAny->Store((void*)&str, typeId);

myAny->Retrieve((void*)&str, typeId);

Generated on Sun May 21 2023 10:12:39 for AngelScript by  1.9.6


code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AngelScript: Application modules</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

AngelScript

          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Loading...

Searching...

No Matches

Application modules

Script builder

Context manager

Debugger

Serializer

Helper functions

Automatic wrapper functions

Generated on Sun May 21 2023 10:12:39 for AngelScript by  1.9.6