initial commit
This commit is contained in:
206
docs/articles/changes0.html
Normal file
206
docs/articles/changes0.html
Normal file
@@ -0,0 +1,206 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<title>AngelScript - Changes</title>
|
||||
|
||||
<style>
|
||||
H1
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H2
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H3
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H4
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
P
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
BODY
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
TD
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_small
|
||||
{
|
||||
FONT-SIZE: 10px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_normal
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_large
|
||||
{
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.header_normal
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_small
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_large
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
A
|
||||
{
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
A:hover
|
||||
{
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
.border
|
||||
{
|
||||
BORDER-RIGHT: gray 1px solid;
|
||||
BORDER-TOP: gray 1px solid;
|
||||
BORDER-LEFT: gray 1px solid;
|
||||
BORDER-BOTTOM: gray 1px solid;
|
||||
MARGIN-TOP: 0;
|
||||
MARGIN-LEFT: 0;
|
||||
MARGIN-RIGHT: 5;
|
||||
MARGIN-BOTTOM: 5;
|
||||
PADDING: 5 5 5 5;
|
||||
DISPLAY: block;
|
||||
}
|
||||
.a
|
||||
{
|
||||
BACKGROUND-COLOR: #FFFFCC;
|
||||
DISPLAY: block;
|
||||
margin-bottom: 2;
|
||||
PADDING: 5 5 5 5;
|
||||
}
|
||||
.b
|
||||
{
|
||||
BACKGROUND-COLOR: #EEEEEE;
|
||||
DISPLAY: block;
|
||||
margin-bottom: 2;
|
||||
PADDING: 5 5 5 5;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>AngelScript Change Log</h1>
|
||||
|
||||
<h2>Version 0.95 - 2003/06/17</h2>
|
||||
|
||||
<ul>
|
||||
<li>Fixed bug in constant declaration
|
||||
<li>Improved byte code for string manipulation
|
||||
<li>Added data type: <code>bits</code>
|
||||
<li>new operators: <code>~ | & ^ << >> >>> |= &= ^= <<= >>= >>>=</code>
|
||||
<li>added bits constants: <code>0xFFA</code>
|
||||
<li>Fixed a bug in the call stack
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.85 - 2003/06/04</h2>
|
||||
|
||||
<ul>
|
||||
<li>stack positions are re-used when variables goes out of scope
|
||||
<li><code>bstr</code> is now copied instead of reference counted
|
||||
<li>concatenation operators for <code>bstr</code>: <code>+ +=</code>
|
||||
<li>comparison operators for <code>bstr</code>: <code>== != < > <= >=</code>
|
||||
<li>If script is aborted or an exception occurs the engine cleans up the stack
|
||||
<li>Engine now executes until finished or until aborted
|
||||
<li>Arguments can now be sent by reference instead of by value
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.7 - 2003/05/28</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added <code>?:</code> operator
|
||||
<li>Added compound assignments: <code>+= -= *= /= %=</code>
|
||||
<li>New data type: <code>bstr</code> (byte string)
|
||||
<li>Added support for string constants
|
||||
<li>Character sequences: <code>\n \r \0 \\ \" \x00</code>
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.55 - 2003/05/19</h2>
|
||||
|
||||
<ul>
|
||||
<li>removed <code>include</code> from AngelScript
|
||||
<li>AngelScript no longer loads the scriptcode from disk
|
||||
<li>the host application can add several pieces of code that will be compiled as one
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.5 - 2003/05/15</h2>
|
||||
|
||||
<ul>
|
||||
<li>declaration of global constants through directive: <code>const</code>
|
||||
<li>added <code>do-while</code> statement
|
||||
<li>fixed bug in AngelScript
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.4 - 2003/05/09</h2>
|
||||
|
||||
<ul>
|
||||
<li>AngelScript now allows for application defined datatypes
|
||||
<li>fixed potential bug in AngelScript
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.3 - 2003/04/23</h2>
|
||||
|
||||
<ul>
|
||||
<li>Modulo operator <code>%</code>
|
||||
<li>minor changes in the virtual machine
|
||||
<li>fixed bug in compiler
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.25 - 2003/04/15</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added <code>++ --</code>
|
||||
<li>Boolean expressions are no longer fully evaluated
|
||||
<li>Added <code>break continue</code>
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.2 - 2003/04/09</h2>
|
||||
|
||||
<ul>
|
||||
<li>using cdecl calling convention
|
||||
</ul>
|
||||
|
||||
<h2>Version 0.1 - 2003/03/28</h2>
|
||||
|
||||
<ul>
|
||||
<li>Simple scripting with <code>int float</code>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
898
docs/articles/changes1.html
Normal file
898
docs/articles/changes1.html
Normal file
@@ -0,0 +1,898 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<title>AngelScript - Changes</title>
|
||||
|
||||
<style>
|
||||
H1
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H2
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H3
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H4
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
P
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
BODY
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
TD
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_small
|
||||
{
|
||||
FONT-SIZE: 10px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_normal
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_large
|
||||
{
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.header_normal
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_small
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_large
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
A
|
||||
{
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
A:hover
|
||||
{
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
.border
|
||||
{
|
||||
BORDER-RIGHT: gray 1px solid;
|
||||
BORDER-TOP: gray 1px solid;
|
||||
BORDER-LEFT: gray 1px solid;
|
||||
BORDER-BOTTOM: gray 1px solid;
|
||||
MARGIN-TOP: 0;
|
||||
MARGIN-LEFT: 0;
|
||||
MARGIN-RIGHT: 5;
|
||||
MARGIN-BOTTOM: 5;
|
||||
PADDING: 5 5 5 5;
|
||||
DISPLAY: block;
|
||||
}
|
||||
.a
|
||||
{
|
||||
BACKGROUND-COLOR: #FFFFCC;
|
||||
DISPLAY: block;
|
||||
margin-bottom: 2;
|
||||
PADDING: 5 5 5 5;
|
||||
}
|
||||
.b
|
||||
{
|
||||
BACKGROUND-COLOR: #EEEEEE;
|
||||
DISPLAY: block;
|
||||
margin-bottom: 2;
|
||||
PADDING: 5 5 5 5;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>AngelScript Change Log</h1>
|
||||
|
||||
<h2>Version 1.10.1d - 2005/01/21</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>asGetActiveContext() now returns 0 if there are no active contexts
|
||||
<li>It is now possible to overload arrays of registered types
|
||||
<li>Removed an assert failure when compiling math operator on non-math types
|
||||
<li>On GCC/Linux all classes/structs are always returned in memory regardless of size and complexity
|
||||
<li>Some compilers complained about the negative array size in the template code that is never instanciated. The code was commented.
|
||||
<li>Fixed an assert failure when trying to use a unregistered object type (thanks Alain "abrken" Bridel)
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.10.1c - 2004/12/19</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>ExecuteString() could sometimes return an invalid context pointer when an error occurred.
|
||||
<li>Application functions that returned float or double failed on GNUC based compilers with optimizations turned on. (thanks Marcin "Szpak" Zajaczkowski)
|
||||
<li>Prepare() could crash if the function id was incorrect.
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.10.1b - 2004/12/01</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>Temporary objects created explicitly by calling the object's constructor weren't properly handled by the exception handler (thanks Alain "abrken" Bridel)
|
||||
<li>Values were not implicitly converted to the parameter type when sent as function arguments
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.10.1a - 2004/11/26</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>The tokenizer wasn't able to handle string constants that ended with two backslashes (thanks Scott "waheyluggage" Newby)
|
||||
<li>The calling convention asCALL_CDECL_OBJFIRST wasn't working for functions with parameters
|
||||
<li>rvalue was not verified to be initialized in assignments
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.10.1 - 2004/11/21</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>The -> operator didn't compile correctly (thanks Adrian Licu)
|
||||
<li>If the ?: operator returned literal constants there was an assert failure (thanks Alain "abrken" Bridel)
|
||||
<li>Arrays of pointers were wrongly reported as uninitialized by the compiler
|
||||
<li>Dereferencing temporary variables didn't release the variable
|
||||
<li>Multidimensional arrays weren't working on GNUC based compilers
|
||||
<li>Arrays of pointers to objects where causing problems (thanks Dan "Aggrav8d" Royer)
|
||||
<li>Conversions to and from double failed in the VM (thanks Jetro Lauha)
|
||||
<li>CALLBND didn't work in the ASM vm
|
||||
<li>ExecuteStep() still didn't work as before with BUILD_WITH_LINE_CUES (thanks Josh Passenger)
|
||||
<li>++ and -- failed in ASM VM for float values
|
||||
<li>Temporary variables where at times prematurely released (thanks Jetro Lauha)
|
||||
</ul>
|
||||
|
||||
<li>Library interface
|
||||
<ul>
|
||||
<li>asIScriptContext::Prepare() can now be called with the argument asPREPARE_PREVIOUS to prepare a context for calling the same function that was previously called.
|
||||
</ul>
|
||||
|
||||
<li>Script language
|
||||
<ul>
|
||||
<li>All number types are now implicitly converted for assignments and function arguments
|
||||
<li>When evaluating math operations of two different number types the types are first implicitly converted to the largest type
|
||||
<li>bits datatype is implicitly converted to and from uint/int
|
||||
</ul>
|
||||
|
||||
<li>Virtual machine
|
||||
<ul>
|
||||
<li>Optimized the ASM VM
|
||||
</ul>
|
||||
|
||||
<li>Compiler
|
||||
<ul>
|
||||
<li>Greatly improved build times
|
||||
</ul>
|
||||
|
||||
<li>Multithreading
|
||||
<ul>
|
||||
<li>Multithreading support is off by default, to add the support define the flag USE_THREADS
|
||||
<li>The flag NO_THREADS no longer have any effect
|
||||
</ul>
|
||||
|
||||
<li>Project files
|
||||
<ul>
|
||||
<li>Added as_typeinfo.h and as_typeinfo.cpp
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.10.0 - 2004/11/02</h2>
|
||||
|
||||
<ul>
|
||||
<li>Virtual machine
|
||||
<ul>
|
||||
<li>Optimized the C++ VM
|
||||
<li>Jumps no longer suspend the VM
|
||||
<li>New byte code BC_END, only used by exception handler.
|
||||
<li>Added a new module as_context_x86.cpp with an optimized VM using assembly. Compile with the flag USE_ASM_VM to utilize this new VM. (contribution by Andres "Lioric" Carrera) NOTE: This is currently slightly slower than the C++ VM, but will be optimized further in future releases.
|
||||
<li>Removed the NOP instructions as they are no longer needed for alignment
|
||||
<li>Added the SUSPEND bytecode again. It's used to guarantee that the host application always can suspend a context, i.e. all loops have a SUSPEND instruction.
|
||||
</ul>
|
||||
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>Exception handler would continue the execution
|
||||
<li>Temporary variables were not always freed after compiling a function call
|
||||
<li>Constants were not always successfully converted to reference when making function calls (thanks Anthony "Deyja" Casteel)
|
||||
<li>The switch case didn't treat 8 and 16 bit integer types correctly (thanks Alain "abrken" Bridel)
|
||||
<li>The exception handler failed when objects where returned by reference
|
||||
<li>There was a memory leak when adding script sections but not actually building them (thanks Alain "abrken" Bridel)
|
||||
</ul>
|
||||
|
||||
<li>Script language
|
||||
<ul>
|
||||
<li>Added the operator 'xor' for boolean types. Alias '^^' (suggestion by Thomas Suter)
|
||||
<li>Added native support for arrays
|
||||
</ul>
|
||||
|
||||
<li>Library interface
|
||||
<ul>
|
||||
<li>Changed the parameter type for callConv to asDWORD in the interface
|
||||
<li>If the configuration is wrong the engine writes the message "Invalid configuration" to the outstream if available. People keep forgetting to verify the return code, this may help them understand why the build isn't done.
|
||||
<li>RegisterObjectBehaviour() should only be used for object behaviours. Global behaviours should be registered with RegisterGlobalBehaviour().
|
||||
<li>GetFunctionName(), GetFunctionDeclaration(), GetGlobalVarName(), GetGlobalVarDeclaration(), GetImportedFunctionDeclaration(), and GetExceptionString() have changed to return a pointer to the string, so it is no longer necessary to pass a buffer to them.
|
||||
<li>GetImportedFunctionSourceModule() and GetModuleNameFromIndex() now return the length as well.
|
||||
<li>New global function asThreadCleanup() (see multithreading)
|
||||
|
||||
<li>Fixed ExecuteStep() to work as before
|
||||
<ul>
|
||||
<li>By default ExecuteStep() is guaranteed to suspend execution at least once per loop
|
||||
<li>Added the compile flag BUILD_WITH_LINE_CUES, which makes the script compiler add extra bytecodes that allow ExecuteStep() to return after each statement.
|
||||
</ul>
|
||||
|
||||
<li>Improved ExecuteString()
|
||||
<ul>
|
||||
<li>Calls to ExecuteString() can now be nested.
|
||||
<li>ExecuteString() now takes an extra parameter, which allow the application to receive the context pointer directly, or even pass its own context by using the flag asEXECSTRING_USE_MY_CONTEXT.
|
||||
<li>GetContextForExecuteString() is deprecated.
|
||||
<li>ExecuteString() now reports build errors with line and column number starting with the passed string.
|
||||
</ul>
|
||||
|
||||
<li>Overridable array objects
|
||||
<ul>
|
||||
<li>It is now possible to register array objects, overriding the native array object
|
||||
<li>New error code: asLOWER_ARRAY_DIMENSION_NOT_REGISTERED
|
||||
<li>The library now returns asAPP_CANT_INTERFACE_DEFAULT_ARRAY if the application tries to register a function that uses arrays that haven't been registered by the application.
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<li>Multithreading
|
||||
<ul>
|
||||
<li>Added support for multithreading (can be disabled by defining NO_THREADS)
|
||||
<li>Multithreading should now work with both MSVC and MinGW. Still only for Windows though.
|
||||
<li>asGetActiveContext() is now thread safe
|
||||
<li>Reference counting is thread safe
|
||||
<li>The engine now deletes all unused modules when Discard() is called, this simplifies the context's interaction with the modules making the engine more stable for multithreading
|
||||
<li>Created the global function asThreadCleanup() that will allow AngelScript to cleanup some thread local data. Should be called before exiting any extra threads that access AngelScript.
|
||||
</ul>
|
||||
|
||||
<li>Miscellaneous
|
||||
<ul>
|
||||
<li>Added the module as_thread.cpp that abstract the OS's thread functions
|
||||
<li>New module as_arrayobject.cpp for the default array implementation
|
||||
<li>Added as_debug.h
|
||||
<li>Made minor code changes to make compilation on Linux smoother (thanks Johannes Plass)
|
||||
<li>Changed MSVC projects to output to a different file when in debugmode (thanks Dan "Aggrav8d" Royer)
|
||||
<li>Added std::vector binding code to the library download (thanks Anthony "Deyja" Casteel)
|
||||
<li>as_compiler_expression.cpp was merged with as_compiler.cpp
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.9.2a - 2004/10/12</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>Subtraction was optimized as if it was associative (thanks Lennart Denninger)
|
||||
<li>SetArguments() failed for script functions that returns registered object types by value. (thanks Thomas Suter)
|
||||
<li>The application would crash if an exception was raised in ExecuteString() (thanks Joe "Desdemona" Wright)
|
||||
<li>GetFunctionName() and GetFunctionDeclaration() now works for the ExecuteString() function id as well.
|
||||
<li>The compiler didn't warn when passing uninitialized variables to function parameters (thanks Alain "abrken" Bridel)
|
||||
<li>Constructors with parameters could cause assertion failure in GenerateExceptionHandler(). (thanks Alain "abrken" Bridel)
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.9.2 - 2004/09/30</h2>
|
||||
|
||||
<ul>
|
||||
<li>Library interface
|
||||
<ul>
|
||||
<li>The interface now uses default argument value where applicable to make it easier to use
|
||||
</ul>
|
||||
<li>Script language
|
||||
<ul>
|
||||
<li>Added support for global objects using constructors with parameters (contribution by Andres Carrera)
|
||||
<li>Improved constructors with parameters to work with local objects as well
|
||||
<li>Constructors can now be used in expressions to create temporary objects
|
||||
</ul>
|
||||
<li>Virtual Machine
|
||||
<ul>
|
||||
<li>Removed the bytecode EID, which speeds up execution when there are objects in the scripts
|
||||
<li>The exception ID is found by looking in a separate array
|
||||
<li>Added the bytecodes RDGA4 and MOVGA4 for faster access to global variables
|
||||
<li>Removed the bytecodes SET1 and PSP
|
||||
<li>Added the bytecodes ADDIi, SUBIi, ADDIf, SUBIf, CMPIf
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.9.1 - 2004/09/21</h2>
|
||||
|
||||
<ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>Switch-case didn't work correctly if the cases were not ordered in ascending order (thanks Dmitry "RCL" Rekman)
|
||||
<li>The ternary operator ?: didn't release temporary variables as it should, causing an assert failure in the debug version (thanks Dmitry "RCL" Rekman)
|
||||
<li>Passing string constants to condition operator would cause an assertion failure. (thanks Joe "Desdemona" Wright)
|
||||
<li>Implicit conversion of pointer to a reference to a pointer caused assert failure (thanks Joe "Desdemona" Wright)
|
||||
<li>The ternary operator ?: still wasn't working ok (thanks Joe "Desdemona" Wright)
|
||||
</ul>
|
||||
<li>Virtual Machine
|
||||
<ul>
|
||||
<li>Added 4 new conditional jump byte codes JS, JNS, JP, and JNP
|
||||
<li>Renamed JMP0 and JMP1 to JZ and JNZ respectively
|
||||
<li>Added the bytecodes CMPIi and CMPIui
|
||||
<li>Removed the bytecodes LINE and SUSPEND.
|
||||
<li>Line numbers are now stored in a separate array for the functions that need them
|
||||
<li>Added bytecode CALLSYS for calling system functions and CALLBND for calling bound functions
|
||||
<li>RET now pops the function arguments
|
||||
</ul>
|
||||
<li>Script language
|
||||
<ul>
|
||||
<li>String constants are now concatenated by the compiler if only whitespace separate them
|
||||
<li>If the first case in the ternary operator ?: is a constant 0 it's type will be converted to the type of the second case.
|
||||
</ul>
|
||||
<li>Compiler
|
||||
<ul>
|
||||
<li>Added many optimizations
|
||||
<li>Code that can't be reached is now removed by the compiler
|
||||
<li>If statements that have constant expressions are optimized to go directly to the correct case
|
||||
<li>If there are no objects in the function the exception handler will only have a return instruction
|
||||
</ul>
|
||||
<li>Library interface
|
||||
<ul>
|
||||
<li>ExecuteStep() no longer suspends execution after each statement because of the remove bytecodes LINE and SUSPEND.
|
||||
<li>Added support for asCALL_CDECL_OBJFIRST (thanks Tristan "Kurioes" Hartskeerl)
|
||||
<li>The value of boolean true can now be configured in as_config.h (the default is set to 1)
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.9.0 - 2004/09/02</h2>
|
||||
|
||||
<ul>
|
||||
<li>Library interface
|
||||
<ul>
|
||||
<li>Renamed RegisterTypeBehaviour() to RegisterObjectBehaviour()
|
||||
<li>Removed the flags asCALL_RETURNBYVAL and asCALL_RETURNBYREF
|
||||
<li>Removed the flags asOBJ_IS_COMPLEX and asOBJ_IS_NOT_COMPLEX
|
||||
<li>Included support for saving and loading compiled bytecode (thanks Dennis Bollyn)
|
||||
<li>Removed the need to pass stack size when calling Prepare() or ExecuteString()
|
||||
<li>Added the method SetDefaultContextStackSize()
|
||||
<li>New error message asINVALID_CONFIGURATION, which is returned by Build() if the configuration failed
|
||||
<li>Removed AS_CALL from the interface. This changes the exported function names.
|
||||
<li>Added new methods for binding module functions from different modules.
|
||||
<li>Removed GetModuleID()
|
||||
<li>Added GetModuleIndex(), and GetModuleNameFromIndex()
|
||||
<li>Added GetFunctionIDByIndex() and GetGlobalVarIDByIndex()
|
||||
<li>Added functions for automatically binding all functions imported in a module. New error code asCANT_BIND_ALL_FUNCTIONS
|
||||
<li>Added the lineOffset parameter to AddScriptSection()
|
||||
</ul>
|
||||
<li>Compiler
|
||||
<ul>
|
||||
<li>Compiler no longer outputs unecessary messages, such as "Building..."
|
||||
<li>Each error message now follows a standard format: {section name} ({row}, {col}) : {Error or Warning} : {Message}
|
||||
</ul>
|
||||
<li>Virtual machine
|
||||
<ul>
|
||||
<li>The context stack now dynamically grows as needed
|
||||
<li>New byte code BC_STR, that pushes the constant string address and length on the stack. The direct memory address is no longer stored in the compiled byte code
|
||||
</ul>
|
||||
<li>Script language
|
||||
<ul>
|
||||
<li>Added the global statement 'import FUNC_DEF from "MODULE NAME";'. 'import' is a reserved keyword, but 'from' isn't.
|
||||
</ul>
|
||||
<li>Miscellaneous
|
||||
<ul>
|
||||
<li>Renamed acCString to asCString and acCArray to asCArray
|
||||
<li>Minor code improvements and potential bug fixes (thanks Wade Brainerd)
|
||||
</ul>
|
||||
<li>Bug fixes
|
||||
<ul>
|
||||
<li>Returning complex objects in script functions didn't work as expected. (thanks Joe "Desdemona" Wright)
|
||||
<li>An assert failed in GenerateExceptionHandler() when returning large types.
|
||||
<li>The macros asFUNCTIONP() and asFUNCTIONPR() wasn't working (thanks Joe "Desdemona" Wright)
|
||||
<li>When a Build() fails, the module is cleaned up so that ExecuteString() can't call half compiled functions
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.3 - 2004/08/31</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: An object with asBEHAVE_ASSIGNMENT registered could be assigned even though it was declared as const (thanks Lee "_MrC_" Clark)
|
||||
<li>bug fix: Two functions with the same name and parameters would cause an assertion failure in compiler (thanks Alain "abrken" Bridel)
|
||||
<li>bug fix: Discarding a module with Discard() could sometimes cause the module object to be deleted twice (thanks Alain "abrken" Bridel)
|
||||
<li>bug fix: There was a typo in macro asMETHODPR() (thanks Joe "Desdemona" Wright)
|
||||
<li>bug fix: An unclosed statement block could lead to assert failure in the parser (thanks Alain "abrken" Bridel)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.2 - 2004/08/13</h2>
|
||||
|
||||
<ul>
|
||||
<li>Methods from classes with multiple inheritance are now supported
|
||||
<li>Changed how the byte code references script functions, so that they are now local to each module, i.e. independent of module ID
|
||||
<li>BC_PGA now takes an int instead of a dword
|
||||
<li>Changed so that registered global properties are referenced by index instead of their memory address
|
||||
<li>Global script variables are referenced by their local index, i.e. independent of module ID
|
||||
<li>Added support for switch case statements (thanks Jeff White)
|
||||
<li>Added support for the negative operator behaviour. The new flag is asBEHAVE_NEGATE
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.1 - 2004/08/13</h2>
|
||||
|
||||
<ul>
|
||||
<li>Changed debug output to be put in subdirectory AS_DEBUG
|
||||
<li>bug fix: Some errors were always reported on line 1 column 1, no matter where they were located
|
||||
<li>bug fix: An assertion failed when a function call used a temporary variable and the function wasn't found (thanks Jakub "krajzega" Wasilewski)
|
||||
<li>bug fix: Non-complex objects with 2 DWORDs in size is now correctly returned from system functions
|
||||
<li>bug fix: Objects returned in memory is now correctly handled by MinGW for cdecl calling convention
|
||||
<li>bug fix: Objects registered with asOBJ_IS_COMPLEX was not treated correctly by MinGW
|
||||
<li>bug fix: BC_PGA didn't mask out the module ID when retrieving the address of the global variable. (thanks Anders "Dentoid" Stenberg)
|
||||
<li>bug fix: Class methods can now return objects in MSVC
|
||||
<li>bug fix: Local variables in the top statement block could be destroyed at return even though they were declared after the return statement. (thanks Anders "Dentoid" Stenberg)
|
||||
<li>bug fix: Class methods can now return objects in memory on MinGW
|
||||
<li>bug fix: ExecuteString() could cause a crash when executed on a script compiled for the second time using the same module name. (thanks Jakub "krajzega" Wasilewski)
|
||||
<li>Registering methods from classes with multiple inheritance are detected and reported as not supported
|
||||
<li>Registering methods from classes with virtual inheritance are detected and reported as not supported on MSVC. Can't be detected on GNUC
|
||||
<li>Cleaned up as_callfunc_x86.cpp
|
||||
<li>Added support for virtual methods in GNUC
|
||||
<li>New flags for RegisterObjectType(): asOBJ_CLASS, asOBJ_CLASS_CONSTRUCTOR, asOBJ_CLASS_DESTRUCTOR, asOBJ_CLASS_ASSIGNMENT, asOBJ_PRIMITIVE, asOBJ_FLOAT
|
||||
<li>The flags asCALL_RETURNBYREF and asCALL_RETURNBYVAL no longer have any effect, and will be removed in a future version
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.0c - 2004/07/19</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: When creating a module its ID wasn't set correctly if another module had previously been released (thanks Lennart Denninger)
|
||||
<li>bug fix: An assert failed when calling function in global variable initialization (thanks Lennart Denninger)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.0b - 2004/07/17</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: Overloaded functions in multiple modules didn't compile correctly (thanks Anders "Dentoid" Stenberg)
|
||||
<li>bug fix: MinGW reported duplicate labels when compiling as_callfunc_x86.cpp (thanks Jakub "krajzega" Wasilewski)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.0a - 2004/07/12</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: asOBJ_IS_NOT_COMPLEX incorrectly identified objects smaller than or equal to 8 bytes (thanks Lennart Denninger)
|
||||
<li>bug fix: Function calls in a second module didn't compile correctly (thanks Lennart Denninger)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.8.0 - 2004/07/10</h2>
|
||||
|
||||
<ul>
|
||||
<li>Removed the flags parameter from RegisterGlobalProperty() and RegisterObjectProperty()
|
||||
<li>Added RegisterStringFactory()
|
||||
<li>Removed the bstr type from the library
|
||||
<li>Added new behaviour flags for assignment operators, changing the values of the others
|
||||
<li>Overloading assignment operator and compound assignment operators now work
|
||||
<li>Added changes to remove level 4 warnings for MSVC .NET (thanks Ricard)
|
||||
<li>Added C++ code alternative to the assembler code (thanks Eric Love)
|
||||
<li>Changed the way function pointers and method pointers are registered. Use as asFUNCTION(f) and asMETHOD(c, m) macros.
|
||||
<li>bug fix: Object method calls didn't free the object if it was temporary. (thanks Peter Marshall)
|
||||
<li>Support for compilation of scripts into separate modules have been implemented.
|
||||
<li>BC_PGA now takes a DWORD instead of a WORD
|
||||
<li>@init() and @exit() are no longer reported by GetFunction...()
|
||||
<li>Added support for STDCALL (contribution by Adam Hoult)
|
||||
<li>bug fix: Functions with arguments of object types sent by value didn't pop all the arguments from the stack (thanks Adam Hoult)
|
||||
<li>Added the method Discard() which allows the application to discard a module when it is no longer needed
|
||||
<li>Added the method GetModuleID() which can be used to enumerate script functions in modules
|
||||
<li>RegisterObjectType() should now use the new flags asOBJ_IS_COMPLEX and asOBJ_IS_NOT_COMPLEX
|
||||
<li>ExecuteString() now take the name of the module in which it is to be executed
|
||||
<li>Added support for enumeration of global script variables
|
||||
<li>Added new macros to make it easier to take the pointer of overloaded functions and methods
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.7.1a - 2004/06/10</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: Arguments received by reference was erronously destroyed (thanks Peter Marshall)
|
||||
<li>bug fix: MSVC++.Net 2003 crashed when compiling scripts. (thanks Fredrik Malmer)
|
||||
<li>bug fix: Unnamed parameters wasn't treated by the exception handler
|
||||
<li>bug fix: Some temporary variables wasn't correctly freed, leading to memory leakage
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.7.1 - 2004/05/27</h2>
|
||||
|
||||
<ul>
|
||||
<li>bstr has become an internally registered type
|
||||
<li>bstr.length() is now a method instead of a property
|
||||
<li>Removed the byte code STRMKE
|
||||
<li>RegisterObjectType() now accepts the flags asCALL_RETURNBYVAL and asCALL_RETURNBYREF
|
||||
<li>bug fix: Prepare() should no longer crash when receiving invalid function id (thanks Xavier "meink" Shay)
|
||||
<li>The unexpected token message now shows what token was found
|
||||
<li>It is now possible to use function overloads for scripted functions as well
|
||||
<li>GetFunctionIDByName() returns asMULTIPLE_FUNCTIONS if more than one function with the same name exists
|
||||
<li>GetFunctionIDByDecl() is now supported
|
||||
<li>bug fix: The -> operator now works with direct pointers as well as pointer references (thanks Joe "Desdemona" Wright)
|
||||
<li>bug fix: multiple variables per global declaration statement now works again (thanks Lennart Denninger)
|
||||
<li>bug fix: scripts with errors in global variables could crash the application if no output stream was specified (thanks Fredrik Ehnbom)
|
||||
<li>bug fix: calling ExecuteString() without first building a script didn't work (thanks Fredrik Ehnbom)
|
||||
<li>ExecuteStep(asEXEC_STEP_OVER) is now supported
|
||||
<li>Added support for the indexing operator
|
||||
<li>The asBEHAVE_INDEX flag is used to register the overloaded indexing operator
|
||||
<li>bstr[int] returns a reference to the indexed byte
|
||||
<li>The library is now working on the Dreamcast (thanks Fredrik Ehnbom)
|
||||
<li>bug fix: When compiling function calls the compiler didn't discard alternatives with more parameters than used arguments (thanks Lennart Denninger)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.7.0 - 2004/05/03</h2>
|
||||
|
||||
<ul>
|
||||
<li>Included the makefile for Linux compilers (thanks Stefan Diepenbrock)
|
||||
<li>Added the methods ExecuteString() and GetContextForExecuteString() to the engine interface
|
||||
<li>ExecuteStep() now takes a parameter that defines how to execute, only asEXEC_STEP_INTO is supported at the moment
|
||||
<li>ExecuteString() is able to work with compiled script
|
||||
<li>ExecuteString() now takes a flag that can be either 0 or asEXECSTRING_ONLY_PREPARE (thanks Joe "Desdemona" Wright)
|
||||
<li>Removed the concept of global constants, they are instead global variables that are read-only
|
||||
<li>bug fix: global variables ignored any type modifiers, thus global pointers were not possible (thanks Gunder Wulde)
|
||||
<li>condition operator can be used when initializing global variables
|
||||
<li>Global variables can now be initialized with expressions using other global variables, not just constants
|
||||
<li>When finding the matching overloaded function, a conversion between signed and unsigned integers are given priority over conversion between integer and float (thanks Joe "Desdemona" Wright)
|
||||
<li>bug fix: A pointer with an assignment behaviour can now be assigned a null pointer.
|
||||
<li>Changed the library license from LGPL to the zLib license
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.6.1b - 2004/03/30</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: Declaring multiple global variables in the same statement resulted in compiler error (thanks Jayanth)
|
||||
<li>Added the tokens &&, ||, and ! as aliases to 'and', 'or', and 'not'
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.6.1a - 2004/03/23</h2>
|
||||
|
||||
<ul>
|
||||
<li>Removed compilation warning for VSC++ .NET 2003 (thanks Daniel Krenn)
|
||||
<li>bug fix: When reading booleans as object properties the compiler failed to mask out value (thanks Joe "Desdemona" Wright)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.6.1 - 2004/03/21</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: There was a memory leak in the tokenizer (thanks Philip Love)
|
||||
<li>bug fix: An exception occured when compiling method calls with objects as parameters (thanks Bartosz "Hans" Czuba)
|
||||
<li>More code cleaned up
|
||||
<li>BCONSTR and BDESTR are no longer used, instead BC_CALL is used
|
||||
<li>BCONSTR, BDESTR, BCOPY, STRDEL, STRCPY, STRMOV, STRCAT, STRCMP and STRWRT has been removed
|
||||
<li>bug fix: break, continue, and return sometimes caused GenerateExceptionHandler() to fail since objects were destroyed more than once
|
||||
<li>Added support for the for-loop (thanks Erik J Baran)
|
||||
<li>Return values are now returned in a special register instead of on the stack
|
||||
<li>Added bytecodes SRET4, SRET8, RRET4, RRET8 for managing the return register
|
||||
<li>Added the calling convention asCALL_CDECL_OBJLAST for object methods. This calls the method as a normal C function with the object reference as the last parameter
|
||||
<li>The asMETHOD and asFUNCTION types are now defined macros instead
|
||||
<li>Type behaviours must be registered as either asCALL_THISCALL or asCDECL_OBJLAST
|
||||
<li>Pointers can now be compared with other pointers of the same type and level, or with 0 for null pointer tests
|
||||
<li>It is now possible to register overloaded operators for all dual operators, except assignment operators
|
||||
<li>bstr is now handled with operator overloads
|
||||
<li>bug fix: booleans are now 1 byte large, just as for C++ (thanks Josh "nihlist" Passenger for spotting the bug).
|
||||
<li>Cleaned up the code that compiles overloaded operators and function calls
|
||||
<li>Changed all the JMP instructions to use a 4 byte offset
|
||||
<li>Function overloading for registered functions and object methods is now supported
|
||||
<li>bug fix: When converting a constant to another type the value would become 0
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.6.0 - 2004/02/18</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added parameter flags for RegisterObjectType, but should be set to 0
|
||||
<li>The flag asCALL_WITHCONTEXT is no longer available, use asGetActiveContext() to retrieve context instead
|
||||
<li>GetFunctionCount() can now be used to obtain the number of script functions compiled
|
||||
<li>The way type behaviours are registered have been changed to allow more flexibility
|
||||
<li>Cleaned up the code
|
||||
<li>bug fix: RegisterObjectMethod() didn't accept asCALL_RETURNBYVAL and asCALL_RETURNBYREF flags
|
||||
<li>If any of the engine configuration methods fail the engine object will no longer let the application build scripts.
|
||||
<li>Function parameters and variables can now be declared as const
|
||||
<li>The flag asPROPERTY_READONLY has been removed, use const in declaration instead
|
||||
<li>bug fix: exceptionID wasn't initialized to zero in Prepare() and the program could crash at an exception
|
||||
<li>Lot's of changes to allow compilation with DJGPP (thanks Eric Love)
|
||||
<li>Added as_config.h that may be used to configure some aspects of the compilation to acomodate for compiler differences
|
||||
<li>Improved the angelscript.h by allowing the user to define exactly the way AngelScript is linked
|
||||
<li>bug fix: Equality comparison between bits types didn't work (thanks Bartosz "Hans" Czuba)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.5.2 - 2004/01/30</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: When sending objects with behaviours by value in function arguments the exception handler didn't correctly destroy the objects
|
||||
<li>bug fix: Pointers now work correctly with behaviours
|
||||
<li>Added the flags asCALL_RETURNBYVAL and asCALL_RETURNBYREF that can be used to register how a system function returns if the engine isn't able to correctly determine it
|
||||
<li>Cleaned up the method CallSystemFunction() giving about 10% performance improvement
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.5.1 - 2004/01/26</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: The compiler no longer crashes when an object method name is not found (thanks Lennart Denninger)
|
||||
<li>Changed where and when objects are constructed and destructed
|
||||
<li>Changed bstr to use behaviour functions for construct, destruct, and copy
|
||||
<li>Changed the STRMKE and the STRCAT byte codes
|
||||
<li>STRDEL, STRCPY, STRMOV, and STRWRT are no longer used
|
||||
<li>Added bytecodes JMPP, EID, and PEID
|
||||
<li>Completely remade the way the script engine cleans up the stack in case of exceptions
|
||||
<li>It is now allowed to register behaviours for pointers to objects
|
||||
<li>Exceptions may be thrown in the construct and copy behaviour functions
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.5.0 - 2004/01/19</h2>
|
||||
|
||||
<ul>
|
||||
<li>When registering object types the name is checked against all other names registered
|
||||
<li>It is no longer possible to register two object members with the same name
|
||||
<li>Contexts now hold a reference to the engine object
|
||||
<li>Added RegisterTypeBehaviour() that allows the application to register helper function that will be call when a script variable is initialized, uninitialized, and copied
|
||||
<li>Added bytecodes BC_BCONSTR, BC_BDESTR, and BC_BCOPY
|
||||
<li>Objects with behaviour cannot be sent by value
|
||||
<li>Returning objects with behaviour requires special care for system functions
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.4.1 - 2004/01/14</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: SetArguments() and GetReturnValue() didn't work
|
||||
<li>Change the message for when implicit conversion is not possible to a more descriptive one
|
||||
<li>Added int32 as alias to int, uint32 to uint, and bits32 to bits
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.4.0 - 2004/01/12</h2>
|
||||
|
||||
<ul>
|
||||
<li>Created the asIScriptContext interface for communicating directly with the contexts
|
||||
<li>Context::Prepare() now takes a function ID instead of a string, making it faster for repeated preparations with the same function
|
||||
<li>Get/SetStackData() has been renamed to GetReturnValue() and SetArguments()
|
||||
<li>GetReturnValue() and SetArguments() now takes an array of dwords instead of a single dword
|
||||
<li>System functions now receive a pointer to the context instead of the engine
|
||||
<li>Added RegisterGlobalProperty() giving the script engine access to variables in the host application
|
||||
<li>bug fix: properties are now properly treated as read only if the flag is set
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.9 - 2004/01/06</h2>
|
||||
|
||||
<ul>
|
||||
<li>bug fix: the compiler determined the size of the returned value incorrectly for large types
|
||||
<li>bug fix: the script engine crashed the program when calling system functions that returned large types
|
||||
<li>warnings and errors during compilation of constants are now correctly shown
|
||||
<li>Improved performance for repetetive execution of the same script function by caching some values
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.8 - 2003/12/10</h2>
|
||||
|
||||
<ul>
|
||||
<li>Explicit conversions no longer generate warnings about precision
|
||||
<li>bug fix: global constants of type double didn't hold the correct value
|
||||
<li>float constants can now be declared explicitly by including the f modifier after the number
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.7 - 2003/11/27</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added datatype <code>double</code>
|
||||
<li>lots of new byte codes to handle the <code>double</code> data type
|
||||
<li>Added missing conversions <code>bits</code> -> <code>bits8</code>, <code>bits16</code> -> <code>bits8</code>, <code>bits</code> -> <code>bits16</code>
|
||||
<li>bug fix: Conversions in constant expressions now work
|
||||
<li>bug fix: <code>bits</code> constants are now correctly parsed
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.6 - 2003/11/07</h2>
|
||||
|
||||
<ul>
|
||||
<li>Fixed a memory leak
|
||||
<li>Multiple global constants of the same type can now be declared in the same statement
|
||||
<li>Conversion on constants now continue being constants if possible
|
||||
<li>Constant declarations now correctly report error if expression type is wrong
|
||||
<li>Constant expressions are now implicitly converted to correct type for constant declarations
|
||||
<li>Global variables can now be declared and initialized with constant expressions
|
||||
<li>Added byte code PGA (Push Global Address) used to access global variables
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.5 - 2003/09/23</h2>
|
||||
|
||||
<ul>
|
||||
<li>Fixed a bug with returning a pointer to a float from a system function
|
||||
<li>Fixed bug in CleanStack, that crashed program on an exception
|
||||
<li>bstr.length is now uint
|
||||
<li>Changed data types for functions asCreateScriptEngine, asBStrAlloc, and asBStrLength
|
||||
<li>Improved speed of object method calls with almost 10%
|
||||
<li>Added new bytecode PUSHZERO improving speed about 3%
|
||||
<li>Added new bytecode COPY for copying memory blocks
|
||||
<li>Simple structs are now supported, those that don't need special treatment for construction, destruction and assignments
|
||||
<li>Added bytecode PSP (again)
|
||||
<li>Fixed a bug that sometimes crashed the program if a system function declaration was wrong
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.4 - 2003/09/16</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added data types: <code>int8</code>, <code>int16</code>, <code>uint8</code>, <code>uint16</code>, <code>bits8</code>, <code>bits16</code>
|
||||
<li>Bitwise shift operators now takes an unsigned integer to the right
|
||||
<li>bits, int, and uint can be implicitly converted to a larger type but never to a smaller
|
||||
<li>Added byte codes BC_SB, BC_SW, BC_UB, BC_UW, BC_WRT1, BC_WRT2, BC_INCi16, BC_INCi8, BC_DECi16, BC_DECi8
|
||||
<li>Implemented ++, -- for uint type (missing from last version)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.3 - 2003/09/10</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added data type: <code>uint</code>
|
||||
<li>Integer constants are now <code>uint</code>
|
||||
<li>Added byte codes BC_UI2F, BC_F2UI, BC_CMPui
|
||||
<li>Fixed a bug that affected unary operations on constant values
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.2 - 2003/09/02</h2>
|
||||
|
||||
<ul>
|
||||
<li>Separated texts from the code for easier maintenance
|
||||
<li>Separated library code from Windows DLL code
|
||||
<li>Library code is now following the ANSI standard
|
||||
<li>Fixed bug that at crashed program when the engine was destroyed
|
||||
<li>System functions may now returns references that the script engine can write to
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.1 - 2003/08/22</h2>
|
||||
|
||||
<ul>
|
||||
<li>RegisterObjectMethod() is now supported for non virtual object methods
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.3.0 - 2003/08/19</h2>
|
||||
|
||||
<ul>
|
||||
<li>Reduced windows .dll size 10% by using the linker option /OPT:NOWIN98
|
||||
<li>Reduced size another 20% by turning off exception handling (something that can't safely be used in a dll anyway as other compilers don't implement it the same way)
|
||||
<li>Interface functions and methods are now explicitly declared as _stdcall
|
||||
<li>The script language now allows the use of pointer declarations, although no pointer arithmetic
|
||||
<li>Added the -> operator to access members from pointers
|
||||
<li>Changed the RegisterObjectProperty() parameters
|
||||
<li>RegisterObjectType() now takes an object size as property as well (although, only 0 is supported)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.2.1 - 2003/08/12</h2>
|
||||
|
||||
<ul>
|
||||
<li>Registered object types are checked already when registering them
|
||||
<li>Registered global functions are checked at inclusion
|
||||
<li>Fixed bug, a script exception could sometimes crash the app
|
||||
<li>Object properties can now be registered by the application.
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.2.0 - 2003/08/05</h2>
|
||||
|
||||
<ul>
|
||||
<li>The engine now supports multiple contexts for executing several script functions in parallel
|
||||
<li>The application can now set a script exception in system functions
|
||||
<li>The application can query the current function and line number being executed
|
||||
<li>Changed the status codes returned by Execute()
|
||||
<li>It is now possible to suspend a context
|
||||
<li>The last context executed is returned with GetLastContextExecuted()
|
||||
<li>EnumerateContexts() enumerates all existing context IDs.
|
||||
<li>PrepareContext() uses an existing context created with CreateContext() to improve performance of execution
|
||||
<li>A pointer to the scripting engine is sent as the last parameter to the system functions
|
||||
<li>Improved error codes for interface methods
|
||||
<li>ExecuteStep() allows the application to step through the script.
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.1.2 - 2003/07/31</h2>
|
||||
|
||||
<ul>
|
||||
<li>Added the access operator <code>.</code> for object properties
|
||||
<li>Added <code>length</code> property to the <code>bstr</code> type
|
||||
<li>Added ADDOFF that adds an offset to a pointer in a variable
|
||||
<li>Fixed a bug in CompileDeclaration()
|
||||
<li>Fixed a bug in Execute() where it returned 1 when finished succesfully
|
||||
<li>Fixed bug in CallCDeclFunction(), where printf() and OutputDebugString() didn't work in the called function
|
||||
<li>asCDataType now allows references to be marked as read-only
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.1.1 - 2003/07/25</h2>
|
||||
|
||||
<ul>
|
||||
<li>Cleaned up the code for the instruction set
|
||||
<li>Added instruction set statistics
|
||||
<li>Removed NOP, PSP, END
|
||||
<li>Added MOVSF4, SWAP4, STORE4, RECALL4
|
||||
<li>Improved performance of the switch case in asCThread::ExecuteNext()
|
||||
<li>Improved performance for compound assignments
|
||||
<li>Fixed a bug in CompileConversion()
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.1.0 - 2003/07/18</h2>
|
||||
|
||||
<ul>
|
||||
<li>The thread now reserves space on the stack for arguments and return value
|
||||
<li>It is now possible to send arguments and retrieve return value
|
||||
<li>The declarations of the script functions can be retrieved for verification
|
||||
<li>Compiler error on divide by zero with constant
|
||||
<li>Throws divide-by-zero on DIVi, MODi, DIVf, MODf
|
||||
<li>Added byte code LINE that the thread uses to report on which line an exception ocurred
|
||||
<li>The output stream is now only used during build.
|
||||
<li>Made the string methods global because the memory is shared anyway
|
||||
<li>Information about exceptions ocurred can now be retrieved from the engine
|
||||
<li>The engine interface now uses reference counting to control memory deallocation
|
||||
<li>Changed the name of the thread functions, as they create the misconceptions that multiple threads are allowed
|
||||
<li>The output stream is now sent with the Build() method, as it is only used during build.
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.4 - 2003/07/16</h2>
|
||||
|
||||
<ul>
|
||||
<li>Improved compiler code to be easier to maintain
|
||||
<li>Improved the implicit conversion to include assignment and return expressions.
|
||||
<li>Improved compiler message output, doesn't write "Parsing..." or "Compiling..." unless there is an error or warning.
|
||||
<li>Improved verification of extended types and system functions
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.3 - 2003/07/08</h2>
|
||||
|
||||
<ul>
|
||||
<li>Undeclared variables are only reported once
|
||||
<li>Doesn't give assert failed when lvalue is a temporary variable (gives a compile error instead)
|
||||
<li>A warning is now given if a variable is used before being assigned a value
|
||||
<li>Added implicit conversion between int and float for constant values
|
||||
<li>Constant expressions are evaluated into a single constant
|
||||
<li>Constant declarations may now take constant expressions
|
||||
<li>Constants can only be declared one per statement.
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.2 - 2003/07/03</h2>
|
||||
|
||||
<ul>
|
||||
<li>Fixed minor error where the script engine treated the argument to STRMKE as short instead of WORD as it should.
|
||||
<li>Added an extra SUSPEND in both while and do-while loops to make sure that at least one exist in every loop.
|
||||
<li>Fixed a bug where assigning a string to a variable breaks the code.
|
||||
<li>Added post compile optimizations
|
||||
<li>Added byte code RDSF4 that the optimizer puts in the place of PSF followed by RD4
|
||||
<li>Added asGetLibraryVersion() to the API
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.1 - 2003/06/30</h2>
|
||||
|
||||
<ul>
|
||||
<li>Corrected the missing return type for operator = in asCDataType (thanks Marc Fascia for spotting that)
|
||||
<li>Fixed a bug where the script engine crashed when initializing variables with a declared bstr constant.
|
||||
<li>Improved version check so that it is backwards compatible for changes in build version (bug fixes)
|
||||
</ul>
|
||||
|
||||
<h2>Version 1.0.0 - 2003/06/25</h2>
|
||||
|
||||
<ul>
|
||||
<li>Improved temporary variable reutilization
|
||||
<li>Removed bug in release version
|
||||
<li>Cleaned up the code for public release
|
||||
<li>Prepared for compilation as DLL
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
3795
docs/articles/changes2.html
Normal file
3795
docs/articles/changes2.html
Normal file
File diff suppressed because it is too large
Load Diff
120
docs/index.html
Normal file
120
docs/index.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<HTML>
|
||||
<head>
|
||||
<title>Documentation</title>
|
||||
|
||||
<style>
|
||||
H1
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H2
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H3
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
H4
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
P
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
BODY
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
TD
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_small
|
||||
{
|
||||
FONT-SIZE: 10px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_normal
|
||||
{
|
||||
FONT-SIZE: 12px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.text_large
|
||||
{
|
||||
FONT-SIZE: 14px;
|
||||
FONT-FAMILY: Arial
|
||||
}
|
||||
.header_normal
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 18px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_small
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 16px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
.header_large
|
||||
{
|
||||
FONT-WEIGHT: bold;
|
||||
FONT-SIZE: 24px;
|
||||
FONT-FAMILY: Verdana
|
||||
}
|
||||
A
|
||||
{
|
||||
TEXT-DECORATION: none
|
||||
}
|
||||
A:hover
|
||||
{
|
||||
TEXT-DECORATION: underline
|
||||
}
|
||||
.border
|
||||
{
|
||||
BORDER-RIGHT: gray 1px solid;
|
||||
BORDER-TOP: gray 1px solid;
|
||||
BORDER-LEFT: gray 1px solid;
|
||||
BORDER-BOTTOM: gray 1px solid;
|
||||
MARGIN-TOP: 0;
|
||||
MARGIN-LEFT: 0;
|
||||
MARGIN-RIGHT: 5;
|
||||
MARGIN-BOTTOM: 5;
|
||||
PADDING: 5 5 5 5;
|
||||
DISPLAY: block;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<h1>AngelCode Scripting Library</h1>
|
||||
|
||||
<p>
|
||||
<a href="manual/index.html">Application Writer's Manual</a><br>
|
||||
This is the reference manual for the library interface.</p>
|
||||
|
||||
<p>
|
||||
<a href="articles/changes2.html">AngelScript Change Log versions 2.x</a><br>
|
||||
<a href="articles/changes1.html">AngelScript Change Log versions 1.x</a><br>
|
||||
<a href="articles/changes0.html">AngelScript Change Log versions 0.x</a><br>
|
||||
The complete change log for the library.
|
||||
</p>
|
||||
|
||||
</body></HTML>
|
||||
2390
docs/manual/angelscript_8h.html
Normal file
2390
docs/manual/angelscript_8h.html
Normal file
File diff suppressed because it is too large
Load Diff
130
docs/manual/annotated.html
Normal file
130
docs/manual/annotated.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Class List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('annotated.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_binary_stream.html" target="_self">asIBinaryStream</a></td><td class="desc">A binary stream interface </td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_j_i_t_compiler.html" target="_self">asIJITCompiler</a></td><td class="desc">The interface that AS use to interact with the JIT compiler </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_lockable_shared_bool.html" target="_self">asILockableSharedBool</a></td><td class="desc">A lockable shared boolean </td></tr>
|
||||
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_context.html" target="_self">asIScriptContext</a></td><td class="desc">The interface to the virtual machine </td></tr>
|
||||
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_engine.html" target="_self">asIScriptEngine</a></td><td class="desc">The engine interface </td></tr>
|
||||
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_function.html" target="_self">asIScriptFunction</a></td><td class="desc">The interface for a script function description </td></tr>
|
||||
<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_generic.html" target="_self">asIScriptGeneric</a></td><td class="desc">The interface for the generic calling convention </td></tr>
|
||||
<tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_module.html" target="_self">asIScriptModule</a></td><td class="desc">The interface to the script modules </td></tr>
|
||||
<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_script_object.html" target="_self">asIScriptObject</a></td><td class="desc">The interface for an instance of a script object </td></tr>
|
||||
<tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_string_factory.html" target="_self">asIStringFactory</a></td><td class="desc">The interface for the string factory </td></tr>
|
||||
<tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_thread_manager.html" target="_self">asIThreadManager</a></td><td class="desc">The interface for the thread manager </td></tr>
|
||||
<tr id="row_11_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classas_i_type_info.html" target="_self">asITypeInfo</a></td><td class="desc">The interface for describing types This interface is used to describe the types in the script engine </td></tr>
|
||||
<tr id="row_12_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structas_s_b_c_info.html" target="_self">asSBCInfo</a></td><td class="desc">Information on a bytecode instruction </td></tr>
|
||||
<tr id="row_13_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structas_s_func_ptr.html" target="_self">asSFuncPtr</a></td><td class="desc">Represents a function or method pointer </td></tr>
|
||||
<tr id="row_14_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structas_s_message_info.html" target="_self">asSMessageInfo</a></td><td class="desc">Represents a compiler message </td></tr>
|
||||
<tr id="row_15_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="structas_s_v_m_registers.html" target="_self">asSVMRegisters</a></td><td class="desc">A struct with registers from the VM sent to a JIT compiled function </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/manual/aslogo.png
Normal file
BIN
docs/manual/aslogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
BIN
docs/manual/aslogo_small.png
Normal file
BIN
docs/manual/aslogo_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
docs/manual/bc_s.png
Normal file
BIN
docs/manual/bc_s.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 676 B |
BIN
docs/manual/bdwn.png
Normal file
BIN
docs/manual/bdwn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 147 B |
115
docs/manual/classas_i_binary_stream-members.html
Normal file
115
docs/manual/classas_i_binary_stream-members.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_binary_stream.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIBinaryStream Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">Read</a>(void *ptr, asUINT size)=0</td><td class="entry"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">Write</a>(const void *ptr, asUINT size)=0</td><td class="entry"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
224
docs/manual/classas_i_binary_stream.html
Normal file
224
docs/manual/classas_i_binary_stream.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: asIBinaryStream Class Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_binary_stream.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="classas_i_binary_stream-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asIBinaryStream Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__auxiliary__interfaces.html">Auxiliary interfaces</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>A binary stream interface.
|
||||
<a href="classas_i_binary_stream.html#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a8bbd68cea1f96b42c723f9732ac19140"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">Read</a> (void *ptr, <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> size)=0</td></tr>
|
||||
<tr class="memdesc:a8bbd68cea1f96b42c723f9732ac19140"><td class="mdescLeft"> </td><td class="mdescRight">Read size bytes from the stream into the memory pointed to by ptr. <a href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">More...</a><br /></td></tr>
|
||||
<tr class="separator:a8bbd68cea1f96b42c723f9732ac19140"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a57724f9cd63a625a843bf97e7704d9a7"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">Write</a> (const void *ptr, <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> size)=0</td></tr>
|
||||
<tr class="memdesc:a57724f9cd63a625a843bf97e7704d9a7"><td class="mdescLeft"> </td><td class="mdescRight">Write size bytes to the stream from the memory pointed to by ptr. <a href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">More...</a><br /></td></tr>
|
||||
<tr class="separator:a57724f9cd63a625a843bf97e7704d9a7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>This interface is used when storing compiled bytecode to disk or memory, and then loading it into the engine again.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classas_i_script_module.html#ac6cd95dd97cc6abf28ab4d82257f5aeb">asIScriptModule::SaveByteCode</a>, <a class="el" href="classas_i_script_module.html#a8b4a222e5309c6b367f136b6d2f664ba">asIScriptModule::LoadByteCode</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a8bbd68cea1f96b42c723f9732ac19140"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8bbd68cea1f96b42c723f9732ac19140">◆ </a></span>Read()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIBinaryStream::Read </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"><em>ptr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>size</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">ptr</td><td>A pointer to the buffer that will receive the data. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The number of bytes to read. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
|
||||
<p>Read <em>size</em> bytes from the data stream into the memory pointed to by <em>ptr</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a57724f9cd63a625a843bf97e7704d9a7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a57724f9cd63a625a843bf97e7704d9a7">◆ </a></span>Write()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIBinaryStream::Write </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const void * </td>
|
||||
<td class="paramname"><em>ptr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>size</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>A pointer to the buffer that the data should written from. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The number of bytes to write. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
|
||||
<p>Write <em>size</em> bytes to the data stream from the memory pointed to by <em>ptr</em>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
115
docs/manual/classas_i_j_i_t_compiler-members.html
Normal file
115
docs/manual/classas_i_j_i_t_compiler-members.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_j_i_t_compiler.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIJITCompiler Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_j_i_t_compiler.html#aa6270727e61d8708d651a0f5faada695">CompileFunction</a>(asIScriptFunction *function, asJITFunction *output)=0</td><td class="entry"><a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_j_i_t_compiler.html#afbf9390868269c9224df85d49aabd451">ReleaseJITFunction</a>(asJITFunction func)=0</td><td class="entry"><a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
211
docs/manual/classas_i_j_i_t_compiler.html
Normal file
211
docs/manual/classas_i_j_i_t_compiler.html
Normal file
@@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: asIJITCompiler Class Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_j_i_t_compiler.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="classas_i_j_i_t_compiler-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asIJITCompiler Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__auxiliary__interfaces.html">Auxiliary interfaces</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The interface that AS use to interact with the JIT compiler.
|
||||
<a href="classas_i_j_i_t_compiler.html#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:aa6270727e61d8708d651a0f5faada695"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_j_i_t_compiler.html#aa6270727e61d8708d651a0f5faada695">CompileFunction</a> (<a class="el" href="classas_i_script_function.html">asIScriptFunction</a> *function, <a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a> *output)=0</td></tr>
|
||||
<tr class="memdesc:aa6270727e61d8708d651a0f5faada695"><td class="mdescLeft"> </td><td class="mdescRight">Called by AngelScript to begin the compilation. <a href="classas_i_j_i_t_compiler.html#aa6270727e61d8708d651a0f5faada695">More...</a><br /></td></tr>
|
||||
<tr class="separator:aa6270727e61d8708d651a0f5faada695"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:afbf9390868269c9224df85d49aabd451"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_j_i_t_compiler.html#afbf9390868269c9224df85d49aabd451">ReleaseJITFunction</a> (<a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a> func)=0</td></tr>
|
||||
<tr class="memdesc:afbf9390868269c9224df85d49aabd451"><td class="mdescLeft"> </td><td class="mdescRight">Called by AngelScript when the JIT function is released. <a href="classas_i_j_i_t_compiler.html#afbf9390868269c9224df85d49aabd451">More...</a><br /></td></tr>
|
||||
<tr class="separator:afbf9390868269c9224df85d49aabd451"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>This is the minimal interface that the JIT compiler must implement so that AngelScript can request the compilation of the script functions.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_jit.html">How to build a JIT compiler</a> </dd></dl>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="aa6270727e61d8708d651a0f5faada695"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa6270727e61d8708d651a0f5faada695">◆ </a></span>CompileFunction()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIJITCompiler::CompileFunction </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a> * </td>
|
||||
<td class="paramname"><em>function</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a> * </td>
|
||||
<td class="paramname"><em>output</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">function</td><td>A pointer to the script function </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>The JIT compiled function </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
|
||||
<p>AngelScript will call this function to request the compilation of a script function. The JIT compiler should produce the native machine code representation of the function and update the JitEntry instructions in the byte code to allow the VM to transfer the control to the JIT compiled function. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="afbf9390868269c9224df85d49aabd451"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#afbf9390868269c9224df85d49aabd451">◆ </a></span>ReleaseJITFunction()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void asIJITCompiler::ReleaseJITFunction </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a> </td>
|
||||
<td class="paramname"><em>func</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">func</td><td>Pointer to the JIT function </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
119
docs/manual/classas_i_lockable_shared_bool-members.html
Normal file
119
docs/manual/classas_i_lockable_shared_bool-members.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_lockable_shared_bool.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asILockableSharedBool Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#a1183742552ce6b952cc3742bd456d787">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#abab39fc60f00ae8941423258ffc2c3c6">Get</a>() const =0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#aef12cc309395d682aa138da5eea9d82b">Lock</a>() const =0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#a1dae71f6f1141b5b16520232a9ea5fb2">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#aa29488ac2f1c38788d5e79545fdfc8c7">Set</a>(bool val)=0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html#a863984c1b271df84f71fb5ba978ce2b8">Unlock</a>() const =0</td><td class="entry"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
308
docs/manual/classas_i_lockable_shared_bool.html
Normal file
308
docs/manual/classas_i_lockable_shared_bool.html
Normal file
@@ -0,0 +1,308 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: asILockableSharedBool Class Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_lockable_shared_bool.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="classas_i_lockable_shared_bool-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asILockableSharedBool Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__auxiliary__interfaces.html">Auxiliary interfaces</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>A lockable shared boolean.
|
||||
<a href="classas_i_lockable_shared_bool.html#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a1183742552ce6b952cc3742bd456d787"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#a1183742552ce6b952cc3742bd456d787">AddRef</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a1183742552ce6b952cc3742bd456d787"><td class="mdescLeft"> </td><td class="mdescRight">Adds a reference to the shared boolean. <a href="classas_i_lockable_shared_bool.html#a1183742552ce6b952cc3742bd456d787">More...</a><br /></td></tr>
|
||||
<tr class="separator:a1183742552ce6b952cc3742bd456d787"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1dae71f6f1141b5b16520232a9ea5fb2"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#a1dae71f6f1141b5b16520232a9ea5fb2">Release</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a1dae71f6f1141b5b16520232a9ea5fb2"><td class="mdescLeft"> </td><td class="mdescRight">Releases a reference to the shared boolean. <a href="classas_i_lockable_shared_bool.html#a1dae71f6f1141b5b16520232a9ea5fb2">More...</a><br /></td></tr>
|
||||
<tr class="separator:a1dae71f6f1141b5b16520232a9ea5fb2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abab39fc60f00ae8941423258ffc2c3c6"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#abab39fc60f00ae8941423258ffc2c3c6">Get</a> () const =0</td></tr>
|
||||
<tr class="memdesc:abab39fc60f00ae8941423258ffc2c3c6"><td class="mdescLeft"> </td><td class="mdescRight">Get the value of the shared boolean. <a href="classas_i_lockable_shared_bool.html#abab39fc60f00ae8941423258ffc2c3c6">More...</a><br /></td></tr>
|
||||
<tr class="separator:abab39fc60f00ae8941423258ffc2c3c6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa29488ac2f1c38788d5e79545fdfc8c7"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#aa29488ac2f1c38788d5e79545fdfc8c7">Set</a> (bool val)=0</td></tr>
|
||||
<tr class="memdesc:aa29488ac2f1c38788d5e79545fdfc8c7"><td class="mdescLeft"> </td><td class="mdescRight">Sets the value of the shared boolean. <a href="classas_i_lockable_shared_bool.html#aa29488ac2f1c38788d5e79545fdfc8c7">More...</a><br /></td></tr>
|
||||
<tr class="separator:aa29488ac2f1c38788d5e79545fdfc8c7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aef12cc309395d682aa138da5eea9d82b"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#aef12cc309395d682aa138da5eea9d82b">Lock</a> () const =0</td></tr>
|
||||
<tr class="memdesc:aef12cc309395d682aa138da5eea9d82b"><td class="mdescLeft"> </td><td class="mdescRight">Locks the shared boolean. <a href="classas_i_lockable_shared_bool.html#aef12cc309395d682aa138da5eea9d82b">More...</a><br /></td></tr>
|
||||
<tr class="separator:aef12cc309395d682aa138da5eea9d82b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a863984c1b271df84f71fb5ba978ce2b8"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_lockable_shared_bool.html#a863984c1b271df84f71fb5ba978ce2b8">Unlock</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a863984c1b271df84f71fb5ba978ce2b8"><td class="mdescLeft"> </td><td class="mdescRight">Unlocks the shared boolean. <a href="classas_i_lockable_shared_bool.html#a863984c1b271df84f71fb5ba978ce2b8">More...</a><br /></td></tr>
|
||||
<tr class="separator:a863984c1b271df84f71fb5ba978ce2b8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>This interface represents a lockable shared boolean. </p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a1183742552ce6b952cc3742bd456d787"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1183742552ce6b952cc3742bd456d787">◆ </a></span>AddRef()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asILockableSharedBool::AddRef </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The new reference count </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="abab39fc60f00ae8941423258ffc2c3c6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abab39fc60f00ae8941423258ffc2c3c6">◆ </a></span>Get()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual bool asILockableSharedBool::Get </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The value of the shared boolean </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aef12cc309395d682aa138da5eea9d82b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aef12cc309395d682aa138da5eea9d82b">◆ </a></span>Lock()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void asILockableSharedBool::Lock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>If the boolean is already locked, then this method will wait until it is unlocked before returning.</p>
|
||||
<p>Unlock the shared boolean with a call to <a class="el" href="classas_i_lockable_shared_bool.html#a863984c1b271df84f71fb5ba978ce2b8">Unlock</a> </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1dae71f6f1141b5b16520232a9ea5fb2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1dae71f6f1141b5b16520232a9ea5fb2">◆ </a></span>Release()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asILockableSharedBool::Release </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The new reference count </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa29488ac2f1c38788d5e79545fdfc8c7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa29488ac2f1c38788d5e79545fdfc8c7">◆ </a></span>Set()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void asILockableSharedBool::Set </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">bool </td>
|
||||
<td class="paramname"><em>val</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>The new value </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a863984c1b271df84f71fb5ba978ce2b8"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a863984c1b271df84f71fb5ba978ce2b8">◆ </a></span>Unlock()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void asILockableSharedBool::Unlock </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Unlock the shared boolean after a call to <a class="el" href="classas_i_lockable_shared_bool.html#aef12cc309395d682aa138da5eea9d82b">Lock</a> </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
168
docs/manual/classas_i_script_context-members.html
Normal file
168
docs/manual/classas_i_script_context-members.html
Normal file
@@ -0,0 +1,168 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_context.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptContext Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_context.html">asIScriptContext</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a374befd21b8c14de81ef0ed9d2dea334">Abort</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a5e24f4cb5773f732a1d46b818d963a1d">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#acb5cfe5703031fd76672a57d8afae547">ClearExceptionCallback</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a3771cf314de339fa5d70edfbfcd88370">ClearLineCallback</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a0fbab94982862b30cd55996d4a24949c">GetAddressOfArg</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a889bf11123beba669637849c8e9b2b86">GetAddressOfReturnValue</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#acc916505d79de321a2ab2b46b1c61fb7">GetAddressOfVar</a>(asUINT varIndex, asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#aab359abc4563a8439338bfd655824bd7">GetCallstackSize</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a8e59aceec42080d29e08b44460ceb8b3">GetExceptionFunction</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a22e3c351fe6b13ba0a62010dfc305080">GetExceptionLineNumber</a>(int *column=0, const char **sectionName=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a46e2411bc84e99f57e7d9fe2374bb479">GetExceptionString</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a1c101300447f2909e5d188409a7180f6">GetFunction</a>(asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#adf82981def59c6ec5dd9f74f034be2af">GetLineNumber</a>(asUINT stackLevel=0, int *column=0, const char **sectionName=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a2438a7fcf46faa2267bdb94057cd1f2e">GetReturnAddress</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a4c92259c03f1394310d3ea7d0774b3cb">GetReturnByte</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a7e1ce03637cd5dd48ea652fdf7913bd7">GetReturnDouble</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a43cd2fb72685aef96e8ddc622c9621bf">GetReturnDWord</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a4ad325995e43fe6a929bcbd8fa592500">GetReturnFloat</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a6d5739fac9c90bcd0fea55d01841d43a">GetReturnObject</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a22bdd3b67dee3b1dbcb3f9f9a1f21fa4">GetReturnQWord</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a5a3e054d35a6a361af67448d0a4930f9">GetReturnWord</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a17024a9e1648f66711a3182b21676aa7">GetState</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a214cc16c4dd889072c1c24c089223a6a">GetSystemFunction</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a4f6761a7a0c872dda681d8e180830ff9">GetThisPointer</a>(asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a404681f8950c1ebd9382d30ef1ed3b89">GetThisTypeId</a>(asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a0f8503675abfd473915d66a92c6e6df7">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a3d735c6c7c5a166302cc4ba8ea38e3e8">GetVarCount</a>(asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#ae3419d239a51d702870b1ab8ee1b7140">GetVarDeclaration</a>(asUINT varIndex, asUINT stackLevel=0, bool includeNamespace=false)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#aac398eb23d9f17fcbeaa3f3809f8923d">GetVarName</a>(asUINT varIndex, asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a8684e1931e54dbfe53da763fc334413d">GetVarTypeId</a>(asUINT varIndex, asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a378f3bbfa04ef7b806300c5d4f1a0d65">IsNested</a>(asUINT *nestCount=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a45fcf7d8d711d5ec5cb9927e7839387a">IsVarInScope</a>(asUINT varIndex, asUINT stackLevel=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a5d963974625e582799b5d911d182d9be">PopState</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">Prepare</a>(asIScriptFunction *func)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#ad8f7637a23d67e227d07f65621b6cdd6">PushState</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a1b13a5f3e58627e9ff4300c0c6f0f3cf">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#aa8de8f21dfbb2cdf0becbabaa3e883ed">SetArgAddress</a>(asUINT arg, void *addr)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#ac5ac8ce5bb209f43d4da620db5d271da">SetArgByte</a>(asUINT arg, asBYTE value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#acbdddda3b80c37b70b8fd35c8e7383b9">SetArgDouble</a>(asUINT arg, double value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a14cac831c1b419f552ca62a239dfcf45">SetArgDWord</a>(asUINT arg, asDWORD value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a702a40cfe539e4e655a84e15161f8db8">SetArgFloat</a>(asUINT arg, float value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a09044a12dfb2d44d19bd8a4025cb814d">SetArgObject</a>(asUINT arg, void *obj)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a742c870360588e99528f09bae6156482">SetArgQWord</a>(asUINT arg, asQWORD value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a626d97ec564c92120e2abaf69f6e3698">SetArgVarType</a>(asUINT arg, void *ptr, int typeId)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#ac882e19b922c681052a0a88d69289a47">SetArgWord</a>(asUINT arg, asWORD value)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">SetException</a>(const char *info, bool allowCatch=true)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a4d1f481473df3f7aefccc5bb6904e405">SetExceptionCallback</a>(asSFuncPtr callback, void *obj, int callConv)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">SetLineCallback</a>(asSFuncPtr callback, void *obj, int callConv)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a10d3c152b25d07584999f4d9fe5ce8b1">SetObject</a>(void *obj)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#a263dc70abb2a8c77adcea7c9ede0a479">SetUserData</a>(void *data, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_context.html#ae3c18a2cc66c56f840e6ee4310287f65">Unprepare</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_context.html#a57cfcc729b214fdaacb1358e03daf610">WillExceptionBeCaught</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_context.html">asIScriptContext</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
2417
docs/manual/classas_i_script_context.html
Normal file
2417
docs/manual/classas_i_script_context.html
Normal file
File diff suppressed because it is too large
Load Diff
202
docs/manual/classas_i_script_engine-members.html
Normal file
202
docs/manual/classas_i_script_engine-members.html
Normal file
@@ -0,0 +1,202 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_engine.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptEngine Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aa95a5d9b5d9e7e6a230fedf056eaf8ce">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ade1d309876c876c733d437a53e708c28">AddRefScriptObject</a>(void *obj, const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a9180da5fd475f52916be6b39e522fabb">AssignScriptObject</a>(void *dstObj, void *srcObj, const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ac81014e50dd7efc1920adcb3fd2d1e5d">BeginConfigGroup</a>(const char *groupName)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ada64567fc9621e5e98160c7f03efa064">ClearMessageCallback</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">CreateContext</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ab4a4cea1cfeea361b8a44d80f3d928e3">CreateDelegate</a>(asIScriptFunction *func, void *obj)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a3101479b4340bc16bb9acb8e8d554266">CreateScriptObject</a>(const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ab2b1543ea6d24b912aebeb77e6764269">CreateScriptObjectCopy</a>(void *obj, const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a9de3c5e4465f699ad698740d6037e1a6">CreateUninitializedScriptObject</a>(const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#afb0ce55e5846eb18afdcf906aeb67cf7">DiscardModule</a>(const char *module)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a4cc5ed7ea71811655f7910d298bb5a02">EndConfigGroup</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#abe95ce0e45d914fec478fa112a7bb8dd">ForwardGCEnumReferences</a>(void *ref, asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a60cdec608a18f6ebc0aebe29a143183f">ForwardGCReleaseReferences</a>(void *ref, asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a17511a1de72ecdb836b974768f2ec422">GarbageCollect</a>(asDWORD flags=asGC_FULL_CYCLE, asUINT numIterations=1)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a58ceeafd780dea3543e0ede4106199fd">GCEnumCallback</a>(void *reference)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ae86e5444979b0abd92777be83c53fc80">GetDefaultArrayTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a257a25e285faa25e8cf08e455528def7">GetDefaultNamespace</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a5531bf5310a0c933aa698725a6828e5f">GetEngineProperty</a>(asEEngineProp property) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#adedc8b2ad11a84ec12aef4f98e27a4c4">GetEnumByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a4b4307dab64061be43db84ffb97e3782">GetEnumCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ad4228220347347384c0aa0e0dd8308c6">GetFuncdefByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a48aceb1556f88ce3bec3e0f84abe127f">GetFuncdefCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#aaf67dc0b1f26be437ccbcc0ac5f330c9">GetFunctionById</a>(int funcId) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a166e6cdd0cb35bcfd942824d8e882783">GetGCStatistics</a>(asUINT *currentSize, asUINT *totalDestroyed=0, asUINT *totalDetected=0, asUINT *newObjects=0, asUINT *totalNewDestroyed=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a42edd02e95731c795e13706400e8665a">GetGlobalFunctionByDecl</a>(const char *declaration) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aaf2b79cef75adb4099a24e3412e4ea79">GetGlobalFunctionByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a72aa1a3a5ac88a5a1dba4fa3655141d6">GetGlobalFunctionCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a93bd686853a48647d2136792e27380fb">GetGlobalPropertyByIndex</a>(asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0, const char **configGroup=0, void **pointer=0, asDWORD *accessMask=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#aa69f6b37f9c7bdf9b52b9c1692daf048">GetGlobalPropertyCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a91a4cc8af51ca439ca82b9b6630439b3">GetGlobalPropertyIndexByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a07e85878869e4d0597c1177d767dc717">GetGlobalPropertyIndexByName</a>(const char *name) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a2fb6db9085df3c7d487c0d58de76bb83">GetJITCompiler</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a31b95df21e6f1990cf84b3b286067675">GetModuleByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a457cf6202cc64ce8ee242dcc97d3422f">GetModuleCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a39a5f221baa01d43e7471c0e9f5378e4">GetObjectInGC</a>(asUINT idx, asUINT *seqNbr=0, void **obj=0, asITypeInfo **type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#afac08d4f81e587031c7863574c6783ba">GetObjectTypeByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ac2667fbe30dd00ed14bc14e6ef7fc725">GetObjectTypeCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a39b7207a6c4c55a5cbf10eab2ccfb8e6">GetSizeOfPrimitiveType</a>(int typeId) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#afb3935d85494231e2f02af5816ba9830">GetStringFactoryReturnTypeId</a>(asDWORD *flags=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a3ae23fcde6af0d816ff97097cd443281">GetTypeDeclaration</a>(int typeId, bool includeNamespace=false) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a635cd008ea123b510c66fbddcea735f5">GetTypedefByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a0ebbbb86ea0e314cc2695f6276ebe507">GetTypedefCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ad1f6fecb0f53fd7966736b01f65c3dcb">GetTypeIdByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ab00808f9b762c4badf508ed511789d1b">GetTypeInfoByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a55cc2d9592651538efcf79eb8106a867">GetTypeInfoById</a>(int typeId) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#aea2583b8aa724779b7c37df8b7fa437b">GetTypeInfoByName</a>(const char *name) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a701aa6a7ddf51a22c62281f3dec9a772">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ab31103bef62096445fe03632de691827">GetWeakRefFlagOfScriptObject</a>(void *obj, const asITypeInfo *type) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a52a7644b48cbc771e33db5070814f6df">NotifyGarbageCollectorOfNewObject</a>(void *obj, asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a57ecbd86ae9370684877c755e83cef0d">ParseToken</a>(const char *string, size_t stringLength=0, asUINT *tokenLength=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a32c9d9aac77a67eeb046fc67d7473fa2">RefCastObject</a>(void *obj, asITypeInfo *fromType, asITypeInfo *toType, void **newPtr, bool useOnlyImplicitCast=false)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ac9451feece1297eba8d1649036039e82">RegisterDefaultArrayType</a>(const char *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#abed6e77f2a532c8a4f528650fa137d37">RegisterEnum</a>(const char *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a4d331153596dd39838f3bed2a861af18">RegisterEnumValue</a>(const char *type, const char *name, int value)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a03c1a2cc23ae4b742c927f3472a1a4f7">RegisterFuncdef</a>(const char *decl)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aacd32f32b2922b8ffaed204812013169">RegisterGlobalProperty</a>(const char *declaration, void *pointer)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ae2d89b82561b7f9843f35693c664589f">RegisterInterface</a>(const char *name)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a43bd2c12c94a55c22be76d209de93f1a">RegisterInterfaceMethod</a>(const char *intf, const char *declaration)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">RegisterObjectProperty</a>(const char *obj, const char *declaration, int byteOffset, int compositeOffset=0, bool isCompositeIndirect=false)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(const char *obj, int byteSize, asDWORD flags)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ac6598c07c36652b0270b4c2d61db1f01">RegisterStringFactory</a>(const char *datatype, asIStringFactory *factory)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#addb24466769dc52be96c7e37d5305245">RegisterTypedef</a>(const char *type, const char *decl)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#aae91a45da75af9234b87e825b5c08b81">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a82873d3769ded547894a7c3d52c220fd">ReleaseScriptObject</a>(void *obj, const asITypeInfo *type)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ab607be7fe727cdcce502d2beedbf4c0a">RemoveConfigGroup</a>(const char *groupName)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a32391ee83e58083b406ba068ab2ee049">RequestContext</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a22e42bf32902cbd6885731a6beeaca20">ReturnContext</a>(asIScriptContext *ctx)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aac3d5b7c9920b4f98405a19e515ceb26">SetCircularRefDetectedCallback</a>(asCIRCULARREFFUNC_t callback, void *param=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ae5ba9fe99b72c60392cdaeef164f2c65">SetContextCallbacks</a>(asREQUESTCONTEXTFUNC_t requestCtx, asRETURNCONTEXTFUNC_t returnCtx, void *param=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#acaced7eb9ebe013ede23f7593daf58e3">SetContextUserDataCleanupCallback</a>(asCLEANCONTEXTFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a570df3e676f2d9e03e87d97b8cede1c7">SetDefaultAccessMask</a>(asDWORD defaultMask)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a605f114814f1f64804c04391816d948b">SetDefaultNamespace</a>(const char *nameSpace)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a1bce4e5f573a2ca0ff55163e28f761dd">SetEngineProperty</a>(asEEngineProp property, asPWORD value)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a8fa4fc9aacb99db6d4be0a5542b85e35">SetEngineUserDataCleanupCallback</a>(asCLEANENGINEFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#ae75ee087fe6608cf0af1c24794ca73c7">SetFunctionUserDataCleanupCallback</a>(asCLEANFUNCTIONFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aee4f910163604203a27db1ffea3b1c9c">SetJITCompiler</a>(asIJITCompiler *compiler)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a74192fe950808eb72a64e3e371f0ea02">SetMessageCallback</a>(const asSFuncPtr &callback, void *obj, asDWORD callConv)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a7523853b9a9bf7dab603fa6a06393d51">SetModuleUserDataCleanupCallback</a>(asCLEANMODULEFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a4654e2cae0690c50e19b177f1ec54592">SetScriptObjectUserDataCleanupCallback</a>(asCLEANSCRIPTOBJECTFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#addce6a202934a4918f7776b2f77c43fd">SetTranslateAppExceptionCallback</a>(asSFuncPtr callback, void *param, int callConv)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#afa31e7c28c63a2c876d8e08305cf5d75">SetTypeInfoUserDataCleanupCallback</a>(asCLEANTYPEINFOFUNC_t callback, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#aabee8d6ef426c434adee85ec6d57f940">SetUserData</a>(void *data, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_engine.html#a28c3800620d4aeaca75d084391eb758e">ShutDownAndRelease</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_engine.html#a936ce6566af958bb75ba1c0945d8b03a">WriteMessage</a>(const char *section, int row, int col, asEMsgType type, const char *message)=0</td><td class="entry"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
4344
docs/manual/classas_i_script_engine.html
Normal file
4344
docs/manual/classas_i_script_engine.html
Normal file
File diff suppressed because it is too large
Load Diff
152
docs/manual/classas_i_script_function-members.html
Normal file
152
docs/manual/classas_i_script_function-members.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_function.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptFunction Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_function.html">asIScriptFunction</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a0a00f9581e7ece5f2a536d0e22c10d0c">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a30dc23991856a13f59e682b3b1498e2f">FindNextLineWithCode</a>(int line) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a5c49841eb92a0993a16eb855577b590c">GetAccessMask</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#acbdd97f1c3658cb4f82a154591e100f6">GetAuxiliary</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#afb38e9ba77ce8b49378e43dadd83ef94">GetByteCode</a>(asUINT *length=0)=0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#afea841f0923573cea81467ac90b71996">GetConfigGroup</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a2fb021b09ae0e7e87f8fa4fdfd39df83">GetDeclaration</a>(bool includeObjectName=true, bool includeNamespace=false, bool includeParamNames=false) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#aa28f4e68da8abb770d7f725375bcd2bb">GetDelegateFunction</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#ae1786c3f4341dc3bfcaacc3cb8900a57">GetDelegateObject</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#ad79461f80fcffd513b43564d75cc5360">GetDelegateObjectType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a7a0ef04f035d1809fb8b7702134afd06">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#aa4d06c7d590e7eb4df280a8224f4499c">GetFuncType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a7aca255486dd77b8846f545495128cac">GetId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a5c3477dd6b634e6b6ca3d5b97f6d5b30">GetModule</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#af03c30e4764f81c01400d7f77a8d0832">GetModuleName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a96cf134f1369f312aa182de5006f8b71">GetName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#ab692c00b9a7111778acb4fbca1c63df7">GetNamespace</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a69e30464d13867fb72e66ce3365fdec8">GetObjectName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#af930b362c37e5c4c117485d0bd4a34fb">GetObjectType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a2b3000b9fc5d3f2cfeea490d8c0c062a">GetParam</a>(asUINT index, int *typeId, asDWORD *flags=0, const char **name=0, const char **defaultArg=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a8ca059886317b944c52933b7bbe85cfa">GetParamCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a18968d49065c6af9833ee589b6d1e864">GetReturnTypeId</a>(asDWORD *flags=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a62a77c029782162135d98d6e2b383eca">GetScriptSectionName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a4a5e24c464e423a2a6724cb849babd21">GetTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a0d0d4671e524fcd868a34bee33ee9fde">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#aaf11dde60bec710bcd729127bfe12dd4">GetVar</a>(asUINT index, const char **name, int *typeId=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a92e14168997c0f67a975e7ed042d8328">GetVarCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#acef067f00f2a6a997d6955f5cf3c6d13">GetVarDecl</a>(asUINT index, bool includeNamespace=false) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a76715df2843cb37cc010fc3a5d999e84">IsCompatibleWithTypeId</a>(int typeId) const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#aea24c6ba2ab0fcc5c42a734f72856814">IsExplicit</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#aa071c702946372020a1245f901502d52">IsFinal</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a5aec17ae5639fb9cad403c835d429f6e">IsOverride</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a7ef1f42ff812a03e2a323046835159fb">IsPrivate</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#ad6ecdae3667ebef1fc867e884504078c">IsProperty</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a2e17b763527ba3a9b0d05c4cd35b5742">IsProtected</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a99bbe26ae0ec3f0cc09070bf89aff2f9">IsReadOnly</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a805ae8064598ad12f44bb583118b6cc5">IsShared</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_function.html#a0a98f1f7f91574a11d7d8c5062bdcdee">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_function.html#a9dd036ce8e91d335eb5a3ad8851f1a41">SetUserData</a>(void *userData, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1441
docs/manual/classas_i_script_function.html
Normal file
1441
docs/manual/classas_i_script_function.html
Normal file
File diff suppressed because it is too large
Load Diff
139
docs/manual/classas_i_script_generic-members.html
Normal file
139
docs/manual/classas_i_script_generic-members.html
Normal file
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_generic.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptGeneric Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a08f922bc97867e1e97e923a5bdee4dbc">GetAddressOfArg</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a103a91f081ec894a116cd3db06b0d8d1">GetAddressOfReturnLocation</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#ac5c73473ccefe029582c5e3793d1a41b">GetArgAddress</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a20f30e6ed55ed952bcb5c70096eb83dd">GetArgByte</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#aafdaf0ed1ff5023b2aaf4ae1adfa3714">GetArgCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#ad0bb07a940b7ba08abc3ce114dca99fc">GetArgDouble</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#aab74bcbe4be32fc423b21b75a3f4d57a">GetArgDWord</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a487a68e409d79e61fcc624337c4ac991">GetArgFloat</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a6732b01132cd58e81cd0354ac274039a">GetArgObject</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a0fbd6ce45aebc29e29a64dac4affc111">GetArgQWord</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a2bdce6872b371355665e932a962548cb">GetArgTypeId</a>(asUINT arg, asDWORD *flags=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#afdb602c3c2e285c5f34bc477ebbd1534">GetArgWord</a>(asUINT arg)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#adf0ec41b9df5c93d72a950c78f6fea8e">GetAuxiliary</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a3f3b0838588e3afa7172f9bbb87f5445">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#acf00e806a36e0b42686c0f8df25b0898">GetFunction</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#ab9e6627ec3920b1e1576d82586cac84d">GetObject</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a3de95071fa358d554137cae88a5229ea">GetObjectTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a9da6f7f81392cd25733ebc6c803a397a">GetReturnTypeId</a>(asDWORD *flags=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#afd8ead96f17d6e77f3a26c70c3a1d80c">SetReturnAddress</a>(void *addr)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a81c42965dfccfd242e955f50b02a641c">SetReturnByte</a>(asBYTE val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a8a720ef33859981dd941c616b2c83cad">SetReturnDouble</a>(double val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a3260e1f3b76791713bced9af0b81bdbc">SetReturnDWord</a>(asDWORD val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#acc2fddd4175ad35854cec8f5c38a6495">SetReturnFloat</a>(float val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a94c9ca32722cb44b09211e51fa906e6e">SetReturnObject</a>(void *obj)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_generic.html#a25f5ec30c666ffbb51edeedfd4c89546">SetReturnQWord</a>(asQWORD val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_generic.html#a9c51e3ff3f4fb37f6b4c82a050319955">SetReturnWord</a>(asWORD val)=0</td><td class="entry"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1082
docs/manual/classas_i_script_generic.html
Normal file
1082
docs/manual/classas_i_script_generic.html
Normal file
File diff suppressed because it is too large
Load Diff
158
docs/manual/classas_i_script_module-members.html
Normal file
158
docs/manual/classas_i_script_module-members.html
Normal file
@@ -0,0 +1,158 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_module.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptModule Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_module.html">asIScriptModule</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a330835919b565c76c25e9425536f50b7">AddScriptSection</a>(const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a3f0c215576adefd922c2cc95d16b55d8">BindAllImportedFunctions</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#ab24a8b95ce887c3f731eb906e3b518e5">BindImportedFunction</a>(asUINT importIndex, asIScriptFunction *func)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a1258d7cfeed965f36ba312beeb49e81c">CompileFunction</a>(const char *sectionName, const char *code, int lineOffset, asDWORD compileFlags, asIScriptFunction **outFunc)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a34850e152dcdcb58c53a2b6929cebf77">CompileGlobalVar</a>(const char *sectionName, const char *code, int lineOffset)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a0e6a69be59f16c8b51d1e21d3905d95c">Discard</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a0998d375ca1de02bc72f4544806da58c">GetAddressOfGlobalVar</a>(asUINT index)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#aa1aa775a81fc2bbf84ff2b07fd9561e3">GetDefaultNamespace</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#aef861826f4d09fd411aee7792854bfb8">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a0ec42bef3874f0fc0e6b929068ae927c">GetEnumByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a1a241b3dfd47f7ab5bb475c757e38df9">GetEnumCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#afd4d9951ee006caa8ec1bab3d3d206fc">GetFunctionByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">GetFunctionByName</a>(const char *name) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a373d102f109ae0fa20584f243ead4035">GetFunctionCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a939e6caf004c6fdae78fe89bb244d962">GetGlobalVar</a>(asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a87e29773f7e6f2980d75288faaa74d02">GetGlobalVarCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#aebe27735e0ce4c06bf79b2b4282192cd">GetGlobalVarDeclaration</a>(asUINT index, bool includeNamespace=false) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#ac3d5dafe8ca92bf618f438dc79ef2906">GetGlobalVarIndexByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a00cff95b43c256cc6b9062e135a473a2">GetGlobalVarIndexByName</a>(const char *name) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a12273a6a6dd9bd39ca9675bcd84b0cc7">GetImportedFunctionCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a20e46ad7ea467f98bbf35ee052b86868">GetImportedFunctionDeclaration</a>(asUINT importIndex) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a6de1053c8317e7134e7e59e4527339f6">GetImportedFunctionIndexByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#adc01b24a82ad14356f2edc082af4c146">GetImportedFunctionSourceModule</a>(asUINT importIndex) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a4967db3ed89836ac2f3b529c499d473d">GetName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a49ebfdd345f18d88e489edebd4888af7">GetObjectTypeByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a931d0c00cba2df1b4e368e59bac1a207">GetObjectTypeCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a6a31f0767b01cc4203212fd531576de4">GetTypedefByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#ad30b22539655df3135f29ce28b89c820">GetTypedefCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a7fbc2bd888b248d2c2ee2d953b49eefc">GetTypeIdByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a3c61bf81a0a88c0017a0e33aecc417ba">GetTypeInfoByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#ae8460fa05f441072e14f984ccf507396">GetTypeInfoByName</a>(const char *name) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#af292f99799d8358277298f749efedaaa">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a8b4a222e5309c6b367f136b6d2f664ba">LoadByteCode</a>(asIBinaryStream *in, bool *wasDebugInfoStripped=0)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a54b6f8e09787ad20880f73bc97a8ef10">RemoveFunction</a>(asIScriptFunction *func)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#aac10878c3d16f18ace4db881f7a1bb11">RemoveGlobalVar</a>(asUINT index)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a7b084b6693a05616097d7059e54d983b">ResetGlobalVars</a>(asIScriptContext *ctx=0)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#ac6cd95dd97cc6abf28ab4d82257f5aeb">SaveByteCode</a>(asIBinaryStream *out, bool stripDebugInfo=false) const =0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a76733de5a86875c4a0f021f7f92a6d12">SetAccessMask</a>(asDWORD accessMask)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a>(const char *nameSpace)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#a1a7534bace9eefdc3175a1999f9cbf4a">SetName</a>(const char *name)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a06582e57e7101df4157ee36c81867c13">SetUserData</a>(void *data, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_module.html#ab7b4c4b94190779028776fd1057a658f">UnbindAllImportedFunctions</a>()=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_module.html#a4d59b4e833bf139f6b7256d6b6bd40b6">UnbindImportedFunction</a>(asUINT importIndex)=0</td><td class="entry"><a class="el" href="classas_i_script_module.html">asIScriptModule</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
2022
docs/manual/classas_i_script_module.html
Normal file
2022
docs/manual/classas_i_script_module.html
Normal file
File diff suppressed because it is too large
Load Diff
126
docs/manual/classas_i_script_object-members.html
Normal file
126
docs/manual/classas_i_script_object-members.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_object.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptObject Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_script_object.html">asIScriptObject</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#a3e08890e31163e4d33c0f27dc9072662">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#ab83919a23c02ec07c66d9aedcbecf261">CopyFrom</a>(const asIScriptObject *other)=0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#a6a8a3c7d1e103e43923614b719e3cb3a">GetAddressOfProperty</a>(asUINT prop)=0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#a5dda2d380ae1580e15ddf9d95893c57a">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#aec79a2608f633a63169365d1ba79f611">GetObjectType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#a902a8e3f3b4d6d2e56b6e258febf6259">GetPropertyCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#af777076ab0d87e4995e1a343511f8a61">GetPropertyName</a>(asUINT prop) const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#a0b39e0e07b126b43d12ad1ec944a333e">GetPropertyTypeId</a>(asUINT prop) const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#a19c5ab9d8adb0f921bf0b6474d97f468">GetTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#a63e8ab74fd7552d057e23e0ce550a157">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#a9ccca7fe3453219377fc9bd190bf7903">GetWeakRefFlag</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_script_object.html#ac85cea9bca5dd3868e027285e44dd6d0">SetUserData</a>(void *data, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
581
docs/manual/classas_i_script_object.html
Normal file
581
docs/manual/classas_i_script_object.html
Normal file
@@ -0,0 +1,581 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<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"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_script_object.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="classas_i_script_object-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asIScriptObject Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__secondary__interfaces.html">Secondary interfaces</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The interface for an instance of a script object.
|
||||
</p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Memory management</div></td></tr>
|
||||
<tr class="memitem:a3e08890e31163e4d33c0f27dc9072662"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a3e08890e31163e4d33c0f27dc9072662">AddRef</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a3e08890e31163e4d33c0f27dc9072662"><td class="mdescLeft"> </td><td class="mdescRight">Increase reference counter. <a href="classas_i_script_object.html#a3e08890e31163e4d33c0f27dc9072662">More...</a><br /></td></tr>
|
||||
<tr class="separator:a3e08890e31163e4d33c0f27dc9072662"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4bed3c3ac9f16294985835747aa122d3"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">Release</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a4bed3c3ac9f16294985835747aa122d3"><td class="mdescLeft"> </td><td class="mdescRight">Decrease reference counter. <a href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">More...</a><br /></td></tr>
|
||||
<tr class="separator:a4bed3c3ac9f16294985835747aa122d3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9ccca7fe3453219377fc9bd190bf7903"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a9ccca7fe3453219377fc9bd190bf7903">GetWeakRefFlag</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a9ccca7fe3453219377fc9bd190bf7903"><td class="mdescLeft"> </td><td class="mdescRight">Returns the weak ref flag for the object. <a href="classas_i_script_object.html#a9ccca7fe3453219377fc9bd190bf7903">More...</a><br /></td></tr>
|
||||
<tr class="separator:a9ccca7fe3453219377fc9bd190bf7903"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Type info</div></td></tr>
|
||||
<tr class="memitem:a19c5ab9d8adb0f921bf0b6474d97f468"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a19c5ab9d8adb0f921bf0b6474d97f468">GetTypeId</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a19c5ab9d8adb0f921bf0b6474d97f468"><td class="mdescLeft"> </td><td class="mdescRight">Returns the type id of the object. <a href="classas_i_script_object.html#a19c5ab9d8adb0f921bf0b6474d97f468">More...</a><br /></td></tr>
|
||||
<tr class="separator:a19c5ab9d8adb0f921bf0b6474d97f468"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aec79a2608f633a63169365d1ba79f611"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#aec79a2608f633a63169365d1ba79f611">GetObjectType</a> () const =0</td></tr>
|
||||
<tr class="memdesc:aec79a2608f633a63169365d1ba79f611"><td class="mdescLeft"> </td><td class="mdescRight">Returns the object type interface for the object. <a href="classas_i_script_object.html#aec79a2608f633a63169365d1ba79f611">More...</a><br /></td></tr>
|
||||
<tr class="separator:aec79a2608f633a63169365d1ba79f611"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
|
||||
<tr class="memitem:a902a8e3f3b4d6d2e56b6e258febf6259"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a902a8e3f3b4d6d2e56b6e258febf6259">GetPropertyCount</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a902a8e3f3b4d6d2e56b6e258febf6259"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of properties that the object contains. <a href="classas_i_script_object.html#a902a8e3f3b4d6d2e56b6e258febf6259">More...</a><br /></td></tr>
|
||||
<tr class="separator:a902a8e3f3b4d6d2e56b6e258febf6259"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0b39e0e07b126b43d12ad1ec944a333e"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a0b39e0e07b126b43d12ad1ec944a333e">GetPropertyTypeId</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> prop) const =0</td></tr>
|
||||
<tr class="memdesc:a0b39e0e07b126b43d12ad1ec944a333e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the type id of the property referenced by prop. <a href="classas_i_script_object.html#a0b39e0e07b126b43d12ad1ec944a333e">More...</a><br /></td></tr>
|
||||
<tr class="separator:a0b39e0e07b126b43d12ad1ec944a333e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af777076ab0d87e4995e1a343511f8a61"><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#af777076ab0d87e4995e1a343511f8a61">GetPropertyName</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> prop) const =0</td></tr>
|
||||
<tr class="memdesc:af777076ab0d87e4995e1a343511f8a61"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of the property referenced by prop. <a href="classas_i_script_object.html#af777076ab0d87e4995e1a343511f8a61">More...</a><br /></td></tr>
|
||||
<tr class="separator:af777076ab0d87e4995e1a343511f8a61"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6a8a3c7d1e103e43923614b719e3cb3a"><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a6a8a3c7d1e103e43923614b719e3cb3a">GetAddressOfProperty</a> (<a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> prop)=0</td></tr>
|
||||
<tr class="memdesc:a6a8a3c7d1e103e43923614b719e3cb3a"><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the property referenced by prop. <a href="classas_i_script_object.html#a6a8a3c7d1e103e43923614b719e3cb3a">More...</a><br /></td></tr>
|
||||
<tr class="separator:a6a8a3c7d1e103e43923614b719e3cb3a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">Miscellaneous</div></td></tr>
|
||||
<tr class="memitem:a5dda2d380ae1580e15ddf9d95893c57a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a5dda2d380ae1580e15ddf9d95893c57a">GetEngine</a> () const =0</td></tr>
|
||||
<tr class="memdesc:a5dda2d380ae1580e15ddf9d95893c57a"><td class="mdescLeft"> </td><td class="mdescRight">Return the script engine. <a href="classas_i_script_object.html#a5dda2d380ae1580e15ddf9d95893c57a">More...</a><br /></td></tr>
|
||||
<tr class="separator:a5dda2d380ae1580e15ddf9d95893c57a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab83919a23c02ec07c66d9aedcbecf261"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#ab83919a23c02ec07c66d9aedcbecf261">CopyFrom</a> (const <a class="el" href="classas_i_script_object.html">asIScriptObject</a> *other)=0</td></tr>
|
||||
<tr class="memdesc:ab83919a23c02ec07c66d9aedcbecf261"><td class="mdescLeft"> </td><td class="mdescRight">Copies the content from another object of the same type. <a href="classas_i_script_object.html#ab83919a23c02ec07c66d9aedcbecf261">More...</a><br /></td></tr>
|
||||
<tr class="separator:ab83919a23c02ec07c66d9aedcbecf261"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr><td colspan="2"><div class="groupHeader">User data</div></td></tr>
|
||||
<tr class="memitem:ac85cea9bca5dd3868e027285e44dd6d0"><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#ac85cea9bca5dd3868e027285e44dd6d0">SetUserData</a> (void *data, <a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> type=0)=0</td></tr>
|
||||
<tr class="memdesc:ac85cea9bca5dd3868e027285e44dd6d0"><td class="mdescLeft"> </td><td class="mdescRight">Sets user data on the script object instance. <a href="classas_i_script_object.html#ac85cea9bca5dd3868e027285e44dd6d0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ac85cea9bca5dd3868e027285e44dd6d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a63e8ab74fd7552d057e23e0ce550a157"><td class="memItemLeft" align="right" valign="top">virtual void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_script_object.html#a63e8ab74fd7552d057e23e0ce550a157">GetUserData</a> (<a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> type=0) const =0</td></tr>
|
||||
<tr class="memdesc:a63e8ab74fd7552d057e23e0ce550a157"><td class="mdescLeft"> </td><td class="mdescRight">Gets user data from the script object instance. <a href="classas_i_script_object.html#a63e8ab74fd7552d057e23e0ce550a157">More...</a><br /></td></tr>
|
||||
<tr class="separator:a63e8ab74fd7552d057e23e0ce550a157"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a3e08890e31163e4d33c0f27dc9072662"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3e08890e31163e4d33c0f27dc9072662">◆ </a></span>AddRef()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIScriptObject::AddRef </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The number of references to this object.</dd></dl>
|
||||
<p>Call this method when storing an additional reference to the object. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab83919a23c02ec07c66d9aedcbecf261"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab83919a23c02ec07c66d9aedcbecf261">◆ </a></span>CopyFrom()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIScriptObject::CopyFrom </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const <a class="el" href="classas_i_script_object.html">asIScriptObject</a> * </td>
|
||||
<td class="paramname"><em>other</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>A pointer to the source object. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error. </dd></dl>
|
||||
<dl class="retval"><dt>Return values</dt><dd>
|
||||
<table class="retval">
|
||||
<tr><td class="paramname">asINVALID_ARG</td><td>The argument is null. </td></tr>
|
||||
<tr><td class="paramname">asINVALID_TYPE</td><td>The other object is of different type.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>This method copies the contents of the other object to this one. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a6a8a3c7d1e103e43923614b719e3cb3a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a6a8a3c7d1e103e43923614b719e3cb3a">◆ </a></span>GetAddressOfProperty()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void* asIScriptObject::GetAddressOfProperty </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>prop</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">prop</td><td>The property index. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A pointer to the property value.</dd></dl>
|
||||
<p>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. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a5dda2d380ae1580e15ddf9d95893c57a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a5dda2d380ae1580e15ddf9d95893c57a">◆ </a></span>GetEngine()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a>* asIScriptObject::GetEngine </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The script engine. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aec79a2608f633a63169365d1ba79f611"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aec79a2608f633a63169365d1ba79f611">◆ </a></span>GetObjectType()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual <a class="el" href="classas_i_type_info.html">asITypeInfo</a>* asIScriptObject::GetObjectType </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The object type interface of the script object.</dd></dl>
|
||||
<p>This does not increase the reference count of the returned object type. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a902a8e3f3b4d6d2e56b6e258febf6259"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a902a8e3f3b4d6d2e56b6e258febf6259">◆ </a></span>GetPropertyCount()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> asIScriptObject::GetPropertyCount </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The number of member properties of the script object. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="af777076ab0d87e4995e1a343511f8a61"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af777076ab0d87e4995e1a343511f8a61">◆ </a></span>GetPropertyName()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual const char* asIScriptObject::GetPropertyName </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>prop</em></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">prop</td><td>The property index. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A null terminated string with the property name. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0b39e0e07b126b43d12ad1ec944a333e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0b39e0e07b126b43d12ad1ec944a333e">◆ </a></span>GetPropertyTypeId()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIScriptObject::GetPropertyTypeId </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>prop</em></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">prop</td><td>The property index. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The type id of the member property, or a negative value on error. </dd></dl>
|
||||
<dl class="retval"><dt>Return values</dt><dd>
|
||||
<table class="retval">
|
||||
<tr><td class="paramname">asINVALID_ARG</td><td><em>prop</em> is too large </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a19c5ab9d8adb0f921bf0b6474d97f468"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a19c5ab9d8adb0f921bf0b6474d97f468">◆ </a></span>GetTypeId()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIScriptObject::GetTypeId </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The type id of the script object. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a63e8ab74fd7552d057e23e0ce550a157"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a63e8ab74fd7552d057e23e0ce550a157">◆ </a></span>GetUserData()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void* asIScriptObject::GetUserData </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> </td>
|
||||
<td class="paramname"><em>type</em> = <code>0</code></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>An identifier used to identify which user data to get. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The pointer to the user data. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a9ccca7fe3453219377fc9bd190bf7903"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a9ccca7fe3453219377fc9bd190bf7903">◆ </a></span>GetWeakRefFlag()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual <a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a>* asIScriptObject::GetWeakRefFlag </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The weak ref flag for the object.</dd></dl>
|
||||
<p>This is a short-cut for the <a class="el" href="classas_i_script_engine.html#ab31103bef62096445fe03632de691827">asIScriptEngine::GetWeakRefFlagOfScriptObject</a> method. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a4bed3c3ac9f16294985835747aa122d3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a4bed3c3ac9f16294985835747aa122d3">◆ </a></span>Release()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIScriptObject::Release </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The number of references to this object.</dd></dl>
|
||||
<p>Call this method when you will no longer use the references that you own. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac85cea9bca5dd3868e027285e44dd6d0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac85cea9bca5dd3868e027285e44dd6d0">◆ </a></span>SetUserData()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual void* asIScriptObject::SetUserData </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"><em>data</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#a76fc6994aba7ff6c685a62c273c057e3">asPWORD</a> </td>
|
||||
<td class="paramname"><em>type</em> = <code>0</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>A pointer to the user data. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>An identifier used to identify which user data to set. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The previous pointer stored in the object type.</dd></dl>
|
||||
<p>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.</p>
|
||||
<p>The user data types identifiers between 1000 and 1999 are reserved for use by official add-ons.</p>
|
||||
<p>Optionally, a callback function can be <a class="el" href="classas_i_script_engine.html#a4654e2cae0690c50e19b177f1ec54592">registered</a> to clean up the user data when the script object is destroyed. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_script_object.html">asIScriptObject</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
116
docs/manual/classas_i_string_factory-members.html
Normal file
116
docs/manual/classas_i_string_factory-members.html
Normal file
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_string_factory.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIStringFactory Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_string_factory.html">asIStringFactory</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_string_factory.html#ae798179f4d90b30371416f8c5c522333">GetRawStringData</a>(const void *str, char *data, asUINT *length) const =0</td><td class="entry"><a class="el" href="classas_i_string_factory.html">asIStringFactory</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">GetStringConstant</a>(const char *data, asUINT length)=0</td><td class="entry"><a class="el" href="classas_i_string_factory.html">asIStringFactory</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_string_factory.html#ae4ca9e666eb711671a765dba8debe8b1">ReleaseStringConstant</a>(const void *str)=0</td><td class="entry"><a class="el" href="classas_i_string_factory.html">asIStringFactory</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
268
docs/manual/classas_i_string_factory.html
Normal file
268
docs/manual/classas_i_string_factory.html
Normal file
@@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<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"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_string_factory.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#pub-methods">Public Member Functions</a> |
|
||||
<a href="classas_i_string_factory-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asIStringFactory Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__api__secondary__interfaces.html">Secondary interfaces</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The interface for the string factory.
|
||||
<a href="classas_i_string_factory.html#details">More...</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a59d5d4d13a21105791e34bef5cb57e6b"><td class="memItemLeft" align="right" valign="top">virtual const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">GetStringConstant</a> (const char *data, <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> length)=0</td></tr>
|
||||
<tr class="memdesc:a59d5d4d13a21105791e34bef5cb57e6b"><td class="mdescLeft"> </td><td class="mdescRight">Called by engine to instantiate a string constant. <a href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">More...</a><br /></td></tr>
|
||||
<tr class="separator:a59d5d4d13a21105791e34bef5cb57e6b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae4ca9e666eb711671a765dba8debe8b1"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_string_factory.html#ae4ca9e666eb711671a765dba8debe8b1">ReleaseStringConstant</a> (const void *str)=0</td></tr>
|
||||
<tr class="memdesc:ae4ca9e666eb711671a765dba8debe8b1"><td class="mdescLeft"> </td><td class="mdescRight">Called by engine when the string constant is no longer used. <a href="classas_i_string_factory.html#ae4ca9e666eb711671a765dba8debe8b1">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae4ca9e666eb711671a765dba8debe8b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae798179f4d90b30371416f8c5c522333"><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classas_i_string_factory.html#ae798179f4d90b30371416f8c5c522333">GetRawStringData</a> (const void *str, char *data, <a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> *length) const =0</td></tr>
|
||||
<tr class="memdesc:ae798179f4d90b30371416f8c5c522333"><td class="mdescLeft"> </td><td class="mdescRight">Called by engine to get the raw string data for serialization. <a href="classas_i_string_factory.html#ae798179f4d90b30371416f8c5c522333">More...</a><br /></td></tr>
|
||||
<tr class="separator:ae798179f4d90b30371416f8c5c522333"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>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 <a class="el" href="classas_i_script_engine.html#ac6598c07c36652b0270b4c2d61db1f01">asIScriptEngine::RegisterStringFactory</a>. </p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="ae798179f4d90b30371416f8c5c522333"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae798179f4d90b30371416f8c5c522333">◆ </a></span>GetRawStringData()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIStringFactory::GetRawStringData </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const void * </td>
|
||||
<td class="paramname"><em>str</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">char * </td>
|
||||
<td class="paramname"><em>data</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> * </td>
|
||||
<td class="paramname"><em>length</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td> const</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>The same pointer returned by <a class="el" href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">GetStringConstant</a> </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">data</td><td>A pointer to the data buffer that should be filled with the content </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">length</td><td>A pointer to the variable that should be set with the length of the data </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
|
||||
<p>The engine will first call this with <em>data</em> 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. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a59d5d4d13a21105791e34bef5cb57e6b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a59d5d4d13a21105791e34bef5cb57e6b">◆ </a></span>GetStringConstant()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual const void* asIStringFactory::GetStringConstant </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>data</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> </td>
|
||||
<td class="paramname"><em>length</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>The content of the string </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The length in bytes of the data buffer </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The pointer to the instantiated string constant</dd></dl>
|
||||
<p>The contents of <em>data</em> must be copied by the string factory, as the engine will not keep a copy of the original data.</p>
|
||||
<p>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 <a class="el" href="classas_i_string_factory.html#ae4ca9e666eb711671a765dba8debe8b1">ReleaseStringConstant</a> will be called for each of them. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae4ca9e666eb711671a765dba8debe8b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae4ca9e666eb711671a765dba8debe8b1">◆ </a></span>ReleaseStringConstant()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">virtual int asIStringFactory::ReleaseStringConstant </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const void * </td>
|
||||
<td class="paramname"><em>str</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">str</td><td>The same pointer returned by <a class="el" href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">GetStringConstant</a> </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>A negative value on error.</dd></dl>
|
||||
<p>The engine will call this method for each pointer returned by <a class="el" href="classas_i_string_factory.html#a59d5d4d13a21105791e34bef5cb57e6b">GetStringConstant</a>. 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. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_string_factory.html">asIStringFactory</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
112
docs/manual/classas_i_thread_manager-members.html
Normal file
112
docs/manual/classas_i_thread_manager-members.html
Normal file
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_thread_manager.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asIThreadManager Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_thread_manager.html">asIThreadManager</a>, including all inherited members.</p>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
121
docs/manual/classas_i_thread_manager.html
Normal file
121
docs/manual/classas_i_thread_manager.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<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"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_thread_manager.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="classas_i_thread_manager-members.html">List of all members</a> </div>
|
||||
<div class="headertitle">
|
||||
<div class="title">asIThreadManager Class Reference<div class="ingroups"><a class="el" href="group__api__auxiliary__functions.html">Auxiliary functions</a></div></div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>The interface for the thread manager.
|
||||
<a href="classas_i_thread_manager.html#details">More...</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>This interface is used to represent the internal thread manager prepared with <a class="el" href="group__api__multithread__functions.html#gaa5bea65c3f2a224bb1c677515e3bb0e2">asPrepareMultithread()</a> and returned by <a class="el" href="group__api__multithread__functions.html#ga948def50c98db90596b706ca4b58041e">asGetThreadManager()</a>. The application shouldn't do anything with this except pass it to another call to <a class="el" href="group__api__multithread__functions.html#gaa5bea65c3f2a224bb1c677515e3bb0e2">asPrepareMultithread()</a> in case there is a need to share a common thread manager across multiple application modules (dlls). </p>
|
||||
</div><hr/>The documentation for this class was generated from the following file:<ul>
|
||||
<li><a class="el" href="angelscript_8h.html">angelscript.h</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="classas_i_thread_manager.html">asIThreadManager</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
153
docs/manual/classas_i_type_info-members.html
Normal file
153
docs/manual/classas_i_type_info-members.html
Normal file
@@ -0,0 +1,153 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Member List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classas_i_type_info.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">asITypeInfo Member List</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classas_i_type_info.html">asITypeInfo</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a532069932de1f584ab52e4c2afacf95e">AddRef</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a4ce24b7a0ecd27bb7e34f1fa58c08d29">DerivesFrom</a>(const asITypeInfo *objType) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a849e5890b225717b243c73e3d4f38204">GetAccessMask</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a8722ecc6b7e47491cdb6e442a3bf1ba2">GetBaseType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#ae91a1b2080e76a0dcad8106436728314">GetBehaviourByIndex</a>(asUINT index, asEBehaviours *outBehaviour) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#ad7c3c757cc99df4d40c6b3b44896cb96">GetBehaviourCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a01fe2f0b68614246a63e52cada374b69">GetChildFuncdef</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#aa9b5a0281ff01d448e55cb10e42ba340">GetChildFuncdefCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#aa181c094c192e86299b394ebcfa68760">GetConfigGroup</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#abafbb3a12cbd94f56a4f3c1739fd6ada">GetEngine</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#aaece7c2106dbced04436b52515f1f7ac">GetEnumValueByIndex</a>(asUINT index, int *outValue) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#abe22697bab6560c30c9b613187d6b4d7">GetEnumValueCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#aca1e08cd395231d30ad78a7ca3fea142">GetFactoryByDecl</a>(const char *decl) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a6a8b52fefd309102142ba74621d35714">GetFactoryByIndex</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a22cb802db08d6f464f6ee12337390d12">GetFactoryCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a068900ec359ff7fc2ee59a938ffe20ab">GetFlags</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#abf4e686097f0c485e6dcd330fe47f91e">GetFuncdefSignature</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a320141f6c331a9e49334de2576c725f7">GetInterface</a>(asUINT index) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a47a4bdc2462b38a5659c3cb96e61c649">GetInterfaceCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a80c61bb4d018647561ce3af24fedf65b">GetMethodByDecl</a>(const char *decl, bool getVirtual=true) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a235262cb0bacaf1f160e5ac5156db4e8">GetMethodByIndex</a>(asUINT index, bool getVirtual=true) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#af3febbb10e7e85425f0960aad892f9b8">GetMethodByName</a>(const char *name, bool getVirtual=true) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a50877d3602e460e784df4f611ae6f360">GetMethodCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a3e08d6c6ee1957c421bb297f94a81d54">GetModule</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a49f83d3a9158331029324bfbe9ae46a8">GetName</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a90b16019d2569d6c721130f3049786a2">GetNamespace</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#aa2836268d01f3a4424263190b57d9b04">GetParentType</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a48f468bd5b6b0e22c852b40639a7a2b5">GetProperty</a>(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</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a01d086e1bb97aa56a7b128c00c174ac6">GetPropertyCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a9e6916f51f09970d268378aef9601349">GetPropertyDeclaration</a>(asUINT index, bool includeNamespace=false) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#ad965398e393144e87c0436ef865b9b6d">GetSize</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a8e947504f268c7f0e1c26973dd7d3837">GetSubType</a>(asUINT subTypeIndex=0) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a1657d5094afa550c93d8cc74c216c3c6">GetSubTypeCount</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#aa1a56809ce5c340364ecd8beac508eb4">GetSubTypeId</a>(asUINT subTypeIndex=0) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#aca9edb046026db68d255e226dd419b3a">GetTypedefTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a06698aa9dcc6dc315ec2651fc70dbe19">GetTypeId</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a80b01b2ceadfaf91cc34988033a1598c">GetUserData</a>(asPWORD type=0) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a19bacd881681ee398de95a076f427726">Implements</a>(const asITypeInfo *objType) const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classas_i_type_info.html#a73b9059dc335b6fde8c7bbf4b1b95914">Release</a>() const =0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
<tr><td class="entry"><a class="el" href="classas_i_type_info.html#a5e8ea071f1c1f3b7c6dfc1950bec73f4">SetUserData</a>(void *data, asPWORD type=0)=0</td><td class="entry"><a class="el" href="classas_i_type_info.html">asITypeInfo</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1590
docs/manual/classas_i_type_info.html
Normal file
1590
docs/manual/classas_i_type_info.html
Normal file
File diff suppressed because it is too large
Load Diff
137
docs/manual/classes.html
Normal file
137
docs/manual/classes.html
Normal file
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Class Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('classes.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class Index</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_a">a</a></div>
|
||||
<table class="classindex">
|
||||
<tr><td rowspan="2" valign="bottom"><a name="letter_a"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah">  a  </div></td></tr></table>
|
||||
</td>
|
||||
<td valign="top"><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_thread_manager.html">asIThreadManager</a>   </td>
|
||||
<td valign="top"><a class="el" href="structas_s_message_info.html">asSMessageInfo</a>   </td>
|
||||
</tr>
|
||||
<tr><td valign="top"><a class="el" href="classas_i_script_context.html">asIScriptContext</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_script_module.html">asIScriptModule</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_type_info.html">asITypeInfo</a>   </td>
|
||||
<td valign="top"><a class="el" href="structas_s_v_m_registers.html">asSVMRegisters</a>   </td>
|
||||
</tr>
|
||||
<tr><td valign="top"><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_script_object.html">asIScriptObject</a>   </td>
|
||||
<td valign="top"><a class="el" href="structas_s_b_c_info.html">asSBCInfo</a>   </td>
|
||||
<td></td></tr>
|
||||
<tr><td valign="top"><a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_script_function.html">asIScriptFunction</a>   </td>
|
||||
<td valign="top"><a class="el" href="classas_i_string_factory.html">asIStringFactory</a>   </td>
|
||||
<td valign="top"><a class="el" href="structas_s_func_ptr.html">asSFuncPtr</a>   </td>
|
||||
<td></td></tr>
|
||||
<tr><td></td><td></td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
<div class="qindex"><a class="qindex" href="#letter_a">a</a></div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/manual/closed.png
Normal file
BIN
docs/manual/closed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 B |
118
docs/manual/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html
Normal file
118
docs/manual/dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<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"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">source Directory Reference</div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:angelscript_8h"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="angelscript_8h.html">angelscript.h</a></td></tr>
|
||||
<tr class="memdesc:angelscript_8h"><td class="mdescLeft"> </td><td class="mdescRight">The API definition for AngelScript. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_b2f33c71d4aa5e7af42a1ca61ff5af1b.html">source</a></li>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:25 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
docs/manual/doc.png
Normal file
BIN
docs/manual/doc.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 746 B |
116
docs/manual/doc_addon.html
Normal file
116
docs/manual/doc_addon.html
Normal file
@@ -0,0 +1,116 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Add-ons</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Add-ons </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This page gives a brief description of the add-ons that you'll find in the /sdk/add_on/ folder.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="doc_addon_application.html">Application modules</a></li>
|
||||
<li><a class="el" href="doc_addon_script.html">Script extensions</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
docs/manual/doc_addon.js
Normal file
5
docs/manual/doc_addon.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var doc_addon =
|
||||
[
|
||||
[ "Application modules", "doc_addon_application.html", "doc_addon_application" ],
|
||||
[ "Script extensions", "doc_addon_script.html", "doc_addon_script" ]
|
||||
];
|
||||
201
docs/manual/doc_addon_any.html
Normal file
201
docs/manual/doc_addon_any.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: any object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_any.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">any object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptany/</p>
|
||||
<p>The <code>any</code> type is a generic container that can hold any value. It is a reference type.</p>
|
||||
<p>The type is registered with <code>RegisterScriptAny(asIScriptEngine*)</code>.</p>
|
||||
<h1><a class="anchor" id="doc_addon_any_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptAny</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Constructors</span></div>
|
||||
<div class="line"> CScriptAny(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> CScriptAny(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> refTypeId, <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Memory management</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copy the stored value from another any object</span></div>
|
||||
<div class="line"> CScriptAny &operator=(<span class="keyword">const</span> CScriptAny&);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> CopyFrom(<span class="keyword">const</span> CScriptAny *other);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Store the value, either as variable type, integer number, or real number</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Store(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> refTypeId);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Store(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> &value);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Store(<span class="keywordtype">double</span> &value);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Retrieve the stored value, either as variable type, integer number, or real number</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Retrieve(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> refTypeId) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Retrieve(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Retrieve(<span class="keywordtype">double</span> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the type id of the stored value</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_any_2"></a>
|
||||
Public script interface</h1>
|
||||
<pre>
|
||||
class any
|
||||
{
|
||||
any();
|
||||
any(? &in value);
|
||||
any(int64 &in value);
|
||||
any(double &in value);</pre><pre> any &opAssign(const any &in other);</pre><pre> void store(? &in value);
|
||||
void store(int64 &in value);
|
||||
void store(double &in value);</pre><pre> bool retrieve(? &out value) const;
|
||||
bool retrieve(int64 &out value) const;
|
||||
bool retrieve(double &out value) const;
|
||||
}
|
||||
</pre><p><b>any()</b><br />
|
||||
<b>any(? &in value)</b><br />
|
||||
<b>any(int64 &in value)</b><br />
|
||||
<b>any(double &in value)</b><br />
|
||||
</p>
|
||||
<p>The default constructor creates an empty object, and the second initializes the object with the provided value.</p>
|
||||
<p>The int64 and double overloads make sure that all numbers are converted to 64bit before being stored in the object.</p>
|
||||
<p><b>any &opAssign(const any &in other)</b><br />
|
||||
</p>
|
||||
<p>The assignment operator will copy the contained value from the other object.</p>
|
||||
<p><b>void store(? &in value)</b><br />
|
||||
<b>void store(int64 &in value)</b><br />
|
||||
<b>void store(double &in value)</b><br />
|
||||
</p>
|
||||
<p>These methods sets the value in the object.</p>
|
||||
<p>The int64 and double overloads make sure that all numbers are converted to 64bit before being stored in the object.</p>
|
||||
<p><b>bool retrieve(? &out value) const</b><br />
|
||||
<b>bool retrieve(int64 &out value) const</b><br />
|
||||
<b>bool retrieve(double &out value) const</b><br />
|
||||
</p>
|
||||
<p>These methods retrieve the value stored in the object. The methods will return true if the stored value is compatible with the requested type.</p>
|
||||
<h1><a class="anchor" id="doc_addon_any_3"></a>
|
||||
Example usage</h1>
|
||||
<p>In the scripts it can be used as follows:</p>
|
||||
<pre>
|
||||
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</pre><pre> a.retrieve(value); // retrieve the value
|
||||
b.retrieve(@handle); // retrieve the object handle
|
||||
c.retrieve(object); // retrieve a copy of the object
|
||||
</pre><p>In C++ the type can be used as follows:</p>
|
||||
<div class="fragment"><div class="line">CScriptAny *myAny;</div>
|
||||
<div class="line"><span class="keywordtype">int</span> typeId = engine-><a class="code" href="classas_i_script_engine.html#ad1f6fecb0f53fd7966736b01f65c3dcb">GetTypeIdByDecl</a>(<span class="stringliteral">"string@"</span>);</div>
|
||||
<div class="line">CScriptString *str = <span class="keyword">new</span> CScriptString(<span class="stringliteral">"hello world"</span>);</div>
|
||||
<div class="line">myAny->Store((<span class="keywordtype">void</span>*)&str, typeId);</div>
|
||||
<div class="line">myAny->Retrieve((<span class="keywordtype">void</span>*)&str, typeId);</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_aa8044b56ee56e2350b06f1e7207b43df"><div class="ttname"><a href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a></div><div class="ttdeci">__int64 asINT64</div><div class="ttdoc">64 bit integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:620</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ad1f6fecb0f53fd7966736b01f65c3dcb"><div class="ttname"><a href="classas_i_script_engine.html#ad1f6fecb0f53fd7966736b01f65c3dcb">asIScriptEngine::GetTypeIdByDecl</a></div><div class="ttdeci">virtual int GetTypeIdByDecl(const char *decl) const =0</div><div class="ttdoc">Returns a type id by declaration.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
119
docs/manual/doc_addon_application.html
Normal file
119
docs/manual/doc_addon_application.html
Normal file
@@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Application modules</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_application.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Application modules </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><ul>
|
||||
<li><a class="el" href="doc_addon_build.html">Script builder</a></li>
|
||||
<li><a class="el" href="doc_addon_ctxmgr.html">Context manager</a></li>
|
||||
<li><a class="el" href="doc_addon_debugger.html">Debugger</a></li>
|
||||
<li><a class="el" href="doc_addon_serializer.html">Serializer</a></li>
|
||||
<li><a class="el" href="doc_addon_helpers.html">Helper functions</a></li>
|
||||
<li><a class="el" href="doc_addon_autowrap.html">Automatic wrapper functions</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
32
docs/manual/doc_addon_application.js
Normal file
32
docs/manual/doc_addon_application.js
Normal file
@@ -0,0 +1,32 @@
|
||||
var doc_addon_application =
|
||||
[
|
||||
[ "Script builder", "doc_addon_build.html", [
|
||||
[ "Public C++ interface", "doc_addon_build.html#doc_addon_build_1", [
|
||||
[ "The include callback signature", "doc_addon_build.html#doc_addon_build_1_1", null ],
|
||||
[ "The pragma callback signature", "doc_addon_build.html#doc_addon_build_1_2", null ]
|
||||
] ],
|
||||
[ "Include directives", "doc_addon_build.html#doc_addon_build_2", null ],
|
||||
[ "Conditional programming", "doc_addon_build.html#doc_addon_build_condition", null ],
|
||||
[ "Metadata in scripts", "doc_addon_build.html#doc_addon_build_metadata", null ]
|
||||
] ],
|
||||
[ "Context manager", "doc_addon_ctxmgr.html", [
|
||||
[ "Public C++ interface", "doc_addon_ctxmgr.html#doc_addon_ctxmgr_1", null ],
|
||||
[ "Public script interface", "doc_addon_ctxmgr.html#doc_addon_ctxmgr_2", null ]
|
||||
] ],
|
||||
[ "Debugger", "doc_addon_debugger.html", [
|
||||
[ "Public C++ interface", "doc_addon_debugger.html#doc_addon_debugger_1", null ],
|
||||
[ "Example usage", "doc_addon_debugger.html#doc_addon_debugger_2", null ]
|
||||
] ],
|
||||
[ "Serializer", "doc_addon_serializer.html", [
|
||||
[ "Public C++ interface", "doc_addon_serializer.html#doc_addon_serializer_1", null ],
|
||||
[ "Example usage", "doc_addon_serializer.html#doc_addon_serializer_2", null ]
|
||||
] ],
|
||||
[ "Helper functions", "doc_addon_helpers.html", [
|
||||
[ "Public C++ interface", "doc_addon_helpers.html#doc_addon_helpers_1", null ],
|
||||
[ "Example", "doc_addon_helpers.html#doc_addon_helpers_2", null ]
|
||||
] ],
|
||||
[ "Automatic wrapper functions", "doc_addon_autowrap.html", [
|
||||
[ "Example usage", "doc_addon_autowrap.html#doc_addon_autowrap_1", null ],
|
||||
[ "Adding support for more parameters", "doc_addon_autowrap.html#doc_addon_autowrap_2", null ]
|
||||
] ]
|
||||
];
|
||||
232
docs/manual/doc_addon_array.html
Normal file
232
docs/manual/doc_addon_array.html
Normal file
@@ -0,0 +1,232 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: array template object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_array.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">array template object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptarray/</p>
|
||||
<p>The <code>array</code> type is a <a class="el" href="doc_adv_template.html">template object</a> that allow the scripts to declare arrays of any type. Since it is a generic class it is not the most performatic due to the need to determine characteristics at runtime. For that reason it is recommended that the application registers a <a class="el" href="doc_adv_template.html#doc_adv_template_2">template specialization</a> for the array types that are most commonly used.</p>
|
||||
<p>The type is registered with <code>RegisterScriptArray(asIScriptEngine *engine, bool defaultArrayType)</code>. The second parameter should be set to true if you wish to allow the syntax form <code>type[]</code> to declare arrays.</p>
|
||||
<p>Compile the add-on with the pre-processor define AS_USE_STLNAMES=1 to register the methods with the same names as used by C++ STL where the methods have the same significance. Not all methods from STL is implemented in the add-on, but many of the most frequent once are so a port from script to C++ and vice versa might be easier if STL names are used.</p>
|
||||
<p>Compile the add-on with the pre-processor define AS_USE_ACCESSORS=1 to register length as a virtual property instead of the method length().</p>
|
||||
<h1><a class="anchor" id="doc_addon_array_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptArray</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Set the memory functions that should be used by all CScriptArrays</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> <span class="keywordtype">void</span> SetMemoryFunctions(<a class="code" href="angelscript_8h.html#ac69a827822c73771cd972bff270cefc7">asALLOCFUNC_t</a> allocFunc, <a class="code" href="angelscript_8h.html#adeecc934971e695fc4441a47694860fb">asFREEFUNC_t</a> freeFunc);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Factory functions</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptArray *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *arrayType);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptArray *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *arrayType, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> length);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptArray *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *arrayType, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> length, <span class="keywordtype">void</span> *defaultValue);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptArray *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *arrayType, <span class="keywordtype">void</span> *listBuffer);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Memory management</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Type information</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *GetArrayObjectType() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetArrayTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetElementTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the current size</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> GetSize() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the array is empty</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> IsEmpty() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Pre-allocates memory for elements</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Reserve(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> numElements);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Resize the array</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Resize(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> numElements);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get a pointer to an element. Returns 0 if out of bounds</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *At(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index);</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span> *At(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set value of an element. </span></div>
|
||||
<div class="line"> <span class="comment">// The value arg should be a pointer to the value that will be copied to the element.</span></div>
|
||||
<div class="line"> <span class="comment">// Remember, if the array holds handles the value parameter should be the </span></div>
|
||||
<div class="line"> <span class="comment">// address of the handle. The refCount of the object will also be incremented</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetValue(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index, <span class="keywordtype">void</span> *value);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copy the contents of one array to another (only if the types are the same)</span></div>
|
||||
<div class="line"> CScriptArray &operator=(<span class="keyword">const</span> CScriptArray&);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Compare two arrays</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> CScriptArray &) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Array manipulation</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> InsertAt(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index, <span class="keywordtype">void</span> *value);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> RemoveAt(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> index);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> InsertLast(<span class="keywordtype">void</span> *value);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> RemoveLast();</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SortAsc();</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SortAsc(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> count);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SortDesc();</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SortDesc(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> count);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Sort(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> count, <span class="keywordtype">bool</span> asc);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Sort(<a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *less, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> count);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Reverse();</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Find(<span class="keywordtype">void</span> *value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Find(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <span class="keywordtype">void</span> *value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> FindByRef(<span class="keywordtype">void</span> *ref) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> FindByRef(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> startAt, <span class="keywordtype">void</span> *ref) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the address of the inner buffer for direct manipulation</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *GetBuffer();</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_array_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_datatypes_arrays.html">Arrays in the script language</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_array_4"></a>
|
||||
C++ example</h1>
|
||||
<p>This function shows how a script array can be instantiated from the application and then passed to the script.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Registered with AngelScript as 'array<string> @CreateArrayOfString()'</span></div>
|
||||
<div class="line">CScriptArray *CreateArrayOfStrings()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// If called from the script, there will always be an active </span></div>
|
||||
<div class="line"> <span class="comment">// context, which can be used to obtain a pointer to the engine.</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = <a class="code" href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( ctx )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a>* engine = ctx-><a class="code" href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">GetEngine</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The script array needs to know its type to properly handle the elements.</span></div>
|
||||
<div class="line"> <span class="comment">// Note that the object type should be cached to avoid performance issues</span></div>
|
||||
<div class="line"> <span class="comment">// if the function is called frequently.</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_type_info.html">asITypeInfo</a>* t = engine-><a class="code" href="classas_i_script_engine.html#ab00808f9b762c4badf508ed511789d1b">GetTypeInfoByDecl</a>(<span class="stringliteral">"array<string>"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Create an array with the initial size of 3 elements</span></div>
|
||||
<div class="line"> CScriptArray* arr = CScriptArray::Create(t, 3);</div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> i = 0; i < arr->GetSize(); i++ )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Set the value of each element</span></div>
|
||||
<div class="line"> <span class="keywordtype">string</span> val(<span class="stringliteral">"test"</span>);</div>
|
||||
<div class="line"> arr->SetValue(i, &val);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The ref count for the returned handle was already set in the array's constructor</span></div>
|
||||
<div class="line"> <span class="keywordflow">return</span> arr;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a07f12016c5435aec5b63449abb6e4d8d"><div class="ttname"><a href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">asIScriptContext::GetEngine</a></div><div class="ttdeci">virtual asIScriptEngine * GetEngine() const =0</div><div class="ttdoc">Returns a pointer to the engine.</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_adeecc934971e695fc4441a47694860fb"><div class="ttname"><a href="angelscript_8h.html#adeecc934971e695fc4441a47694860fb">asFREEFUNC_t</a></div><div class="ttdeci">void(* asFREEFUNC_t)(void *)</div><div class="ttdoc">The function signature for the custom memory deallocation function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:637</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac69a827822c73771cd972bff270cefc7"><div class="ttname"><a href="angelscript_8h.html#ac69a827822c73771cd972bff270cefc7">asALLOCFUNC_t</a></div><div class="ttdeci">void *(* asALLOCFUNC_t)(size_t)</div><div class="ttdoc">The function signature for the custom memory allocation function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:635</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ab00808f9b762c4badf508ed511789d1b"><div class="ttname"><a href="classas_i_script_engine.html#ab00808f9b762c4badf508ed511789d1b">asIScriptEngine::GetTypeInfoByDecl</a></div><div class="ttdeci">virtual asITypeInfo * GetTypeInfoByDecl(const char *decl) const =0</div><div class="ttdoc">Returns a type by declaration.</div></div>
|
||||
<div class="ttc" id="agroup__api__principal__functions_html_gad3a20dc58093b92a5a44c7b6ada34a10"><div class="ttname"><a href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a></div><div class="ttdeci">AS_API asIScriptContext * asGetActiveContext()</div><div class="ttdoc">Returns the currently active context.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
160
docs/manual/doc_addon_autowrap.html
Normal file
160
docs/manual/doc_addon_autowrap.html
Normal file
@@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Automatic wrapper functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_autowrap.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Automatic wrapper functions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/autowrapper/aswrappedcall.h</p>
|
||||
<p>This header file declares some macros and template functions that will let the application developer automatically generate wrapper functions using the <a class="el" href="doc_generic.html">generic calling convention</a> with a simple call to a preprocessor macro. This is useful for those platforms where the native calling conventions are not yet supported.</p>
|
||||
<p>The macros are defined as:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Wrap a global function with implicit or explicit signature</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_FN(name)</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_FN_PR(name, Parameters, ReturnType)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Wrap a class method with implicit or explicit signature</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_MFN(ClassType, name)</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_MFN_PR(ClassType, name, Parameters, ReturnType)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Wrap a global function that will emulate a class method and receives the 'this' pointer as the first argument</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_OBJ_FIRST(name)</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_OBJ_FIRST_PR(name, Parameters, ReturnType)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Wrap a global function that will emulate a class method and receives the 'this' pointer as the last argument</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_OBJ_LAST(name)</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_OBJ_LAST_PR(name, Parameters, ReturnType)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Wrap a constructor with an explicit signature</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_CON(ClassType, Parameters)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Wrap a destructor</span></div>
|
||||
<div class="line"><span class="preprocessor">#define WRAP_DES(ClassType)</span></div>
|
||||
</div><!-- fragment --><p>As you can see they are very similar to the <a class="el" href="doc_register_func.html#doc_register_func_1">asFUNCTION</a> and <a class="el" href="doc_register_func.html#doc_register_func_1">asMETHOD</a> macros, and are used the same way.</p>
|
||||
<p>Unfortunately the template functions needed to perform this generation are quite complex and older compilers may not be able to handle them. One such example is Microsoft Visual C++ 6, though luckily it has no need for them as AngelScript already supports native calling conventions for it.</p>
|
||||
<h1><a class="anchor" id="doc_addon_autowrap_1"></a>
|
||||
Example usage</h1>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include "aswrappedcall.h"</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// The application function that we want to register</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> DoSomething(std::string param1, <span class="keywordtype">int</span> param2);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Registering the wrapper with AngelScript</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> RegisterWrapper(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The WRAP_FN macro automatically implements and returns the function pointer of the generic wrapper</span></div>
|
||||
<div class="line"> <span class="comment">// function. Observe, that the calling convention should be set as asCALL_GENERIC in this case.</span></div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void DoSomething(string, int)"</span>, WRAP_FN(DoSomething), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce">asCALL_GENERIC</a>); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_autowrap_2"></a>
|
||||
Adding support for more parameters</h1>
|
||||
<p>The aswrappedcall.h header file is by default prepared to support functions with up to 4 arguments. If you have a need for more arguments then you can use the generator that you find in the sub-directory to prepare a new header file.</p>
|
||||
<p>Open the generateheader.cpp in an editor and set the max_args variable to the number of arguments you need and then compile and run the code. It will print the new header file to the standard output so you just need to direct this to a file. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce">asCALL_GENERIC</a></div><div class="ttdeci">@ asCALL_GENERIC</div><div class="ttdoc">A function using the generic calling convention.</div><div class="ttdef"><b>Definition:</b> angelscript.h:238</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
267
docs/manual/doc_addon_build.html
Normal file
267
docs/manual/doc_addon_build.html
Normal file
@@ -0,0 +1,267 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Script builder</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_build.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Script builder </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptbuilder/</p>
|
||||
<p>This class is a helper class for loading and building scripts, with a basic pre-processor that supports conditional compilation, include directives, and metadata declarations.</p>
|
||||
<p>By default the script builder resolves include directives by loading the included file from the relative directory of the file it is included from. If you want to do this in another way, then you should implement the <a class="el" href="doc_addon_build.html#doc_addon_build_1_1">include callback</a> which will let you process the include directive in a custom way, e.g. to load the included file from memory, or to support multiple search paths. The include callback should call the AddSectionFromFile or AddSectionFromMemory to include the section in the current build.</p>
|
||||
<p>If you do not want process metadata then you can compile the add-on with the define AS_PROCESS_METADATA 0, which will exclude the code for processing this. This define can be made in the project settings or directly in the header.</p>
|
||||
<h1><a class="anchor" id="doc_addon_build_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptBuilder</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Start a new module</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> StartNewModule(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *moduleName);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Load a script section from a file on disk</span></div>
|
||||
<div class="line"> <span class="comment">// Returns 1 if the file was included</span></div>
|
||||
<div class="line"> <span class="comment">// 0 if the file had already been included before</span></div>
|
||||
<div class="line"> <span class="comment">// <0 on error</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> AddSectionFromFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Load a script section from memory</span></div>
|
||||
<div class="line"> <span class="comment">// Returns 1 if the section was included</span></div>
|
||||
<div class="line"> <span class="comment">// 0 if a section with the same name had already been included before</span></div>
|
||||
<div class="line"> <span class="comment">// <0 on error</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> AddSectionFromMemory(<span class="keyword">const</span> <span class="keywordtype">char</span> *sectionName,</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span> *scriptCode, </div>
|
||||
<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> scriptLength = 0,</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> lineOffset = 0);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Build the added script sections</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> BuildModule();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the script engine</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *GetEngine();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the current module</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *GetModule();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the callback for resolving include directive</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetIncludeCallback(INCLUDECALLBACK_t callback, <span class="keywordtype">void</span> *userParam);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the callback for resolving pragma directive</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetPragmaCallback(PRAGMACALLBACK_t callback, <span class="keywordtype">void</span> *userParam);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Add a pre-processor define for conditional compilation</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> DefineWord(<span class="keyword">const</span> <span class="keywordtype">char</span> *word);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Enumerate included script sections</span></div>
|
||||
<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetSectionCount() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">string</span> GetSectionName(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get metadata declared for classes, interfaces, and enums</span></div>
|
||||
<div class="line"> <span class="comment">// Each metadata block, i.e. [...], is returned as a separate string</span></div>
|
||||
<div class="line"> std::vector<std::string> GetMetadataStringForType(<span class="keywordtype">int</span> typeId);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get metadata declared for functions</span></div>
|
||||
<div class="line"> <span class="comment">// Each metadata block, i.e. [...], is returned as a separate string</span></div>
|
||||
<div class="line"> std::vector<std::string> GetMetadataStringForFunc(<a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *func);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get metadata declared for global variables</span></div>
|
||||
<div class="line"> <span class="comment">// Each metadata block, i.e. [...], is returned as a separate string</span></div>
|
||||
<div class="line"> std::vector<std::string> GetMetadataStringForVar(<span class="keywordtype">int</span> varIdx);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get metadata declared for a class method</span></div>
|
||||
<div class="line"> <span class="comment">// Each metadata block, i.e. [...], is returned as a separate string</span></div>
|
||||
<div class="line"> std::vector<std::string> GetMetadataStringForTypeMethod(<span class="keywordtype">int</span> typeId, <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *method);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get metadata declared for a class property</span></div>
|
||||
<div class="line"> <span class="comment">// Each metadata block, i.e. [...], is returned as a separate string</span></div>
|
||||
<div class="line"> std::vector<std::string> GetMetadataStringForTypeProperty(<span class="keywordtype">int</span> typeId, <span class="keywordtype">int</span> varIdx);</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_addon_build_1_1"></a>
|
||||
The include callback signature</h2>
|
||||
<div class="fragment"><div class="line"><span class="comment">// This callback will be called for each #include directive encountered by the</span></div>
|
||||
<div class="line"><span class="comment">// builder. The callback should call the AddSectionFromFile or AddSectionFromMemory</span></div>
|
||||
<div class="line"><span class="comment">// to add the included section to the script. If the include cannot be resolved</span></div>
|
||||
<div class="line"><span class="comment">// then the function should return a negative value to abort the compilation.</span></div>
|
||||
<div class="line"><span class="keyword">typedef</span> int (*INCLUDECALLBACK_t)(<span class="keyword">const</span> <span class="keywordtype">char</span> *include, <span class="keyword">const</span> <span class="keywordtype">char</span> *from, CScriptBuilder *builder, <span class="keywordtype">void</span> *userParam);</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_addon_build_1_2"></a>
|
||||
The pragma callback signature</h2>
|
||||
<div class="fragment"><div class="line"><span class="comment">// This callback will be called for each #pragma directive encountered by the builder.</span></div>
|
||||
<div class="line"><span class="comment">// The application can interpret the pragmaText and decide what do to based on that.</span></div>
|
||||
<div class="line"><span class="comment">// If the callback returns a negative value the builder will report an error and abort the compilation.</span></div>
|
||||
<div class="line"><span class="keyword">typedef</span> int(*PRAGMACALLBACK_t)(<span class="keyword">const</span> std::string &pragmaText, CScriptBuilder &builder, <span class="keywordtype">void</span> *userParam);</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_build_2"></a>
|
||||
Include directives</h1>
|
||||
<p>Example script with include directive:</p>
|
||||
<pre>
|
||||
#include "commonfuncs.as"</pre><pre> void main()
|
||||
{
|
||||
// Call a function from the included file
|
||||
CommonFunc();
|
||||
}
|
||||
</pre><h1><a class="anchor" id="doc_addon_build_condition"></a>
|
||||
Conditional programming</h1>
|
||||
<p>The builder supports conditional programming through the #if/#endif preprocessor directives. The application may define a word with a call to DefineWord(), then the scripts may check for this definition in the code in order to include/exclude parts of the code.</p>
|
||||
<p>This is especially useful when scripts are shared between different binaries, for example, in a client/server application.</p>
|
||||
<p>Example script with conditional compilation:</p>
|
||||
<pre>
|
||||
class CObject
|
||||
{
|
||||
void Process()
|
||||
{
|
||||
#if SERVER
|
||||
// Do some server specific processing
|
||||
#endif</pre><pre> #if CLIENT
|
||||
// Do some client specific processing
|
||||
#endif</pre><pre> // Do some common processing
|
||||
}
|
||||
}
|
||||
</pre><h1><a class="anchor" id="doc_addon_build_metadata"></a>
|
||||
Metadata in scripts</h1>
|
||||
<p>Metadata can be added before script class, interface, function, and global variable declarations. The metadata is removed from the script by the builder class and stored for post build lookup by the type id, function id, or variable index.</p>
|
||||
<p>Exactly what the metadata looks like is up to the application. The builder class doesn't impose any rules, except that the metadata should be added between brackets []. After the script has been built the application can obtain the metadata strings and interpret them as it sees fit. Multiple metadata blocks, i.e. [], can be defined for each entity.</p>
|
||||
<p>Example script with metadata:</p>
|
||||
<pre>
|
||||
[factory func = CreateOgre]
|
||||
class COgre
|
||||
{
|
||||
[editable]
|
||||
vector3 myPosition;</pre><pre> [editable]
|
||||
[range [10, 100]]
|
||||
int myStrength;
|
||||
}</pre><pre> [factory]
|
||||
COgre @CreateOgre()
|
||||
{
|
||||
return @COgre();
|
||||
}
|
||||
</pre><p>Example usage:</p>
|
||||
<div class="fragment"><div class="line">CScriptBuilder builder;</div>
|
||||
<div class="line"><span class="keywordtype">int</span> r = builder.StartNewModule(engine, <span class="stringliteral">"my module"</span>);</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r >= 0 )</div>
|
||||
<div class="line"> r = builder.AddSectionFromMemory(script);</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r >= 0 )</div>
|
||||
<div class="line"> r = builder.BuildModule();</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r >= 0 )</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Find global variables that have been marked as editable by user</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod = engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(<span class="stringliteral">"my module"</span>);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> count = mod-><a class="code" href="classas_i_script_module.html#a87e29773f7e6f2980d75288faaa74d02">GetGlobalVarCount</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <span class="keywordtype">int</span> n = 0; n < count; n++ )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> vector<string> metadata = builder.GetMetadataStringForVar(n);</div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <span class="keywordtype">int</span> m = 0; m < metadata.size(); m++ )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( metadata[m] == <span class="stringliteral">"editable"</span> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Show the global variable in a GUI</span></div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a87e29773f7e6f2980d75288faaa74d02"><div class="ttname"><a href="classas_i_script_module.html#a87e29773f7e6f2980d75288faaa74d02">asIScriptModule::GetGlobalVarCount</a></div><div class="ttdeci">virtual asUINT GetGlobalVarCount() const =0</div><div class="ttdoc">Returns the number of global variables in the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
182
docs/manual/doc_addon_ctxmgr.html
Normal file
182
docs/manual/doc_addon_ctxmgr.html
Normal file
@@ -0,0 +1,182 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Context manager</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_ctxmgr.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Context manager </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/contextmgr/</p>
|
||||
<p>The <code>CContextMgr</code> is a class designed to aid the management of multiple simultaneous scripts executing in parallel. It supports both <a class="el" href="doc_adv_concurrent.html">concurrent script threads</a> and <a class="el" href="doc_adv_coroutine.html">co-routines</a>.</p>
|
||||
<p>If the application doesn't need multiple contexts, i.e. all scripts that are executed always complete before the next script is executed, then this class is not necessary.</p>
|
||||
<p>The context manager uses <a class="el" href="classas_i_script_engine.html#a32391ee83e58083b406ba068ab2ee049">asIScriptEngine::RequestContext</a> to take advantage of any context callbacks registered with the engine, e.g. for debugging or pooling.</p>
|
||||
<p>Multiple context managers can be used, for example when you have a group of scripts controlling in-game objects, and another group of scripts controlling GUI elements, then each of these groups may be managed by different context managers.</p>
|
||||
<p>Observe that the context manager class hasn't been designed for multi-threading, so you need to be careful if your application needs to execute scripts from multiple threads.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd>The samples <a class="el" href="doc_samples_concurrent.html">Concurrent scripts</a> and <a class="el" href="doc_samples_corout.html">Co-routines</a> for uses</dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_ctxmgr_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CContextMgr</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> CContextMgr();</div>
|
||||
<div class="line"> ~CContextMgr();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set the function that the manager will use to obtain the time in milliseconds.</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetGetTimeCallback(TIMEFUNC_t func);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Registers the following:</span></div>
|
||||
<div class="line"> <span class="comment">//</span></div>
|
||||
<div class="line"> <span class="comment">// void sleep(uint milliseconds)</span></div>
|
||||
<div class="line"> <span class="comment">//</span></div>
|
||||
<div class="line"> <span class="comment">// The application must set the get time callback for this to work</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> RegisterThreadSupport(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Registers the following:</span></div>
|
||||
<div class="line"> <span class="comment">//</span></div>
|
||||
<div class="line"> <span class="comment">// funcdef void coroutine(dictionary@)</span></div>
|
||||
<div class="line"> <span class="comment">// void createCoRoutine(coroutine @func, dictionary @args)</span></div>
|
||||
<div class="line"> <span class="comment">// void yield()</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> RegisterCoRoutineSupport(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Create a new context, prepare it with the function, then return </span></div>
|
||||
<div class="line"> <span class="comment">// it so that the application can pass the argument values. The context</span></div>
|
||||
<div class="line"> <span class="comment">// will be released by the manager after the execution has completed.</span></div>
|
||||
<div class="line"> <span class="comment">// Set keepCtxAfterExecution to true if the application needs to retrieve</span></div>
|
||||
<div class="line"> <span class="comment">// information from the context after it the script has finished. </span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *AddContext(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *func, <span class="keywordtype">bool</span> keepCtxAfterExecution = <span class="keyword">false</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// If the context was kept after the execution, this method must be </span></div>
|
||||
<div class="line"> <span class="comment">// called when the application is done with the context so it can be</span></div>
|
||||
<div class="line"> <span class="comment">// returned to the pool for reuse.</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> DoneWithContext(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Create a new context, prepare it with the function, then return</span></div>
|
||||
<div class="line"> <span class="comment">// it so that the application can pass the argument values. The context</span></div>
|
||||
<div class="line"> <span class="comment">// will be added as a co-routine in the same thread as the currCtx.</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *AddContextForCoRoutine(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *currCtx, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *func);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Execute each script that is not currently sleeping. The function returns after </span></div>
|
||||
<div class="line"> <span class="comment">// each script has been executed once. The application should call this function</span></div>
|
||||
<div class="line"> <span class="comment">// for each iteration of the message pump, or game loop, or whatever.</span></div>
|
||||
<div class="line"> <span class="comment">// Returns the number of scripts still in execution.</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> ExecuteScripts();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Put a script to sleep for a while</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetSleeping(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> milliSeconds);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Switch the execution to the next co-routine in the group.</span></div>
|
||||
<div class="line"> <span class="comment">// Returns true if the switch was successful.</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> NextCoRoutine();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Abort all scripts</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AbortAll();</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_ctxmgr_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_coroutine.html">Co-routines</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
158
docs/manual/doc_addon_datetime.html
Normal file
158
docs/manual/doc_addon_datetime.html
Normal file
@@ -0,0 +1,158 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: datetime object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_datetime.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">datetime object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/datetime/</p>
|
||||
<p>The <code>CDateTime</code> class provides a way for scripts to get the system date and time.</p>
|
||||
<p>Register the type with the <code>RegisterScriptDateTime(asIScriptEngine*)</code> function.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>This class requires C++11 or later to compile.</dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_datetime_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CDateTime</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Constructors</span></div>
|
||||
<div class="line"> CDateTime();</div>
|
||||
<div class="line"> CDateTime(<span class="keyword">const</span> CDateTime &other);</div>
|
||||
<div class="line"> CDateTime(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> year, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> month, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> day, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> hour, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> minute, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> second);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copy the stored value from another any object</span></div>
|
||||
<div class="line"> CDateTime &operator=(<span class="keyword">const</span> CDateTime &other);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Accessors</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getYear() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getMonth() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getDay() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getHour() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getMinute() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> getSecond() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Setters</span></div>
|
||||
<div class="line"> <span class="comment">// Returns true if valid</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> setDate(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> year, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> month, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> day);</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> setTime(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> hour, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> minute, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> second);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Operators</span></div>
|
||||
<div class="line"> <span class="comment">// Return difference in seconds</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> operator-(<span class="keyword">const</span> CDateTime &other) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> CDateTime operator+(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keyword">friend</span> CDateTime operator+(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds, <span class="keyword">const</span> CDateTime &other);</div>
|
||||
<div class="line"> CDateTime & operator+=(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds);</div>
|
||||
<div class="line"> CDateTime operator-(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keyword">friend</span> CDateTime operator-(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds, <span class="keyword">const</span> CDateTime &other);</div>
|
||||
<div class="line"> CDateTime & operator-=(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> seconds);</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> CDateTime &other) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator<(<span class="keyword">const</span> CDateTime &other) <span class="keyword">const</span>;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_datetime_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_datetime.html">datetime in the script language</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_aa8044b56ee56e2350b06f1e7207b43df"><div class="ttname"><a href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a></div><div class="ttdeci">__int64 asINT64</div><div class="ttdoc">64 bit integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:620</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
184
docs/manual/doc_addon_debugger.html
Normal file
184
docs/manual/doc_addon_debugger.html
Normal file
@@ -0,0 +1,184 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Debugger</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_debugger.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Debugger </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/debugger/</p>
|
||||
<p>The <code>CDebugger</code> implements common debugging functionality for scripts, e.g. setting breakpoints, stepping through the code, examining values of variables, etc.</p>
|
||||
<p>To use the debugger the line callback should be set in the context. This will allow the debugger to take over whenever a breakpoint is reached, so the script can be debugged.</p>
|
||||
<p>By default the debugger uses the standard in and standard out streams to interact with the user, but this can be easily overloaded by deriving from the <code>CDebugger</code> class and implementing the methods <code>TakeCommands</code> and <code>Output</code>. With this it is possible to implement a graphical interface, or even remote debugging for an application.</p>
|
||||
<p>The application developer may also be interested in registering to-string callbacks for registered types with calls to <code>RegisterToStringCallback</code>. Optionally the <code>ToString</code> method in the debugger can be overridden to implement custom to-string logic.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd>The sample <a class="el" href="doc_samples_asrun.html">Command line runner</a> for a complete example of how to use the debugger</dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_debugger_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CDebugger</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> CDebugger();</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> ~CDebugger();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register callbacks to handle to-string conversions of application types</span></div>
|
||||
<div class="line"> <span class="comment">// The expandMembersLevel is a counter for how many recursive levels the members should be expanded.</span></div>
|
||||
<div class="line"> <span class="comment">// If the object that is being converted to a string has members of its own the callback should call</span></div>
|
||||
<div class="line"> <span class="comment">// the debugger's ToString passing in expandMembersLevel - 1.</span></div>
|
||||
<div class="line"> <span class="keyword">typedef</span> std::string (*ToStringCallback)(<span class="keywordtype">void</span> *obj, <span class="keywordtype">int</span> expandMembersLevel, CDebugger *dbg);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> RegisterToStringCallback(<span class="keyword">const</span> <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *type, ToStringCallback callback);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// User interaction</span></div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> TakeCommands(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> Output(<span class="keyword">const</span> std::string &str);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Line callback invoked by context</span></div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> LineCallback(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Commands</span></div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> PrintHelp();</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddFileBreakPoint(<span class="keyword">const</span> std::string &file, <span class="keywordtype">int</span> lineNbr);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddFuncBreakPoint(<span class="keyword">const</span> std::string &func);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> ListBreakPoints();</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> ListLocalVariables(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> ListGlobalVariables(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> ListMemberProperties(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> ListStatistics(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> PrintCallstack(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> PrintValue(<span class="keyword">const</span> std::string &expr, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Helpers</span></div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> InterpretCommand(<span class="keyword">const</span> std::string &cmd, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> CheckBreakPoint(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> std::string ToString(<span class="keywordtype">void</span> *value, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> typeId, <span class="keywordtype">int</span> expandMembersLevel, <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Optionally set the engine pointer in the debugger so it can be retrieved</span></div>
|
||||
<div class="line"> <span class="comment">// by callbacks that need it. This will hold a reference to the engine.</span></div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetEngine(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *GetEngine();</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_debugger_2"></a>
|
||||
Example usage</h1>
|
||||
<div class="fragment"><div class="line">CDebugger dbg;</div>
|
||||
<div class="line"><span class="keywordtype">int</span> ExecuteWithDebug(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Tell the context to invoke the debugger's line callback</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">SetLineCallback</a>(<a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(CDebugger, LineCallback), &dbg, <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Allow the user to initialize the debugging before moving on</span></div>
|
||||
<div class="line"> dbg.TakeCommands(ctx);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Execute the script normally. If a breakpoint is reached the </span></div>
|
||||
<div class="line"> <span class="comment">// debugger will take over the control loop.</span></div>
|
||||
<div class="line"> <span class="keywordflow">return</span> ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e52894432737acac2e1a422e496bf84"><div class="ttname"><a href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">asIScriptContext::Execute</a></div><div class="ttdeci">virtual int Execute()=0</div><div class="ttdoc">Executes the prepared function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7345e6b3afabec24efd0ff77886d49a6"><div class="ttname"><a href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a></div><div class="ttdeci">#define asMETHOD(c, m)</div><div class="ttdoc">Returns an asSFuncPtr representing the class method specified by class and method name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:740</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ae2747f643bf9a07364f922c460ef57dd"><div class="ttname"><a href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">asIScriptContext::SetLineCallback</a></div><div class="ttdeci">virtual int SetLineCallback(asSFuncPtr callback, void *obj, int callConv)=0</div><div class="ttdoc">Sets a line callback function. The function will be called for each executed script statement.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a></div><div class="ttdeci">@ asCALL_THISCALL</div><div class="ttdoc">A thiscall class method.</div><div class="ttdef"><b>Definition:</b> angelscript.h:232</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
217
docs/manual/doc_addon_dict.html
Normal file
217
docs/manual/doc_addon_dict.html
Normal file
@@ -0,0 +1,217 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: dictionary object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_dict.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">dictionary object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptdictionary/</p>
|
||||
<p>The dictionary object maps string values to values or objects of other types.</p>
|
||||
<p>Register with <code>RegisterScriptDictionary(asIScriptEngine*)</code>.</p>
|
||||
<p>Compile the add-on with the pre-processor define AS_USE_STLNAMES=1 to register the methods with the same names as used by C++ STL where the methods have the same significance. Not all methods from STL is implemented in the add-on, but many of the most frequent once are so a port from script to C++ and vice versa might be easier if STL names are used.</p>
|
||||
<h1><a class="anchor" id="doc_addon_dict_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">typedef</span> std::string dictKey;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">class </span>CScriptDictionary</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Factory functions</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptDictionary *Create(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reference counting</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Perform a shallow copy of the other dictionary</span></div>
|
||||
<div class="line"> CScriptDictionary &operator=(<span class="keyword">const</span> CScriptDictionary &other);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Sets a key/value pair</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Set(<span class="keyword">const</span> dictKey &key, <span class="keywordtype">void</span> *value, <span class="keywordtype">int</span> typeId);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Set(<span class="keyword">const</span> dictKey &key, <a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> &value);</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Set(<span class="keyword">const</span> dictKey &key, <span class="keywordtype">double</span> &value);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Gets the stored value. Returns false if the value isn't compatible with informed type </span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Get(<span class="keyword">const</span> dictKey &key, <span class="keywordtype">void</span> *value, <span class="keywordtype">int</span> typeId) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Get(<span class="keyword">const</span> dictKey &key, <a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Get(<span class="keyword">const</span> dictKey &key, <span class="keywordtype">double</span> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Index accessors. If the dictionary is not const it inserts the value if it doesn't already exist</span></div>
|
||||
<div class="line"> <span class="comment">// If the dictionary is const then a script exception is set if it doesn't exist and a null pointer is returned</span></div>
|
||||
<div class="line"> CScriptDictValue *operator[](<span class="keyword">const</span> dictKey &key);</div>
|
||||
<div class="line"> <span class="keyword">const</span> CScriptDictValue *operator[](<span class="keyword">const</span> dictKey &key) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the type id of the stored value, or negative if it doesn't exist</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetTypeId(<span class="keyword">const</span> dictKey &key) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the key is set</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Exists(<span class="keyword">const</span> dictKey &key) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the dictionary is empty</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> IsEmpty() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the number of keys in the dictionary</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> GetSize() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Deletes the key</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Delete(<span class="keyword">const</span> dictKey &key);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Deletes all keys</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> DeleteAll();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get an array of all keys</span></div>
|
||||
<div class="line"> CScriptArray *GetKeys() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// STL style iterator</span></div>
|
||||
<div class="line"> <span class="keyword">class </span>CIterator</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> operator++(); <span class="comment">// Pre-increment</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> operator++(<span class="keywordtype">int</span>); <span class="comment">// Post-increment</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> CIterator &other) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> CIterator &other) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Accessors</span></div>
|
||||
<div class="line"> <span class="keyword">const</span> dictKey &GetKey() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> GetValue(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> GetValue(<span class="keywordtype">double</span> &value) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> GetValue(<span class="keywordtype">void</span> *value, <span class="keywordtype">int</span> typeId) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span> * GetAddressOfValue() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> };</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> CIterator begin() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> CIterator end() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> CIterator find(<span class="keyword">const</span> dictKey &key) <span class="keyword">const</span>;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_dict_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_datatypes_dictionary.html">Dictionaries in the script language</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_dict_3"></a>
|
||||
Example usage from C++</h1>
|
||||
<p>Here's a skeleton for iterating over the entries in the dictionary. For brevity the code doesn't show how to interpret the values, for more information on that see <a class="el" href="angelscript_8h.html#ae8c3a67a97321be53181e9ed396ad83a">asETypeIdFlags</a> and <a class="el" href="classas_i_script_engine.html#a55cc2d9592651538efcf79eb8106a867">asIScriptEngine::GetTypeInfoById</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> iterateDictionary(CScriptDictionary *dict)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Iterate over each entry</span></div>
|
||||
<div class="line"> <span class="keywordflow">for</span> (<span class="keyword">auto</span> it : *dict)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Determine the name of the key</span></div>
|
||||
<div class="line"> std::string keyName = it.GetKey();</div>
|
||||
<div class="line"> cout << <span class="stringliteral">"\""</span> << keyName << <span class="stringliteral">"\""</span> << <span class="stringliteral">" = "</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the type and address of the value</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> typeId = it.GetTypeId();</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span> *addressOfValue = it.GetAddressOfValue();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Cast the value to the correct C++ type according to the typeId and then print it</span></div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_aa8044b56ee56e2350b06f1e7207b43df"><div class="ttname"><a href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a></div><div class="ttdeci">__int64 asINT64</div><div class="ttdoc">64 bit integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:620</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
181
docs/manual/doc_addon_file.html
Normal file
181
docs/manual/doc_addon_file.html
Normal file
@@ -0,0 +1,181 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: file object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_file.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">file object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptfile/</p>
|
||||
<p>This object provides support for reading and writing files.</p>
|
||||
<p>Register with <code>RegisterScriptFile(asIScriptEngine*)</code>.</p>
|
||||
<p>If you do not want to provide write access for scripts then you can compile the add on with the define AS_WRITE_OPS 0, which will disable support for writing. This define can be made in the project settings or directly in the header.</p>
|
||||
<h1><a class="anchor" id="doc_addon_file_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptFile</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Constructor</span></div>
|
||||
<div class="line"> CScriptFile();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Memory management</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Opening and closing file handles</span></div>
|
||||
<div class="line"> <span class="comment">// mode = "r" -> open the file for reading</span></div>
|
||||
<div class="line"> <span class="comment">// mode = "w" -> open the file for writing (overwrites existing files)</span></div>
|
||||
<div class="line"> <span class="comment">// mode = "a" -> open the file for appending</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Open(<span class="keyword">const</span> std::string &filename, <span class="keyword">const</span> std::string &mode);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Close();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the size of the file</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetSize() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the end of the file has been reached</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> IsEOF() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads a specified number of bytes into the string</span></div>
|
||||
<div class="line"> std::string ReadString(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads to the next new-line character</span></div>
|
||||
<div class="line"> std::string ReadLine();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads a signed integer</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> ReadInt(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> bytes);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads an unsigned integer</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a> ReadUInt(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> bytes);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads a float</span></div>
|
||||
<div class="line"> <span class="keywordtype">float</span> ReadFloat();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reads a double</span></div>
|
||||
<div class="line"> <span class="keywordtype">double</span> ReadDouble();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Writes a string to the file</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> WriteString(<span class="keyword">const</span> std::string &str);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> WriteInt(<a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> v, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> bytes);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> WriteUInt(<a class="code" href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a> v, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> bytes);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> WriteFloat(<span class="keywordtype">float</span> v);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> WriteDouble(<span class="keywordtype">double</span> v);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// File cursor manipulation</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetPos() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> SetPos(<span class="keywordtype">int</span> pos);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> MovePos(<span class="keywordtype">int</span> delta);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determines the byte order of the binary values (default: false)</span></div>
|
||||
<div class="line"> <span class="comment">// Big-endian = most significant byte first</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> mostSignificantByteFirst;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_file_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_file.html">file</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_aa8044b56ee56e2350b06f1e7207b43df"><div class="ttname"><a href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a></div><div class="ttdeci">__int64 asINT64</div><div class="ttdoc">64 bit integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:620</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a10aea5de212e440ffd6ec8fc0b17563d"><div class="ttname"><a href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a></div><div class="ttdeci">unsigned __int64 asQWORD</div><div class="ttdoc">64 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:619</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
170
docs/manual/doc_addon_filesystem.html
Normal file
170
docs/manual/doc_addon_filesystem.html
Normal file
@@ -0,0 +1,170 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: filesystem object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_filesystem.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">filesystem object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptfile/</p>
|
||||
<p>This object provides support for inspecting directories on the filesystem.</p>
|
||||
<p>Register with <code>RegisterScriptFileSystem(asIScriptEngine*)</code>.</p>
|
||||
<h1><a class="anchor" id="doc_addon_filesystem_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptFileSystem</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> CScriptFileSystem();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Sets the current path that should be used in other calls when using relative paths</span></div>
|
||||
<div class="line"> <span class="comment">// It can use relative paths too, so moving up a directory is used by passing in ".."</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> ChangeCurrentPath(<span class="keyword">const</span> std::string &path);</div>
|
||||
<div class="line"> std::string GetCurrentPath() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the path is a directory. Input can be either a full path or a relative path.</span></div>
|
||||
<div class="line"> <span class="comment">// This method does not return the dirs '.' and '..'</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> IsDir(<span class="keyword">const</span> std::string &path) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the path is a link. Input can be either a full path or a relative path</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> IsLink(<span class="keyword">const</span> std::string &path) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the size of file. Input can be either a full path or a relative path</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a> GetSize(<span class="keyword">const</span> std::string &path) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns a list of the files in the current path</span></div>
|
||||
<div class="line"> CScriptArray *GetFiles() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns a list of the directories in the current path</span></div>
|
||||
<div class="line"> CScriptArray *GetDirs() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Creates a new directory. Returns 0 on success</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> MakeDir(<span class="keyword">const</span> std::string &path);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Removes a directory. Will only remove the directory if it is empty. Returns 0 on success</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> RemoveDir(<span class="keyword">const</span> std::string &path);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Deletes a file. Returns 0 on success</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> DeleteFile(<span class="keyword">const</span> std::string &path);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copies a file. Returns 0 on success</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> CopyFile(<span class="keyword">const</span> std::string &source, <span class="keyword">const</span> std::string &target);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Moves or renames a file or directory. Returns 0 on success</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Move(<span class="keyword">const</span> std::string &source, <span class="keyword">const</span> std::string &target);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Gets the date and time of the file/dir creation</span></div>
|
||||
<div class="line"> CDateTime GetCreateDateTime(<span class="keyword">const</span> std::string &path) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Gets the date and time of the file/dir modification</span></div>
|
||||
<div class="line"> CDateTime GetModifyDateTime(<span class="keyword">const</span> std::string &path) <span class="keyword">const</span>; </div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_filesystem_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_filesystem.html">filesystem</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_aa8044b56ee56e2350b06f1e7207b43df"><div class="ttname"><a href="angelscript_8h.html#aa8044b56ee56e2350b06f1e7207b43df">asINT64</a></div><div class="ttdeci">__int64 asINT64</div><div class="ttdoc">64 bit integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:620</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
198
docs/manual/doc_addon_grid.html
Normal file
198
docs/manual/doc_addon_grid.html
Normal file
@@ -0,0 +1,198 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: grid template object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_grid.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">grid template object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptgrid/</p>
|
||||
<p>The <code>grid</code> type is a <a class="el" href="doc_adv_template.html">template object</a> that allow the scripts to declare 2D grids of any type. In many ways it is similar to the <a class="el" href="doc_addon_array.html">array template object</a>, but it is specialized for use with areas.</p>
|
||||
<p>The type is registered with <code>RegisterScriptGrid(asIScriptEngine *engine)</code>.</p>
|
||||
<h1><a class="anchor" id="doc_addon_grid_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptGrid</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Set the memory functions that should be used by all CScriptGrids</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> <span class="keywordtype">void</span> SetMemoryFunctions(<a class="code" href="angelscript_8h.html#ac69a827822c73771cd972bff270cefc7">asALLOCFUNC_t</a> allocFunc, <a class="code" href="angelscript_8h.html#adeecc934971e695fc4441a47694860fb">asFREEFUNC_t</a> freeFunc);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Factory functions</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptGrid *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *gridType);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptGrid *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *gridType, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> width, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> height);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptGrid *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *gridType, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> width, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> height, <span class="keywordtype">void</span> *defaultValue);</div>
|
||||
<div class="line"> <span class="keyword">static</span> CScriptGrid *Create(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *gridType, <span class="keywordtype">void</span> *listBuffer);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Memory management</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Type information</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *GetGridObjectType() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetGridTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetElementTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Size</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> GetWidth() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> GetHeight() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Resize(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> width, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> height);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get a pointer to an element. Returns 0 if out of bounds</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *At(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> x, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> y);</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">void</span> *At(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> x, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> y) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set value of an element. </span></div>
|
||||
<div class="line"> <span class="comment">// The value arg should be a pointer to the value that will be copied to the element.</span></div>
|
||||
<div class="line"> <span class="comment">// Remember, if the grid holds handles the value parameter should be the </span></div>
|
||||
<div class="line"> <span class="comment">// address of the handle. The refCount of the object will also be incremented</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> SetValue(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> x, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> y, <span class="keywordtype">void</span> *value);</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_grid_2"></a>
|
||||
Public script interface</h1>
|
||||
<pre>
|
||||
class grid<T>
|
||||
{
|
||||
grid();
|
||||
grid(uint width, uint height);
|
||||
grid(uint width, uint height, const T &in fillValue);</pre><pre> uint width() const;
|
||||
uint height() const;
|
||||
void resize(uint w, uint h);</pre><pre> T &opIndex(uint x, uint y);
|
||||
const T &opIndex(uint x, uint y) const;
|
||||
}
|
||||
</pre><p><b>grid()</b><br />
|
||||
<b>grid(uint width, uint height)</b><br />
|
||||
<b>grid(uint width, height, const T &in fillValue)</b><br />
|
||||
</p>
|
||||
<p>The constructors initializes the grid object. The default constructor will create an zero sized grid.</p>
|
||||
<p><b>uint width() const</b><br />
|
||||
<b>uint height() const</b><br />
|
||||
</p>
|
||||
<p>Returns the width and height of the grid.</p>
|
||||
<p><b>void resize(uint w, uint h)</b></p>
|
||||
<p>Resizes the grid to the new dimension. The elements that still fit in the grid will keep their values.</p>
|
||||
<p><b>T &opIndex(uint x, uint y)</b><br />
|
||||
<b>const T &opIndex(uint x, uint y) const</b><br />
|
||||
</p>
|
||||
<p>The index operator returns a reference to one of the elements. If the index is out of bounds a script exception will be raised.</p>
|
||||
<h1><a class="anchor" id="doc_addon_grid_3"></a>
|
||||
Example usage in script</h1>
|
||||
<pre>
|
||||
// Initialize a 5x5 map
|
||||
grid<int> map = {{1,0,1,1,1},
|
||||
{0,0,1,0,0},
|
||||
{0,1,1,0,1},
|
||||
{0,1,1,0,1},
|
||||
{0,0,0,0,1}};</pre><pre> // A function to verify if the next area is walkable
|
||||
bool canWalk(uint x, uint y)
|
||||
{
|
||||
// If the map in the destination is
|
||||
// clear, it is possible to wark there
|
||||
return map[x,y] == 0;
|
||||
}
|
||||
</pre> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_adeecc934971e695fc4441a47694860fb"><div class="ttname"><a href="angelscript_8h.html#adeecc934971e695fc4441a47694860fb">asFREEFUNC_t</a></div><div class="ttdeci">void(* asFREEFUNC_t)(void *)</div><div class="ttdoc">The function signature for the custom memory deallocation function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:637</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac69a827822c73771cd972bff270cefc7"><div class="ttname"><a href="angelscript_8h.html#ac69a827822c73771cd972bff270cefc7">asALLOCFUNC_t</a></div><div class="ttdeci">void *(* asALLOCFUNC_t)(size_t)</div><div class="ttdoc">The function signature for the custom memory allocation function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:635</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
175
docs/manual/doc_addon_handle.html
Normal file
175
docs/manual/doc_addon_handle.html
Normal file
@@ -0,0 +1,175 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: ref object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_handle.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">ref object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scripthandle/</p>
|
||||
<p>The <code>ref</code> type is a generic container that can hold any handle. It is a value type, but behaves very much like an object handle.</p>
|
||||
<p>The type is registered with <code>RegisterScriptHandle(asIScriptEngine*)</code>.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_generic_handle.html">Registering a generic handle type</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_handle_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptHandle </div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Constructors</span></div>
|
||||
<div class="line"> CScriptHandle();</div>
|
||||
<div class="line"> CScriptHandle(<span class="keyword">const</span> CScriptHandle &other);</div>
|
||||
<div class="line"> CScriptHandle(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> typeId);</div>
|
||||
<div class="line"> ~CScriptHandle();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copy the stored reference from another handle object</span></div>
|
||||
<div class="line"> CScriptHandle &operator=(<span class="keyword">const</span> CScriptHandle &other);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set the reference</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Set(<span class="keywordtype">void</span> *ref, <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *type);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Compare equalness</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> CScriptHandle &o) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> CScriptHandle &o) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> opEquals(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> typeId) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Dynamic cast to desired handle type</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Cast(<span class="keywordtype">void</span> **outRef, <span class="keywordtype">int</span> typeId);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the type of the reference held</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *GetType() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> GetTypeId() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the reference</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *GetRef();</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_handle_3"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_datatypes_ref.html">ref in the script language</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_handle_4"></a>
|
||||
Example usage from C++</h1>
|
||||
<p>Even though the CScriptHandle is a value type, when registering properties of its type they should be registered as handles. The same goes for function arguments and return types.</p>
|
||||
<div class="fragment"><div class="line">CScriptHandle g_handle;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> Function(CScriptHandle handle)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> ... use the methods of CScriptHandle to determine the <span class="keyword">true</span> <span class="keywordtype">object</span> held in it</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> Register(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#aacd32f32b2922b8ffaed204812013169">RegisterGlobalProperty</a>(<span class="stringliteral">"ref @g_handle"</span>, &g_handle); assert( r >= 0 );</div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void Function(ref @)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(Function), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>To set an object pointer in the handle from the application, you'll use the Set() method passing a pointer to the object and the type of the object.</p>
|
||||
<p>To retrieve an object pointer from the application you'll use the Cast() method passing in a pointer to the pointer and the wanted type id. If the type id given doesn't match the stored handle the returned pointer will be null.</p>
|
||||
<p>To retrieve an object of an unknown type use the GetType() or GetTypeId() to determine the type stored in the handle, then use the Cast() method. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_aacd32f32b2922b8ffaed204812013169"><div class="ttname"><a href="classas_i_script_engine.html#aacd32f32b2922b8ffaed204812013169">asIScriptEngine::RegisterGlobalProperty</a></div><div class="ttdeci">virtual int RegisterGlobalProperty(const char *declaration, void *pointer)=0</div><div class="ttdoc">Registers a global property.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
187
docs/manual/doc_addon_helpers.html
Normal file
187
docs/manual/doc_addon_helpers.html
Normal file
@@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Helper functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_helpers.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Helper functions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scripthelper/</p>
|
||||
<p>These helper functions simplify the implementation of common tasks. They can be used as is or can serve as the starting point for your own framework.</p>
|
||||
<h1><a class="anchor" id="doc_addon_helpers_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Compare relation between two objects of the same type.</span></div>
|
||||
<div class="line"><span class="comment">// Uses the object's opCmp method to perform the comparison.</span></div>
|
||||
<div class="line"><span class="comment">// Returns a negative value if the comparison couldn't be performed.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> CompareRelation(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keywordtype">void</span> *leftObj, <span class="keywordtype">void</span> *rightObj, <span class="keywordtype">int</span> typeId, <span class="keywordtype">int</span> &result);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Compare equality between two objects of the same type.</span></div>
|
||||
<div class="line"><span class="comment">// Uses the object's opEquals method to perform the comparison, or if that doesn't exist the opCmp method.</span></div>
|
||||
<div class="line"><span class="comment">// Returns a negative value if the comparison couldn't be performed.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> CompareEquality(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keywordtype">void</span> *leftObj, <span class="keywordtype">void</span> *rightObj, <span class="keywordtype">int</span> typeId, <span class="keywordtype">bool</span> &result);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Compile and execute simple statements.</span></div>
|
||||
<div class="line"><span class="comment">// The module is optional. If given the statements can access the entities compiled in the module.</span></div>
|
||||
<div class="line"><span class="comment">// The caller can optionally provide its own context, for example if a context should be reused.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> ExecuteString(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *code, <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod = 0, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = 0);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Compile and execute simple statements with option of return value.</span></div>
|
||||
<div class="line"><span class="comment">// The module is optional. If given the statements can access the entitites compiled in the module.</span></div>
|
||||
<div class="line"><span class="comment">// The caller can optionally provide its own context, for example if a context should be reused.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> ExecuteString(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *code, <span class="keywordtype">void</span> *ret, <span class="keywordtype">int</span> retTypeId, <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod = 0, <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = 0);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Format the details of the script exception into a human readable text.</span></div>
|
||||
<div class="line"><span class="comment">// Whenever the asIScriptContext::Execute method returns asEXECUTION_EXCEPTION, the application </span></div>
|
||||
<div class="line"><span class="comment">// can call this function to get more information about that exception in a human readable form.</span></div>
|
||||
<div class="line"><span class="comment">// The information obtained includes the current function, the script source section, </span></div>
|
||||
<div class="line"><span class="comment">// program position in the source section, and the exception description itself.</span></div>
|
||||
<div class="line">std::string GetExceptionInfo(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx, <span class="keywordtype">bool</span> showStack = <span class="keyword">false</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Write registered application interface to file.</span></div>
|
||||
<div class="line"><span class="comment">// This function creates a file with the configuration for the offline compiler, asbuild, in the samples.</span></div>
|
||||
<div class="line"><span class="comment">// If you wish to use the offline compiler you should call this function from you application after the </span></div>
|
||||
<div class="line"><span class="comment">// application interface has been fully registered. This way you will not have to create the configuration</span></div>
|
||||
<div class="line"><span class="comment">// file manually.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> WriteConfigToFile(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *filename);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Write the registered application interface to a text stream. </span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> WriteConfigToStream(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, std::ostream &strm); </div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Loads an interface from a text stream and configures the engine with it. This will not </span></div>
|
||||
<div class="line"><span class="comment">// set the correct function pointers, so it is not possible to use this engine to execute</span></div>
|
||||
<div class="line"><span class="comment">// scripts, but it can be used to compile scripts and save the byte code.</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> ConfigEngineFromStream(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, std::istream &strm, <span class="keyword">const</span> <span class="keywordtype">char</span> *nameOfStream = <span class="stringliteral">"config"</span>, <a class="code" href="classas_i_string_factory.html">asIStringFactory</a> *stringFactory = 0);</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_helpers_2"></a>
|
||||
Example</h1>
|
||||
<p>To compare two script objects the application can execute the following code:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> Compare(<a class="code" href="classas_i_script_object.html">asIScriptObject</a> *a, <a class="code" href="classas_i_script_object.html">asIScriptObject</a> *b)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine = a-><a class="code" href="classas_i_script_object.html#a5dda2d380ae1580e15ddf9d95893c57a">GetEngine</a>();</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> typeId = a-><a class="code" href="classas_i_script_object.html#a19c5ab9d8adb0f921bf0b6474d97f468">GetTypeId</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> cmp;</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r = CompareRelation(engine, a, b, typeId, cmp);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( r < 0 )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> cout << <span class="stringliteral">"The relation between a and b cannot be established b"</span> << endl;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( cmp < 0 )</div>
|
||||
<div class="line"> cout << <span class="stringliteral">"a is smaller than b"</span> << endl;</div>
|
||||
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>( cmp == 0 )</div>
|
||||
<div class="line"> cout << <span class="stringliteral">"a is equal to b"</span> << endl;</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> cout << <span class="stringliteral">"a is greater than b"</span> << endl;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html_a5dda2d380ae1580e15ddf9d95893c57a"><div class="ttname"><a href="classas_i_script_object.html#a5dda2d380ae1580e15ddf9d95893c57a">asIScriptObject::GetEngine</a></div><div class="ttdeci">virtual asIScriptEngine * GetEngine() const =0</div><div class="ttdoc">Return the script engine.</div></div>
|
||||
<div class="ttc" id="aclassas_i_string_factory_html"><div class="ttname"><a href="classas_i_string_factory.html">asIStringFactory</a></div><div class="ttdoc">The interface for the string factory.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2150</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html_a19c5ab9d8adb0f921bf0b6474d97f468"><div class="ttname"><a href="classas_i_script_object.html#a19c5ab9d8adb0f921bf0b6474d97f468">asIScriptObject::GetTypeId</a></div><div class="ttdeci">virtual int GetTypeId() const =0</div><div class="ttdoc">Returns the type id of the object.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html"><div class="ttname"><a href="classas_i_script_object.html">asIScriptObject</a></div><div class="ttdoc">The interface for an instance of a script object.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3413</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
123
docs/manual/doc_addon_helpers_try.html
Normal file
123
docs/manual/doc_addon_helpers_try.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Exception routines</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_helpers_try.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Exception routines </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scripthelper/</p>
|
||||
<p>The exception handling routines are registered by the application with a call to RegisterExceptionRoutines.</p>
|
||||
<h1><a class="anchor" id="doc_addon_helpers_try_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register the exception routines.</span></div>
|
||||
<div class="line"><span class="comment">// 'void throw(const string &msg)'</span></div>
|
||||
<div class="line"><span class="comment">// 'string getExceptionInfo()'</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> RegisterExceptionRoutines(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine);</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_add_helpers_try_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_exception.html">Exception handling</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
211
docs/manual/doc_addon_math.html
Normal file
211
docs/manual/doc_addon_math.html
Normal file
@@ -0,0 +1,211 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: math functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_math.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">math functions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptmath/</p>
|
||||
<p>This add-on registers the math functions from the standard C runtime library with the script engine. Use <code>RegisterScriptMath(asIScriptEngine*)</code> to perform the registration.</p>
|
||||
<p>By defining the preprocessor word AS_USE_FLOAT=0, the functions will be registered to take and return doubles instead of floats.</p>
|
||||
<p>The function <code>RegisterScriptMathComplex(asIScriptEngine*)</code> registers a type that represents a complex number, i.e. a number with real and imaginary parts.</p>
|
||||
<h1><a class="anchor" id="doc_addon_math_1"></a>
|
||||
Public script interface</h1>
|
||||
<pre>
|
||||
// Trigonometric functions
|
||||
float cos(float rad);
|
||||
float sin(float rad);
|
||||
float tan(float rad);</pre><pre> // Inverse trigonometric functions
|
||||
float acos(float val);
|
||||
float asin(float val);
|
||||
float atan(float val);
|
||||
float atan2(float y, float x);</pre><pre> // Hyperbolic functions
|
||||
float cosh(float rad);
|
||||
float sinh(float rad);
|
||||
float tanh(float rad);</pre><pre> // Logarithmic functions
|
||||
float log(float val);
|
||||
float log10(float val);</pre><pre> // Power to
|
||||
float pow(float val, float exp);</pre><pre> // Square root
|
||||
float sqrt(float val);</pre><pre> // Absolute value
|
||||
float abs(float val);</pre><pre> // Ceil and floor functions
|
||||
float ceil(float val);
|
||||
float floor(float val);</pre><pre> // Returns the fraction
|
||||
float fraction(float val);</pre><pre> // Approximate float comparison, to deal with numeric imprecision
|
||||
bool closeTo(float a, float b, float epsilon = 0.00001f);
|
||||
bool closeTo(double a, double b, double epsilon = 0.0000000001);</pre><pre> // Conversion between floating point and IEEE 754 representations
|
||||
float fpFromIEEE(uint raw);
|
||||
double fpFromIEEE(uint64 raw);
|
||||
uint fpToIEEE(float fp);
|
||||
uint64 fpToIEEE(double fp);
|
||||
</pre><h2><a class="anchor" id="doc_addon_math_funcs"></a>
|
||||
Functions</h2>
|
||||
<p><b>cos, sin, tan</b></p>
|
||||
<p>Calculates the trigonometric functions cosine, sine, and tangent. The input angle should be given in radian.</p>
|
||||
<p><b>acos, asin, atan</b></p>
|
||||
<p>Calculates the inverse of the trigonometric functions cosine, sine, and tangent. The returned angle is given in radian.</p>
|
||||
<p><b>atan2</b></p>
|
||||
<p>Calculates the inverse of the trigonometric function tangent. The input is the y and x proportions. The returned angle is given in radian.</p>
|
||||
<p><b>cosh, sinh, tanh</b></p>
|
||||
<p>Calculates the hyperbolic of the cosine, sine, and tangent. The input angle should be given in radian.</p>
|
||||
<p><b>log, log10</b></p>
|
||||
<p>Calculates the logarithm of the input value. log is the natural logarithm and log10 is the base-10 logarithm.</p>
|
||||
<p><b>pow</b></p>
|
||||
<p>Calculates the based raised to the power of exponent.</p>
|
||||
<p><b>sqrt</b></p>
|
||||
<p>Calculates the square root of the value.</p>
|
||||
<p><b>abs</b></p>
|
||||
<p>Returns the absolute value.</p>
|
||||
<p><b>ceil, floor</b></p>
|
||||
<p>ceil returns the closest integer number that is higher or equal to the input. Floor returns the closest integer number that is lower or equal to the input.</p>
|
||||
<p><b>fraction</b></p>
|
||||
<p>Returns the fraction of the number, i.e. what remains after taking away the integral number.</p>
|
||||
<p><b>closeTo</b></p>
|
||||
<p>Due to numerical errors with the binary representation of real numbers it is often difficult to do direct comparisons of two float values. The closeTo function will return true of the two values are almost equal, allowing for a small difference up to the size of the epsilon value.</p>
|
||||
<p><b>fpFromIEEE, fpToIEEE</b></p>
|
||||
<p>Translates the float to and from IEEE 754 representation. This can be used if one wishes to directly inspect or manipulate the floating point value in the binary representation.</p>
|
||||
<h2><a class="anchor" id="doc_addon_math_complex"></a>
|
||||
The complex type</h2>
|
||||
<pre>
|
||||
// This type represents a complex number with real and imaginary parts
|
||||
class complex
|
||||
{
|
||||
// Constructors
|
||||
complex();
|
||||
complex(const complex &in);
|
||||
complex(float r);
|
||||
complex(float r, float i);</pre><pre> // Equality operator
|
||||
bool opEquals(const complex &in) const;</pre><pre> // Compound assignment operators
|
||||
complex &opAddAssign(const complex &in);
|
||||
complex &opSubAssign(const complex &in);
|
||||
complex &opMulAssign(const complex &in);
|
||||
complex &opDivAssign(const complex &in);</pre><pre> // Math operators
|
||||
complex opAdd(const complex &in) const;
|
||||
complex opSub(const complex &in) const;
|
||||
complex opMul(const complex &in) const;
|
||||
complex opDiv(const complex &in) const;</pre><pre> // Returns the absolute value (magnitude)
|
||||
float abs() const;</pre><pre> // Swizzle operators
|
||||
complex get_ri() const;
|
||||
void set_ri(const complex &in);
|
||||
complex get_ir() const;
|
||||
void set_ir(const complex &in);</pre><pre> // The real and imaginary parts
|
||||
float r;
|
||||
float i;
|
||||
}
|
||||
</pre><p><b>complex</b></p>
|
||||
<p>The constructors allow for implicit construction, making a copy, implicit conversion from float, and explicit initialization from two float values.</p>
|
||||
<p><b>=, !=</b></p>
|
||||
<p>Compares two complex values.</p>
|
||||
<p><b>=, +=, -=, *=, /=</b></p>
|
||||
<p>Assign and compound assignment of complex values.</p>
|
||||
<p><b>+, -, *, /</b></p>
|
||||
<p>Math operators on complex values.</p>
|
||||
<p><b>abs</b></p>
|
||||
<p>Returns the absolute (magnitude) of the complex value.</p>
|
||||
<p><b>r, i</b></p>
|
||||
<p>Retrieves the real and imaginary part of the complex value.</p>
|
||||
<p><b>ri, ir</b></p>
|
||||
<p>Swizzle operators return a complex value with the ordering of the real and imaginary parts as indicated by the name. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
125
docs/manual/doc_addon_script.html
Normal file
125
docs/manual/doc_addon_script.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Script extensions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_script.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Script extensions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><ul>
|
||||
<li><a class="el" href="doc_addon_std_string.html">string object</a></li>
|
||||
<li><a class="el" href="doc_addon_array.html">array template object</a></li>
|
||||
<li><a class="el" href="doc_addon_any.html">any object</a></li>
|
||||
<li><a class="el" href="doc_addon_handle.html">ref object</a></li>
|
||||
<li><a class="el" href="doc_addon_weakref.html">weakref object</a></li>
|
||||
<li><a class="el" href="doc_addon_dict.html">dictionary object</a></li>
|
||||
<li><a class="el" href="doc_addon_file.html">file object</a></li>
|
||||
<li><a class="el" href="doc_addon_filesystem.html">filesystem object</a></li>
|
||||
<li><a class="el" href="doc_addon_math.html">math functions</a></li>
|
||||
<li><a class="el" href="doc_addon_grid.html">grid template object</a></li>
|
||||
<li><a class="el" href="doc_addon_datetime.html">datetime object</a></li>
|
||||
<li><a class="el" href="doc_addon_helpers_try.html">Exception routines</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
58
docs/manual/doc_addon_script.js
Normal file
58
docs/manual/doc_addon_script.js
Normal file
@@ -0,0 +1,58 @@
|
||||
var doc_addon_script =
|
||||
[
|
||||
[ "string object", "doc_addon_std_string.html", [
|
||||
[ "Public C++ interface", "doc_addon_std_string.html#doc_addon_std_string_1", null ],
|
||||
[ "Public script interface", "doc_addon_std_string.html#doc_addon_std_string_2", null ]
|
||||
] ],
|
||||
[ "array template object", "doc_addon_array.html", [
|
||||
[ "Public C++ interface", "doc_addon_array.html#doc_addon_array_1", null ],
|
||||
[ "Public script interface", "doc_addon_array.html#doc_addon_array_2", null ],
|
||||
[ "C++ example", "doc_addon_array.html#doc_addon_array_4", null ]
|
||||
] ],
|
||||
[ "any object", "doc_addon_any.html", [
|
||||
[ "Public C++ interface", "doc_addon_any.html#doc_addon_any_1", null ],
|
||||
[ "Public script interface", "doc_addon_any.html#doc_addon_any_2", null ],
|
||||
[ "Example usage", "doc_addon_any.html#doc_addon_any_3", null ]
|
||||
] ],
|
||||
[ "ref object", "doc_addon_handle.html", [
|
||||
[ "Public C++ interface", "doc_addon_handle.html#doc_addon_handle_1", null ],
|
||||
[ "Public script interface", "doc_addon_handle.html#doc_addon_handle_3", null ],
|
||||
[ "Example usage from C++", "doc_addon_handle.html#doc_addon_handle_4", null ]
|
||||
] ],
|
||||
[ "weakref object", "doc_addon_weakref.html", [
|
||||
[ "Public C++ interface", "doc_addon_weakref.html#doc_addon_weakref_1", null ],
|
||||
[ "Public script interface", "doc_addon_weakref.html#doc_addon_weakref_2", null ]
|
||||
] ],
|
||||
[ "dictionary object", "doc_addon_dict.html", [
|
||||
[ "Public C++ interface", "doc_addon_dict.html#doc_addon_dict_1", null ],
|
||||
[ "Public script interface", "doc_addon_dict.html#doc_addon_dict_2", null ],
|
||||
[ "Example usage from C++", "doc_addon_dict.html#doc_addon_dict_3", null ]
|
||||
] ],
|
||||
[ "file object", "doc_addon_file.html", [
|
||||
[ "Public C++ interface", "doc_addon_file.html#doc_addon_file_1", null ],
|
||||
[ "Public script interface", "doc_addon_file.html#doc_addon_file_2", null ]
|
||||
] ],
|
||||
[ "filesystem object", "doc_addon_filesystem.html", [
|
||||
[ "Public C++ interface", "doc_addon_filesystem.html#doc_addon_filesystem_1", null ],
|
||||
[ "Public script interface", "doc_addon_filesystem.html#doc_addon_filesystem_2", null ]
|
||||
] ],
|
||||
[ "math functions", "doc_addon_math.html", [
|
||||
[ "Public script interface", "doc_addon_math.html#doc_addon_math_1", [
|
||||
[ "Functions", "doc_addon_math.html#doc_addon_math_funcs", null ],
|
||||
[ "The complex type", "doc_addon_math.html#doc_addon_math_complex", null ]
|
||||
] ]
|
||||
] ],
|
||||
[ "grid template object", "doc_addon_grid.html", [
|
||||
[ "Public C++ interface", "doc_addon_grid.html#doc_addon_grid_1", null ],
|
||||
[ "Public script interface", "doc_addon_grid.html#doc_addon_grid_2", null ],
|
||||
[ "Example usage in script", "doc_addon_grid.html#doc_addon_grid_3", null ]
|
||||
] ],
|
||||
[ "datetime object", "doc_addon_datetime.html", [
|
||||
[ "Public C++ interface", "doc_addon_datetime.html#doc_addon_datetime_1", null ],
|
||||
[ "Public script interface", "doc_addon_datetime.html#doc_addon_datetime_2", null ]
|
||||
] ],
|
||||
[ "Exception routines", "doc_addon_helpers_try.html", [
|
||||
[ "Public C++ interface", "doc_addon_helpers_try.html#doc_addon_helpers_try_1", null ],
|
||||
[ "Public script interface", "doc_addon_helpers_try.html#doc_add_helpers_try_2", null ]
|
||||
] ]
|
||||
];
|
||||
217
docs/manual/doc_addon_serializer.html
Normal file
217
docs/manual/doc_addon_serializer.html
Normal file
@@ -0,0 +1,217 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Serializer</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_serializer.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Serializer </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/serializer/</p>
|
||||
<p>The <code>CSerializer</code> implements support for serializing the values of global variables in a module, for example in order to reload a slightly modified version of the script without reinitializing everything. It will resolve primitives and script classes automatically, including references and handles. For application registered types, the application needs to implement callback objects to show how these should be serialized.</p>
|
||||
<p>The implementation currently has some limitations:</p>
|
||||
<ul>
|
||||
<li>It can only serialize to memory, i.e. it is not possible to save the values to a file.</li>
|
||||
<li>If the variables changed type when restoring, the serializer cannot restore the value.</li>
|
||||
<li>The serializer will attempt to backup all objects, but in some cases an application may not want to backup the actual object, but only a reference to it, e.g. an internal application object referenced by the script. Currently there is no way of telling the serializer to do differently in this case.</li>
|
||||
<li>If the module holds references to objects from another module it will probably fail in restoring the values.</li>
|
||||
</ul>
|
||||
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Show how to serialize extra objects too. And explain about memory management for restored objects</dd></dl>
|
||||
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Explain that handles to registered types without factories will be kept as-is</dd></dl>
|
||||
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Registered pod-types do not need a special user type as the serializer will simply keep a bitwise copy</dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_serializer_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CSerializer</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> CSerializer();</div>
|
||||
<div class="line"> ~CSerializer();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Add implementation for serializing user types</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddUserType(CUserType *ref, <span class="keyword">const</span> std::string &name);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Store all global variables in the module</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Store(<a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Restore all global variables after reloading script</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> Restore(<a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Store extra objects that are not seen from the module's global variables</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddExtraObjectToStore(<a class="code" href="classas_i_script_object.html">asIScriptObject</a> *<span class="keywordtype">object</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Return new pointer to restored object</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *GetPointerToRestoredObject(<span class="keywordtype">void</span> *originalObject);</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_serializer_2"></a>
|
||||
Example usage</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">struct </span>CStringType;</div>
|
||||
<div class="line"><span class="keyword">struct </span>CArrayType;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> RecompileModule(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">string</span> modName = mod-><a class="code" href="classas_i_script_module.html#a4967db3ed89836ac2f3b529c499d473d">GetName</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Tell the serializer how the user types should be serialized</span></div>
|
||||
<div class="line"> <span class="comment">// by adding the implementations of the CUserType interface</span></div>
|
||||
<div class="line"> CSerializer backup;</div>
|
||||
<div class="line"> backup.AddUserType(<span class="keyword">new</span> CStringType(), <span class="stringliteral">"string"</span>);</div>
|
||||
<div class="line"> backup.AddUserType(<span class="keyword">new</span> CArrayType(), <span class="stringliteral">"array"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Backup the values of the global variables</span></div>
|
||||
<div class="line"> backup.Store(mod);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Application can now recompile the module</span></div>
|
||||
<div class="line"> CompileModule(modName);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Restore the values of the global variables in the new module</span></div>
|
||||
<div class="line"> mod = engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(modName.c_str(), <a class="code" href="angelscript_8h.html#ae4cf50de5273eb8c03c6e91e6e014f0ca2feb963eb04c221e251867bc3a93d79d">asGM_ONLY_IF_EXISTS</a>);</div>
|
||||
<div class="line"> backup.Restore(mod);</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// This serializes the std::string type</span></div>
|
||||
<div class="line"><span class="keyword">struct </span>CStringType : <span class="keyword">public</span> CUserType</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Store(CSerializedValue *val, <span class="keywordtype">void</span> *ptr)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> val->SetUserData(<span class="keyword">new</span> std::string(*(std::string*)ptr));</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Restore(CSerializedValue *val, <span class="keywordtype">void</span> *ptr)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> std::string *buffer = (std::string*)val->GetUserData();</div>
|
||||
<div class="line"> *(std::string*)ptr = *buffer;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> CleanupUserData(CSerializedValue *val)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> std::string *buffer = (std::string*)val->GetUserData();</div>
|
||||
<div class="line"> <span class="keyword">delete</span> buffer;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">};</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// This serializes the CScriptArray type</span></div>
|
||||
<div class="line"><span class="keyword">struct </span>CArrayType : <span class="keyword">public</span> CUserType</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Store(CSerializedValue *val, <span class="keywordtype">void</span> *ptr)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> CScriptArray *arr = (CScriptArray*)ptr;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < arr->GetSize(); i++ )</div>
|
||||
<div class="line"> val->m_children.push_back(<span class="keyword">new</span> CSerializedValue(val ,<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, arr->At(i), arr->GetElementTypeId()));</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Restore(CSerializedValue *val, <span class="keywordtype">void</span> *ptr)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> CScriptArray *arr = (CScriptArray*)ptr;</div>
|
||||
<div class="line"> arr->Resize(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>(val->m_children.size()));</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <span class="keywordtype">size_t</span> i = 0; i < val->m_children.size(); ++i )</div>
|
||||
<div class="line"> val->m_children[i]->Restore(arr->At(<a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a>(i)), arr->GetElementTypeId());</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ae4cf50de5273eb8c03c6e91e6e014f0ca2feb963eb04c221e251867bc3a93d79d"><div class="ttname"><a href="angelscript_8h.html#ae4cf50de5273eb8c03c6e91e6e014f0ca2feb963eb04c221e251867bc3a93d79d">asGM_ONLY_IF_EXISTS</a></div><div class="ttdeci">@ asGM_ONLY_IF_EXISTS</div><div class="ttdoc">Don't return any module if it is not found.</div><div class="ttdef"><b>Definition:</b> angelscript.h:524</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html"><div class="ttname"><a href="classas_i_script_object.html">asIScriptObject</a></div><div class="ttdoc">The interface for an instance of a script object.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3413</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a4967db3ed89836ac2f3b529c499d473d"><div class="ttname"><a href="classas_i_script_module.html#a4967db3ed89836ac2f3b529c499d473d">asIScriptModule::GetName</a></div><div class="ttdeci">virtual const char * GetName() const =0</div><div class="ttdoc">Gets the name of the module.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
123
docs/manual/doc_addon_std_string.html
Normal file
123
docs/manual/doc_addon_std_string.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: string object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_std_string.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">string object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/scriptstdstring/</p>
|
||||
<p>This add-on registers the <code>std::string</code> type as-is with AngelScript. This gives perfect compatibility with C++ functions that use <code>std::string</code> in parameters or as return type.</p>
|
||||
<p>A potential drawback is that the <code>std::string</code> type is a value type, thus may increase the number of copies taken when string values are being passed around in the script code. However, this is most likely only a problem for scripts that perform a lot of string operations.</p>
|
||||
<p>Register the type with <code>RegisterStdString(asIScriptEngine*)</code>. Register the optional split method and global join function with <code>RegisterStdStringUtils(asIScriptEngine*)</code>. The optional functions require that the <a class="el" href="doc_addon_array.html">array template object</a> has been registered first.</p>
|
||||
<p>Compile the add-on with the pre-processor define AS_USE_STLNAMES=1 to register the methods with the same names as used by C++ STL where the methods have the same significance. Not all methods from STL is implemented in the add-on, but many of the most frequent ones are so a port from script to C++ and vice versa might be easier if STL names are used.</p>
|
||||
<p>Compile the add-on with the pre-processor define AS_USE_ACCESSORS=1 to register length as a virtual property instead of the method length().</p>
|
||||
<h1><a class="anchor" id="doc_addon_std_string_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<p>Refer to the <code>std::string</code> implementation for your compiler.</p>
|
||||
<h1><a class="anchor" id="doc_addon_std_string_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_script_stdlib_string.html">Strings in the script language</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
151
docs/manual/doc_addon_weakref.html
Normal file
151
docs/manual/doc_addon_weakref.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: weakref object</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_addon_weakref.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">weakref object </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><b>Path:</b> /sdk/add_on/weakref/</p>
|
||||
<p>The <code>weakref</code> type is a template type for holding weak references to objects, i.e. the references that will not keep the referred object alive.</p>
|
||||
<p>The type is registered with <code>RegisterScriptWeakRef(asIScriptEngine*)</code>.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_weakref.html">Weak references</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_addon_weakref_1"></a>
|
||||
Public C++ interface</h1>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CScriptWeakRef </div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Constructors</span></div>
|
||||
<div class="line"> CScriptWeakRef(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *type);</div>
|
||||
<div class="line"> CScriptWeakRef(<span class="keyword">const</span> CScriptWeakRef &other);</div>
|
||||
<div class="line"> CScriptWeakRef(<span class="keywordtype">void</span> *ref, <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *type);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> ~CScriptWeakRef();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Copy the stored value from another weakref object</span></div>
|
||||
<div class="line"> CScriptWeakRef &operator=(<span class="keyword">const</span> CScriptWeakRef &other);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Compare equalness</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> CScriptWeakRef &o) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> CScriptWeakRef &o) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Sets a new reference</span></div>
|
||||
<div class="line"> CScriptWeakRef &Set(<span class="keywordtype">void</span> *newRef);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the object if it is still alive</span></div>
|
||||
<div class="line"> <span class="comment">// This will increment the refCount of the returned object</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *Get() <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns true if the contained reference is the same</span></div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> Equals(<span class="keywordtype">void</span> *ref) <span class="keyword">const</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Returns the type of the reference held</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_type_info.html">asITypeInfo</a> *GetRefType() <span class="keyword">const</span>;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_addon_weakref_2"></a>
|
||||
Public script interface</h1>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_datatypes_weakref.html">weakref in the script language</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
163
docs/manual/doc_adv_access_mask.html
Normal file
163
docs/manual/doc_adv_access_mask.html
Normal file
@@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Access masks and exposing different interfaces</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_access_mask.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Access masks and exposing different interfaces </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>An application may need to expose different interfaces to different types of scripts, e.g. a game entity may only have access to specific set of functions, while the GUI script can have access to a completely different set of functions.</p>
|
||||
<p>To accomplish this the application can set a bitmask while registering the interface, and then use that bitmask when building the scripts to determine what the scripts should or should not be able to access.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> ConfigureEngine(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Register the interface available to script type 1</span></div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a570df3e676f2d9e03e87d97b8cede1c7">SetDefaultAccessMask</a>(0x1); </div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void func1()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(func1), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the interface available to script type 2</span></div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a570df3e676f2d9e03e87d97b8cede1c7">SetDefaultAccessMask</a>(0x2); </div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void func2()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(func2), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the interface available to both script types</span></div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a570df3e676f2d9e03e87d97b8cede1c7">SetDefaultAccessMask</a>(0x3);</div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void func3()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(func3), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">int</span> CompileScript(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *script, <span class="keywordtype">int</span> type)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> CScriptBuilder builder;</div>
|
||||
<div class="line"> r = builder.StartNewModule(engine, script);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( r < 0 ) <span class="keywordflow">return</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set the access mask for the module, which will</span></div>
|
||||
<div class="line"> <span class="comment">// determine the functions from the application</span></div>
|
||||
<div class="line"> <span class="comment">// interface that can be called</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod = builder.GetModule();</div>
|
||||
<div class="line"> mod-><a class="code" href="classas_i_script_module.html#a76733de5a86875c4a0f021f7f92a6d12">SetAccessMask</a>(type); </div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Add the script section and build the script</span></div>
|
||||
<div class="line"> r = builder.AddSectionFromFile(script);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( r < 0 ) <span class="keywordflow">return</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> builder.BuildModule();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The access mask can be defined for the following entities in the application interface:</p>
|
||||
<ul>
|
||||
<li><a class="el" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">Global functions</a></li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#aacd32f32b2922b8ffaed204812013169">Global properties</a></li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">Object types</a></li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">Individual methods of types</a></li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">Individual properties of types</a></li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">Individual object behaviours</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a570df3e676f2d9e03e87d97b8cede1c7"><div class="ttname"><a href="classas_i_script_engine.html#a570df3e676f2d9e03e87d97b8cede1c7">asIScriptEngine::SetDefaultAccessMask</a></div><div class="ttdeci">virtual asDWORD SetDefaultAccessMask(asDWORD defaultMask)=0</div><div class="ttdoc">Sets the access mask that should be used for subsequent registered entities.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a76733de5a86875c4a0f021f7f92a6d12"><div class="ttname"><a href="classas_i_script_module.html#a76733de5a86875c4a0f021f7f92a6d12">asIScriptModule::SetAccessMask</a></div><div class="ttdeci">virtual asDWORD SetAccessMask(asDWORD accessMask)=0</div><div class="ttdoc">Sets the access mask that should be used during the compilation.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
213
docs/manual/doc_adv_class_hierarchy.html
Normal file
213
docs/manual/doc_adv_class_hierarchy.html
Normal file
@@ -0,0 +1,213 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Class hierarchies</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_class_hierarchy.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Class hierarchies </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>AngelScript cannot automatically determine relationships between registered classes, so in order to establish the hierarchies for use within the script language it is necessary to do a bit more registration beyond the normal <a class="el" href="doc_register_type.html">object registration</a>.</p>
|
||||
<p>Hierarchies can currently only be registered for <a class="el" href="doc_reg_basicref.html">reference types</a>, not for <a class="el" href="doc_register_val_type.html">value types</a>.</p>
|
||||
<h1><a class="anchor" id="doc_adv_class_hierarchy_1"></a>
|
||||
Establishing the relationship</h1>
|
||||
<p>In order to let AngelScript know that two types are related you need to register the reference cast operators <a class="el" href="doc_script_class_ops.html#doc_script_class_conv">opCast</a> and <a class="el" href="doc_script_class_ops.html#doc_script_class_conv">opImplCast</a>. The opCast should be used if you only want to allow the cast through an explicit call with the <code><a class="el" href="doc_expressions.html#conversion">cast<class></a></code> operator. opImplCast should be used when you want to allow the compiler to implicitly perform the cast as necessary.</p>
|
||||
<p>Usually you'll want to use opImplCast for casts from a derived type to the base type, and opCast for casts from a base type to a derived type.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Example opCast behaviour</span></div>
|
||||
<div class="line"><span class="keyword">template</span><<span class="keyword">class</span> A, <span class="keyword">class</span> B></div>
|
||||
<div class="line">B* refCast(A* a)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// If the handle already is a null handle, then just return the null handle</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !a ) <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Now try to dynamically cast the pointer to the wanted type</span></div>
|
||||
<div class="line"> B* b = <span class="keyword">dynamic_cast<</span>B*<span class="keyword">></span>(a);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( b != 0 )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Since the cast was made, we need to increase the ref counter for the returned handle</span></div>
|
||||
<div class="line"> b->addref();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> b;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Example registration of the behaviour</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"base"</span>, <span class="stringliteral">"derived@ opCast()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>((refCast<base,derived>)), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"derived"</span>, <span class="stringliteral">"base@ opImplCast()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>((refCast<derived,base>)), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Also register the const overloads so the cast works also when the handle is read only </span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"base"</span>, <span class="stringliteral">"const derived@ opCast() const"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>((refCast<base,derived>)), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"derived"</span>, <span class="stringliteral">"const base@ opImplCast() const"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>((refCast<derived,base>)), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>Note that it may be necessary to add extra parenthesis to the <code>asFUNCTION</code> macro so that the preprocessor doesn't interpret the <code>,</code> in the template declaration as the argument separator in the macro.</p>
|
||||
<h1><a class="anchor" id="doc_adv_class_hierarchy_2"></a>
|
||||
Inherited methods and properties</h1>
|
||||
<p>Just as relationships cannot be determined, there is also no way to automatically let AngelScript add inherited methods and properties to derived types. The reason for this is that method pointers and property offsets may differ between the base class and derived class, especially when multiple inheritance is used, and there is no way to automatically determine exactly what the difference is.</p>
|
||||
<p>For this reason the application needs to register all the inherited methods and properties for the derived classes, which may lead to a bit of duplicate code. However, you may be able to avoid the duplication through a bit of clever thinking. Here is an example of registering the methods and properties for a base class and the derived class (registration of behaviours has been omitted for briefness):</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The base class</span></div>
|
||||
<div class="line"><span class="keyword">class </span>base</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> aMethod();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> aProperty;</div>
|
||||
<div class="line">};</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// The derived class</span></div>
|
||||
<div class="line"><span class="keyword">class </span>derived : <span class="keyword">public</span> base</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> aNewMethod();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> aNewProperty;</div>
|
||||
<div class="line">};</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// The code to register the classes</span></div>
|
||||
<div class="line"><span class="comment">// This is implemented as a template function, to support multiple inheritance</span></div>
|
||||
<div class="line"><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><span class="keywordtype">void</span> RegisterBaseMembers(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *type)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(type, <span class="stringliteral">"void aMethod()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(T, aMethod), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">RegisterObjectProperty</a>(type, <span class="stringliteral">"int aProperty"</span>, <a class="code" href="angelscript_8h.html#a717eccea17214bc1eb64bb9789c4915a">asOFFSET</a>(T, aProperty)); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">template</span> <<span class="keyword">class</span> T></div>
|
||||
<div class="line"><span class="keywordtype">void</span> RegisterDerivedMembers(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine, <span class="keyword">const</span> <span class="keywordtype">char</span> *type)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the inherited members by calling </span></div>
|
||||
<div class="line"> <span class="comment">// the registration of the base members</span></div>
|
||||
<div class="line"> RegisterBaseMembers<T>(engine, type);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Now register the new members</span></div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(type, <span class="stringliteral">"void aNewMethod()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(T, aNewMethod), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">RegisterObjectProperty</a>(type, <span class="stringliteral">"int aProperty"</span>, <a class="code" href="angelscript_8h.html#a717eccea17214bc1eb64bb9789c4915a">asOFFSET</a>(T, aProperty)); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> RegisterTypes(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the base type</span></div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"base"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> RegisterBaseMembers<base>(engine, <span class="stringliteral">"base"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the derived type</span></div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"derived"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> RegisterDerivedMembers<derived>(engine, <span class="stringliteral">"derived"</span>);</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ad74043be9cc30f105c62f482ca720574"><div class="ttname"><a href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">asIScriptEngine::RegisterObjectMethod</a></div><div class="ttdeci">virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a method for the object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a></div><div class="ttdeci">@ asCALL_CDECL_OBJLAST</div><div class="ttdoc">A cdecl function that takes the object pointer as the last parameter.</div><div class="ttdef"><b>Definition:</b> angelscript.h:234</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7345e6b3afabec24efd0ff77886d49a6"><div class="ttname"><a href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a></div><div class="ttdeci">#define asMETHOD(c, m)</div><div class="ttdoc">Returns an asSFuncPtr representing the class method specified by class and method name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:740</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a></div><div class="ttdeci">@ asCALL_THISCALL</div><div class="ttdoc">A thiscall class method.</div><div class="ttdef"><b>Definition:</b> angelscript.h:232</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a0aa35bf824180fe6aed685b40f0e8c34"><div class="ttname"><a href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">asIScriptEngine::RegisterObjectProperty</a></div><div class="ttdeci">virtual int RegisterObjectProperty(const char *obj, const char *declaration, int byteOffset, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a property for the object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a717eccea17214bc1eb64bb9789c4915a"><div class="ttname"><a href="angelscript_8h.html#a717eccea17214bc1eb64bb9789c4915a">asOFFSET</a></div><div class="ttdeci">#define asOFFSET(s, m)</div><div class="ttdoc">Returns the offset of an attribute in a struct.</div><div class="ttdef"><b>Definition:</b> angelscript.h:672</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
182
docs/manual/doc_adv_concurrent.html
Normal file
182
docs/manual/doc_adv_concurrent.html
Normal file
@@ -0,0 +1,182 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Concurrent scripts</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_concurrent.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Concurrent scripts </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>The script engine can run multiple scripts in parallel, i.e. concurrent scripts. This can be done easily using <a class="el" href="doc_adv_multithread.html">multithreading</a> where each thread runs its own script context, but this article is going to explain how it is done without multithreading.</p>
|
||||
<p>In order to execute multiple scripts in parallel, each script must have it's own <a class="el" href="classas_i_script_context.html">asIScriptContext</a>, where the context is set up as for a <a class="el" href="doc_call_script_func.html">normal function call</a>. Then the application needs to set a timeout for each context. When the timeout is reached, the context should be <a class="el" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">suspended</a>, so that the next context can execute for a while.</p>
|
||||
<p>Here's a very simple example of how this can be done:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The contexts have already been prepared before this function is called</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> ExecuteScripts(std::vector<asIScriptContext *> contexts)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// This function will run until all scripts have completed</span></div>
|
||||
<div class="line"> <span class="keywordflow">while</span>( contexts.size() > 0 )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keywordflow">for</span>( <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> n = 0; n < contexts.size(); n++ )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Set a 10 millisecond timeout for this context</span></div>
|
||||
<div class="line"> SetTimeoutForContext(contexts[n], 10);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Resume the execution of this context by calling Execute</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r = contexts[n]->Execute();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Remove the timeout so it won't be triggered accidentally</span></div>
|
||||
<div class="line"> RemoveTimeoutForContext();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determine if the script completed, or was timed out</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( r == <a class="code" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7">asEXECUTION_SUSPENDED</a> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The script will continue in the next iteration</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The script has completed the execution, so we take it out of the list of scripts</span></div>
|
||||
<div class="line"> contexts[n--] = contexts.back();</div>
|
||||
<div class="line"> contexts.pop_back();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The application can manage the execution of the scripts in a simple round-robin fashion, where each script gets equal amount of execution time, or a more intricate management algorithm can be built, e.g. to give more execution time to high priority scripts etc.</p>
|
||||
<p>The time out function, i.e. SetTimeoutForContext in the example above, can be implemented in two different ways. Through the use of <a class="el" href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">line callbacks</a>, where the context will invoke the callback for each statement in the script. The callback can then check if the timeout limit has been reached and suspend the context.</p>
|
||||
<p>The other way is through the use of a timeout thread, where the thread simply sleeps until the timeout limit has been reached, and when the thread wakes up it suspends the context (if it is still running).</p>
|
||||
<p>The timeout thread is probably the easiest to implement, and also doesn't impact the performance as much as the line callback. The line callback may still have to be used if the target OS doesn't support multithreading though.</p>
|
||||
<p>Here's a simple example of how to implement the timeout function with a separate thread:</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">static</span> HANDLE thread_handle = 0;</div>
|
||||
<div class="line"><span class="keyword">static</span> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *thread_ctx;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">DWORD WINAPI TimeoutThread(<span class="keywordtype">void</span> *sleeptime)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> Sleep(*<span class="keyword">reinterpret_cast<</span><span class="keywordtype">int</span>*<span class="keyword">></span>(sleeptime));</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( thread_ctx )</div>
|
||||
<div class="line"> thread_ctx-><a class="code" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> SetTimeoutForContext(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx, <span class="keywordtype">int</span> milliseconds)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> thread_ctx = ctx;</div>
|
||||
<div class="line"> thread_handle = CreateThread(0, 50, TimeoutThread, <span class="keyword">reinterpret_cast<</span><span class="keywordtype">void</span>*<span class="keyword">></span>(&milliseconds), 0, 0);</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> RemoveTimeoutForContext()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// TerminateThread should be used with extreme care, but in this </span></div>
|
||||
<div class="line"> <span class="comment">// case the TimeoutThread can't do any harm even if interrupted </span></div>
|
||||
<div class="line"> <span class="comment">// in the middle of the execution</span></div>
|
||||
<div class="line"> TerminateThread(thread_handle, 0);</div>
|
||||
<div class="line"> thread_handle = 0;</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>Observe that the routines for multithreading usually differ a lot depending on the target system. The above code is for Windows and will most likely require adaption to work on any other system.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_ctxmgr.html">Context manager</a>, <a class="el" href="doc_samples_concurrent.html">Concurrent scripts</a>, <a class="el" href="doc_adv_coroutine.html">Co-routines</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7"><div class="ttname"><a href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7">asEXECUTION_SUSPENDED</a></div><div class="ttdeci">@ asEXECUTION_SUSPENDED</div><div class="ttdoc">The execution is suspended and can be resumed.</div><div class="ttdef"><b>Definition:</b> angelscript.h:400</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ad4ac8be3586c46069b5870e40c86544a"><div class="ttname"><a href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">asIScriptContext::Suspend</a></div><div class="ttdeci">virtual int Suspend()=0</div><div class="ttdoc">Suspends the execution, which can then be resumed by calling Execute again.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
195
docs/manual/doc_adv_coroutine.html
Normal file
195
docs/manual/doc_adv_coroutine.html
Normal file
@@ -0,0 +1,195 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Co-routines</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_coroutine.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Co-routines </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Co-routines is a way to allow multiple execution paths in parallel, but without the hazards of pre-emptive scheduling in <a class="el" href="doc_adv_concurrent.html">multithreading</a> where one thread can be suspended at any moment so another can resume. Because co-routines always voluntarily suspend themselves in favor of the next co-routine, there is no need to worry about atomic instructions and critical sections.</p>
|
||||
<p>Co-routines are not natively built-into the AngelScript library, but it can easily be implemented from the application side. In fact, the <a class="el" href="doc_addon_ctxmgr.html">Context manager</a> add-on already provides a default implementation for this.</p>
|
||||
<p>To implement your own version of co-routines you will need a couple of pieces:</p>
|
||||
<ul>
|
||||
<li>The co-routine itself, which is just an instance of the <a class="el" href="classas_i_script_context.html">asIScriptContext</a> object. Each co-routine will have its own context object that holds the callstack of the co-routine.</li>
|
||||
<li>A function that will permit the script to create, or spawn, new co-routines. This function will need to be able to refer to starting function of the new co-routine. This reference can be done by name, or perhaps more elegantly with a <a class="el" href="doc_datatypes_funcptr.html">function pointer</a>. Once invoked this function will instanciate the new context, and prepare it with the starting function.</li>
|
||||
<li>A function that will permit a co-routine to yield control to the next co-routine. This function will simply suspend the current context so the next co-routine can be resumed.</li>
|
||||
<li>A simple control algorithm for the co-routines. This can just be a loop that will iterate over an array of co-routines, i.e. contexts, until all of them have finished executing. When a new co-routine is created it is simply appended to the array to be picked up when the current co-routine yields the control.</li>
|
||||
</ul>
|
||||
<p>A simple implementation of the function that spawns a new co-routine may look like this:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> CreateCoRoutine(<span class="keywordtype">string</span> &func)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = <a class="code" href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( ctx )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine = ctx-><a class="code" href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">GetEngine</a>();</div>
|
||||
<div class="line"> <span class="keywordtype">string</span> mod = ctx-><a class="code" href="classas_i_script_context.html#a1c101300447f2909e5d188409a7180f6">GetFunction</a>()-><a class="code" href="classas_i_script_function.html#af03c30e4764f81c01400d7f77a8d0832">GetModuleName</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// We need to find the function that will be created as the co-routine</span></div>
|
||||
<div class="line"> <span class="keywordtype">string</span> decl = <span class="stringliteral">"void "</span> + func + <span class="stringliteral">"()"</span>; </div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *funcPtr = engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(mod.c_str())-><a class="code" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>(decl.c_str());</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( funcPtr == 0 )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// No function could be found, raise an exception</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">SetException</a>((<span class="stringliteral">"Function '"</span> + decl + <span class="stringliteral">"' doesn't exist"</span>).c_str());</div>
|
||||
<div class="line"> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Create a new context for the co-routine</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *coctx = engine-><a class="code" href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">CreateContext</a>();</div>
|
||||
<div class="line"> coctx-><a class="code" href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">Prepare</a>(funcPtr);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Add the new co-routine context to the array of co-routines</span></div>
|
||||
<div class="line"> coroutines.push_back(coctx);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The yield function is even simpler:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> Yield()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = <a class="code" href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( ctx )</div>
|
||||
<div class="line"> { </div>
|
||||
<div class="line"> <span class="comment">// Suspend the context so the next co-routine can be resumed</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a>();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>A basic control algorithm might look like this:</p>
|
||||
<div class="fragment"><div class="line">std::vector<asIScriptContext *> coroutines;</div>
|
||||
<div class="line"><span class="keywordtype">void</span> Execute()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> n = 0;</div>
|
||||
<div class="line"> <span class="keywordflow">while</span>( coroutines.size() > 0 )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Resume the co-routine</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r = coroutines[n]->Execute();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( r == <a class="code" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7">asEXECUTION_SUSPENDED</a> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Resume the next co-routine</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( ++n == coroutines.size() )</div>
|
||||
<div class="line"> n = 0;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The co-routine finished so let's remove it</span></div>
|
||||
<div class="line"> coroutines[n]->Release();</div>
|
||||
<div class="line"> coroutines.erase(n);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_ctxmgr.html">Context manager</a>, <a class="el" href="doc_samples_corout.html">Co-routines</a>, <a class="el" href="doc_adv_concurrent.html">Concurrent scripts</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a1c101300447f2909e5d188409a7180f6"><div class="ttname"><a href="classas_i_script_context.html#a1c101300447f2909e5d188409a7180f6">asIScriptContext::GetFunction</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunction(asUINT stackLevel=0)=0</div><div class="ttdoc">Returns the function at the specified callstack level.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7"><div class="ttname"><a href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a7b5644be315c46f2fa44f032731242c7">asEXECUTION_SUSPENDED</a></div><div class="ttdeci">@ asEXECUTION_SUSPENDED</div><div class="ttdoc">The execution is suspended and can be resumed.</div><div class="ttdef"><b>Definition:</b> angelscript.h:400</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_ab4754d55d8667aefbed135b4794d461b"><div class="ttname"><a href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">asIScriptModule::GetFunctionByDecl</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunctionByDecl(const char *decl) const =0</div><div class="ttdoc">Returns the function by its declaration.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_af03c30e4764f81c01400d7f77a8d0832"><div class="ttname"><a href="classas_i_script_function.html#af03c30e4764f81c01400d7f77a8d0832">asIScriptFunction::GetModuleName</a></div><div class="ttdeci">virtual const char * GetModuleName() const =0</div><div class="ttdoc">Returns the name of the module where the function was implemented.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a07f12016c5435aec5b63449abb6e4d8d"><div class="ttname"><a href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">asIScriptContext::GetEngine</a></div><div class="ttdeci">virtual asIScriptEngine * GetEngine() const =0</div><div class="ttdoc">Returns a pointer to the engine.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ad4ac8be3586c46069b5870e40c86544a"><div class="ttname"><a href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">asIScriptContext::Suspend</a></div><div class="ttdeci">virtual int Suspend()=0</div><div class="ttdoc">Suspends the execution, which can then be resumed by calling Execute again.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2630e1cd03ffab0fee9b820bf0afe42a"><div class="ttname"><a href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">asIScriptEngine::CreateContext</a></div><div class="ttdeci">virtual asIScriptContext * CreateContext()=0</div><div class="ttdoc">Creates a new script context.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a6f0f071215e0f7effc0b765043f01275"><div class="ttname"><a href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">asIScriptContext::SetException</a></div><div class="ttdeci">virtual int SetException(const char *info, bool allowCatch=true)=0</div><div class="ttdoc">Sets an exception, which aborts the execution.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a43976f42dfc6c1af23e132d36265173a"><div class="ttname"><a href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">asIScriptContext::Prepare</a></div><div class="ttdeci">virtual int Prepare(asIScriptFunction *func)=0</div><div class="ttdoc">Prepares the context for execution of the function.</div></div>
|
||||
<div class="ttc" id="agroup__api__principal__functions_html_gad3a20dc58093b92a5a44c7b6ada34a10"><div class="ttname"><a href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a></div><div class="ttdeci">AS_API asIScriptContext * asGetActiveContext()</div><div class="ttdoc">Returns the currently active context.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
191
docs/manual/doc_adv_custom_options.html
Normal file
191
docs/manual/doc_adv_custom_options.html
Normal file
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Custom options</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_custom_options.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Custom options </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Most applications have different needs and AngelScript is meant to be as flexible as possible to suit everybody. For this reason there are several options for customizing the script engine for the best fit.</p>
|
||||
<h1><a class="anchor" id="doc_adv_custom_options_reg_types"></a>
|
||||
Registerable types</h1>
|
||||
<p>Even types that one might normally expect to be built-in to a script language, e.g. string, array, and other container classes, are <a class="el" href="doc_register_type.html">registered by the application</a>. This is to allow the application to provide the exact implementation desired.</p>
|
||||
<p>Of course, should the application developer want to use a premade implementation the <a class="el" href="doc_addon_script.html">add-ons provide just that</a>.</p>
|
||||
<h1><a class="anchor" id="doc_adv_custom_options_lang_mod"></a>
|
||||
Language modifications</h1>
|
||||
<p>The engine method <a class="el" href="classas_i_script_engine.html#a1bce4e5f573a2ca0ff55163e28f761dd">SetEngineProperty</a> permits making runtime choices about several different behaviours in the engine.</p>
|
||||
<p>The following modify the script language in one way or the other:</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fabed7d49670612ec27227210021926692">asEP_DISALLOW_EMPTY_LIST_ELEMENTS</a></p>
|
||||
<p>By turning on this option the compiler will no longer accept empty list elements in initialization lists. The following will for example not be supported:</p>
|
||||
<pre>
|
||||
array<int> arr = {1,2,,4,5,};
|
||||
</pre><p>When not turned on, the compiler will leave the empty list elements with the uninitialized value, just as an uninitialized variable of the same type.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa563bec877e91b0646c47197b2ae7ac0c">asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE</a></p>
|
||||
<p>By turning on this the compiler will no longer allow the use of value assignment operators on reference types. While it may seem drastic, it can help reduce risk for bugs in the scripts, as the script writer will no longer be able to do a value assignment by mistake when he meant to a handle assignment. Reference types should usually <br />
|
||||
not be copied, so the imposed restriction will likely not cause problems anyway.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa8facaf887921a6b26e5a1f06e01ec37a">asEP_ALLOW_UNSAFE_REFERENCES</a></p>
|
||||
<p>By turning on unsafe references you allow in-out references to be used for primitives and value types too. Normally this will work fine, just as it does in ordinary languages such as C++, but know that it is quite possible to write scripts that will cause memory invasions or crashes if the references are not properly guarded. With this option turned on you cannot consider the scripts to be sand-boxed any longer.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa6dc1c33f9227c66f18fc0f95a0c798b2">asEP_USE_CHARACTER_LITERALS</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa218fdf7e181bf9ee0498112f5a87c415">asEP_ALLOW_MULTILINE_STRINGS</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa02405d96a12b81aa816986b22bf752c2">asEP_SCRIPT_SCANNER</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fab6daa2ae0c712da7f6f16d698305fba1">asEP_STRING_ENCODING</a></p>
|
||||
<p>These options are used to determine how strings are treated by the compiler. The details are described in <a class="el" href="doc_strings.html">Custom string type</a>.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa9658b61d2368cc84fe816c817444e0ba">asEP_HEREDOC_TRIM_MODE</a></p>
|
||||
<p>With this option the compiler can be set to always trim <a class="el" href="doc_datatypes_strings.html">heredoc strings</a>, only trim if it is multiple lines, or never trim them.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa77c3747503489ca122aa61276dae3c1f">asEP_ALLOW_IMPLICIT_HANDLE_TYPES</a></p>
|
||||
<p>This option is experimental. By turning it on script classes can be declared to always be treated as handles by declaring the class with @ before the name of the class. When this is done all variables of that type will be handles, and the assignment operator will always perform a handle assignment.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa90adb1e54ce0217235545941daa2dccd">asEP_REQUIRE_ENUM_SCOPE</a></p>
|
||||
<p>With this option all enum values must be prefixed with the enum type using the scope operator to qualify.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0facc694c9d52274a113262ebf5984f20ad">asEP_PROPERTY_ACCESSOR_MODE</a></p>
|
||||
<p>By default <a class="el" href="doc_script_class_prop.html">virtual property accessors</a> when declared as individual functions need to be marked as such with the keyword 'property', or else the compiler won't consider the functions as virtual properties. This behaviour was introduced in version 2.33.1.</p>
|
||||
<p>Before this version, the compiler would automatically identify functions with the pre-fix 'get_' or 'set_' as virtual property accessors if the function signature was appropriate. This led to undesired behaviour when developers would declare such functions without the intention of them being used as virtual properties and yet the compiler used them as such.</p>
|
||||
<p>For backwards compatibility it is still possible to configure the engine to use this behaviour by setting the engine property asEP_PROPERTY_ACCESSOR_MODE to 2.</p>
|
||||
<p>If it also possible to disable virtual property accessors all together by setting the engine property to 0. Setting the option to 1 only allows virtual property accessors for registered functions, but still without requiring the keyword 'property'.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fab81c81f4fdeb616dd6487da48a0c3456">asEP_DISALLOW_GLOBAL_VARS</a></p>
|
||||
<p>The application can disable the ability to declare global variables in scripts completely. This can be useful in such cases when the application wish to have full control of what can and cannot be stored by a script. <br />
|
||||
</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa6d80b60995ad046918b2376d7d79f2af">asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT</a></p>
|
||||
<p>If this flag is set to true, the compiler will always provide a default constructor for classes even if it hasn't been implemented by the script. Normally this option is not recommended, because if a script class provides a non-default constructor but not the default constructor it is most likely because it is desired that the class should always be initialized with the non-default constructor.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa9c876445c7d138ad096705fc18f311d1">asEP_ALTER_SYNTAX_NAMED_ARGS</a></p>
|
||||
<p>If this flag is set to 1 or 2 the compiler will accept the '=' instead of ':' for <a class="el" href="doc_expressions.html#function">naming arguments in function calls</a>. When option 1 is used the compiler will warn about it, so the script writer can update the script to the correct ':' token. When option 2 is used both '=' and ':' are accepted silently.</p>
|
||||
<p>Observe that the use of the '=' token for naming arguments may cause a bit of a confusion. Especially if there is a variable with the same name as the function argument as the script writer may think he's updating the value of the variable, but is just naming the function argument.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fae6af9c6963372e11c6da873868f594cd">asEP_DISABLE_INTEGER_DIVISION</a></p>
|
||||
<p>This option changes the default behaviour of the / and /= operators. When true, this option replaces integer division with floating-point division, e.g. 1/2 == 0.5 instead of 1/2 == 0</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0faa6f88a81f5706542acb94f3c470ac3f3">asEP_PRIVATE_PROP_AS_PROTECTED</a></p>
|
||||
<p>When this option is set to true the compiler will not prevent the access to private properties inherited from the parent class. It will only write a warning.</p>
|
||||
<p>This option is provided to give backwards compatibility for scripts written between versions 2.19.1, when support for private properties was added, albeit working more like protected properties, and version 2.30.0 when the behaviour was changed so that private properties work like in other languages, i.e. they can't be accessed by derived classes.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa651f1843c922a61ccee5c81fac58e4d1">asEP_ALLOW_UNICODE_IDENTIFIERS</a></p>
|
||||
<p>When this option is set to true the compiler will accept identifiers that contain characters with byte value higher than 127. This permits the use of international characters in the identifiers as the script can be encoded in UTF-8 format and compiler normally.</p>
|
||||
<h1><a class="anchor" id="doc_adv_custom_options_engine"></a>
|
||||
Engine behaviours</h1>
|
||||
<p>There are also several options in <a class="el" href="classas_i_script_engine.html#a1bce4e5f573a2ca0ff55163e28f761dd">SetEngineProperty</a> for modifying the way the engine behaves.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fab441e1bdd7488bbe8f6dfa9c6b80e4fc">asEP_MAX_NESTED_CALLS</a></p>
|
||||
<p>This property defines how many recursive nested calls the engine should accept. In this context a nested call is when a script calls into an application registered function that in turn calls another script function. The second call is then said to be a nested call.</p>
|
||||
<p>By default the engine will accept 100 nested calls.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa6159294272e4d20dd4b35359a25f3ac6">asEP_OPTIMIZE_BYTECODE</a></p>
|
||||
<p>Normally this option is only used for testing the library, but should you find that the compilation time takes too long, then it may be of interest to turn off the bytecode optimization pass by setting this option to false.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fabf1577418b716c92f0a85be3e2617243">asEP_COPY_SCRIPT_SECTIONS</a></p>
|
||||
<p>If you want to spare some dynamic memory and the script sections passed to the engine is already stored somewhere in memory then you can turn off this options. If you do you'll need to be careful not to modify or deallocate the script sections until module has been built.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa1ab4c8f8734f0d90bee4005afd810f83">asEP_MAX_STACK_SIZE</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa6d74b8325be718ace661484f1e8e7fb1">asEP_INIT_STACK_SIZE</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa4d8ec81a881162a1f0689b56ba864346">asEP_MAX_CALL_STACK_SIZE</a>, <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0faabb0261a40d98af8a0f6d38c2150a4e8">asEP_INIT_CALL_STACK_SIZE</a></p>
|
||||
<p>The script context's data stack grows dynamically as needed during executions. By default there is no limit to how large it may grow, but if you wish to set this limit you can do with the asEP_MAX_STACK_SIZE option. The limit is given in bytes, but it is only an approximate limit. Setting the limit to 1MB doesn't mean the stack will grow exactly to 1MB, but you can be certain that it will not grow much beyond that.</p>
|
||||
<p>Whenever a context attempts to grow the stack more than it is allowed, it will abort the execution and return a 'stack overflow' script exception.</p>
|
||||
<p>Similarly the call stack also grows dynamically as needed during executions. The default here is also no limit, with the ability to limit maximum size by setting the asEP_MAX_CALL_STACK_SIZE. This limit is set in number of function calls.</p>
|
||||
<p>In some cases it may be useful to set the initial stack size too, e.g. if you know beforehand that a large stack is needed, or if you wish to avoid any runtime memory allocations during an execution. In this case you can use the asEP_INIT_STACK_SIZE for the data stack, and asEP_INIT_CALL_STACK_SIZE for the call stack.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa73b396e4ea6376f0962d19add962bd91">asEP_BUILD_WITHOUT_LINE_CUES</a></p>
|
||||
<p>This option can be used to speed up the execution of scripts a bit. It is best described in <a class="el" href="doc_finetuning.html#doc_finetuning_3">Compile scripts without line cues</a>.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0facac241d97facce4eaf9e5b0ca40dfcf1">asEP_INIT_GLOBAL_VARS_AFTER_BUILD</a></p>
|
||||
<p>By default the global variables in the script modules are initialized immediately after building the scripts, but sometimes this is not desired. For example, if you debug the initialization of the variables, or if you're building an offline compiler, or even if you want to add extra validation of the variables to make sure the script doesn't declare any variables you don't want it to.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_precompile.html">Pre-compiled byte code</a></dd></dl>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa7ff74f4afa490b55839daaf217cf898c">asEP_INCLUDE_JIT_INSTRUCTIONS</a></p>
|
||||
<p>In order for JIT compilation to work properly it needs to have some hints in the bytecode so it can know where a switch from bytecode execution to JIT compiled execution shall be done. By default this option is turned off as it would just add an overhead to the bytecode, but when using JIT compilation this overhead will be compensated by the faster execution with direct machine code.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_jit.html">How to build a JIT compiler</a></dd></dl>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa530e8d9576f94a258446c5fb9b7bd7a5">asEP_EXPAND_DEF_ARRAY_TO_TMPL</a></p>
|
||||
<p>This option is to determine how the <a class="el" href="classas_i_script_engine.html#ac9451feece1297eba8d1649036039e82">default array type</a> is displayed in compiler messages and function declarations, e.g. int[] or array<int>.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa9b5d1d8ff5143a6a77dfd18143d87c7d">asEP_AUTO_GARBAGE_COLLECT</a></p>
|
||||
<p>By default AngelScript's incremental garbage collector is executed as scripts are invoked by the application. This does add a slight overhead to the execution, which is normally tolerable but in some applications the CPU cycles may be needed for other things. In this case the automatic execution of the garbage collector can be turned off to hold off on the execution until the CPU can be spared.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_gc.html">Garbage collection</a></dd></dl>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fadd96da828860b5de2352de07c2456633">asEP_COMPILER_WARNINGS</a></p>
|
||||
<p>Compiler warnings can be turned off or treated as errors by setting this engine property.</p>
|
||||
<p><a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa58fa0f29330923b24ab795e7c6ada52e">asEP_GENERIC_CALL_MODE</a></p>
|
||||
<p>By default the <a class="el" href="doc_generic.html">generic calling convention</a> treats the ref counts in the handles the same way that the native calling convention, i.e. releases any handles passed to a function if they have been marked as auto handles, and increments the returned handle if it has been marked as auto handle.</p>
|
||||
<p>If the behaviour used before 2.33.0 is desired for backwards compatibility, then set this property to 0. In this case the generic calling convention will always release references for handles received in arguments, and never increment references for returned handles. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
146
docs/manual/doc_adv_dynamic_build.html
Normal file
146
docs/manual/doc_adv_dynamic_build.html
Normal file
@@ -0,0 +1,146 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Dynamic compilations</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_dynamic_build.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Dynamic compilations </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>There are various forms of dynamic compilations of scripts. In the following subtopics I try to explain the theory of them and give some information on how they can be implemented.</p>
|
||||
<h1><a class="anchor" id="doc_adv_dynamic_build_ondemand"></a>
|
||||
On demand builds</h1>
|
||||
<p>The most common form of dynamic compilations is building new modules on demand, i.e. as they are needed. When using this the application or game engine is typically designed to have separate scripts to perform different tasks, e.g. menu handling, different types of AI controllers, player controller, etc. If these separate scripts have an abstraction layer through the application to interact with each other it is very easy to build the scripts on demand.</p>
|
||||
<p>To build a new script on demand, simply get a new module, add the needed script sections to it and build it just as you would when <a class="el" href="doc_compile_script.html">building the first script</a>. As each module is independent the previously existing module will be unaffected.</p>
|
||||
<p>Each module can be configured to see a <a class="el" href="doc_adv_access_mask.html">different application interface</a>, so there is no need to create different engine instances.</p>
|
||||
<p>Though modules are independent, they can still interact with each other if the application provides the interface for that. To make the communication between modules easier one can chose to use <a class="el" href="doc_script_shared.html">shared script entities</a>. Shared script entities will be compiled only once by the first module that includes the code. Any subsequent module that also include the code for the shared entity will reuse what was built by the first module, i.e. will share the internal type and bytecode.</p>
|
||||
<p>Another option is to <a class="el" href="doc_global_import.html">import global functions</a> from a previously compiled module. In this case the application must make sure the function that exports the functions is compiled first, then after building the module that imports the function the application must call the <a class="el" href="classas_i_script_module.html#a3f0c215576adefd922c2cc95d16b55d8">asIScriptModule::BindAllImportedFunctions</a> so conclude the imports.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_samples_game.html">Game sample</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_adv_dynamic_build_incr"></a>
|
||||
Incremental builds</h1>
|
||||
<p>Besides the ordinary <a class="el" href="doc_compile_script.html">compilation of scripts</a> and subsequent <a class="el" href="doc_call_script_func.html">executions</a>, AngelScript also support dynamically compiling additional <a class="el" href="classas_i_script_module.html#a1258d7cfeed965f36ba312beeb49e81c">functions</a> and <a class="el" href="classas_i_script_module.html#a34850e152dcdcb58c53a2b6929cebf77">global variables</a> to incrementally add to the scope of a module. These functions and variables will become part of the scope, just as if they had been included in the initial script compilation which means that subsequent executions or incremental compilations can use them.</p>
|
||||
<p>It is also possible to dynamically remove <a class="el" href="classas_i_script_module.html#a54b6f8e09787ad20880f73bc97a8ef10">functions</a> and <a class="el" href="classas_i_script_module.html#aac10878c3d16f18ace4db881f7a1bb11">variables</a>. Doing so doesn't immediately discard the functions or variables, so other functions that still refer to them will not fail when executing them. They will however no longer be visible for new compilations or when searching for functions or variables in the module.</p>
|
||||
<p>This kind of dynamic compilations is most useful when dealing with user interaction, e.g. an ingame console, or perhaps event handlers, e.g. a trigger on a GUI button click.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_helpers.html">ExecuteString() add-on</a>, <a class="el" href="doc_samples_console.html">Console sample</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_adv_dynamic_build_hot"></a>
|
||||
Hot reloading scripts</h1>
|
||||
<p>Hot reloading is most often used when quick change & test cycles are wanted. It is quite common for game engines to have a debug mode that continuously monitors the script files to detect any updates that are made, and when detected automatically reloads the scripts without restarting the game. This allows the developers, for example, to quickly change the behaviour of the AI and immediately see the result without having to play through the entire level over and over again.</p>
|
||||
<p>Hot reloading without preserving the state of existing objects is quite trivial. Simply discard everything, reload the scripts, and create new objects. On the other hand, hot reloading scripts while preserving the state of existing objects can be quite tricky, but is also the most rewarding when implemented successfully.</p>
|
||||
<p>The first part to reloading while preserving the state is keeping track of the object instances so the application knows which objects needs to be serialized when a module is hot reloaded. It is entirely up to the application to build and maintain this mapping.</p>
|
||||
<p>The second part is knowing which script files that will trigger a reload when changed. When building the module the application needs to store the list of the files that were added to it. If you use the standard <a class="el" href="doc_addon_build.html">script builder add-on</a>, then it provides methods to enumerate the included sections or files.</p>
|
||||
<p>The third part is the hardest, and that is to implement the actual serialization. Serializing object members of value types is normally quite trivial, simply <a class="el" href="doc_adv_reflection.html#doc_adv_reflection_vars">enumerate the object properties</a> and store a name-value pair for each. Serializing object members of reference types needs some consideration, as depending on the object that is referred to, either you will be able to store the actual pointer, or you will need to store some kind of descriptor as the referred to object will also be recreated during the reload.</p>
|
||||
<p>Once all the objects that will need to be recreated after the reload have been serialized for backup, the module can be rebuilt using the normal procedure for <a class="el" href="doc_compile_script.html">compiling a script</a>. Afterwards the serialized objects needs to be recreated. Once created you'll enumerate the members and set their values or references according to the backed up data.</p>
|
||||
<h2><a class="anchor" id="doc_adv_dynamic_build_hot_1"></a>
|
||||
Things to consider</h2>
|
||||
<ul>
|
||||
<li>Design the engine and script interface with hot reloading in mind from the start. Hot reloading is much easier to implement the less complex interface you have, e.g. script objects that can only interact with other script objects indirectly through the application will not be able to hold references to objects unknown by the application.</li>
|
||||
<li><a class="el" href="doc_script_shared.html">Shared script entities</a> will not be recompiled if some module or existing object (including those pending destruction in the garbage collector) still refers to the code. It's recommended that you minimize the use of shared entities to where necessary so as to minimize the need to modify them.</li>
|
||||
<li>The <a class="el" href="classas_i_script_context.html">asIScriptContext</a> cannot be serialized so avoid reloading scripts that may still be referred to by a context, e.g. in a suspended state. It is quite likely that the application will crash if the module is reloaded while a context has one of the functions on the callstack.</li>
|
||||
<li>Before discarding the original objects, consider doing a test compilation of the modified scripts in a temporary module first, and only go ahead with the hot reloading if the test compilation is successful. That way you can catch compilation errors that would otherwise cause the recreation of the new objects to fail.</li>
|
||||
<li>When recreating object instances you can take advantage of the method <a class="el" href="classas_i_script_engine.html#a9de3c5e4465f699ad698740d6037e1a6">asIScriptEngine::CreateUninitializedScriptObject</a> to create the objects without actually executing the script class constructor, which may have unwanted side effects during the reload.</li>
|
||||
<li>Decide what to do when the script modifications introduces new object properties or removes existing properties, as you will not be able to restore the exact same object state then. Perhaps the new property can be filled with some default value to allow the continuation of the execution? Or perhaps the script itself can have a special event handler to provide the initial value of the new member?</li>
|
||||
<li>The <a class="el" href="doc_addon_serializer.html">Serializer</a> add-on has been implemented to aid the implementation of hot reloading scripts, though it may not suit all types of applications.</li>
|
||||
</ul>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_serializer.html">Serializer</a>, <a class="el" href="doc_adv_reflection.html">Reflection</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
125
docs/manual/doc_adv_dynamic_config.html
Normal file
125
docs/manual/doc_adv_dynamic_config.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Dynamic configurations</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_dynamic_config.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Dynamic configurations </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>AngelScript supports the concept for configuration groups. This can be used for example by application plug-ins that wish to register their own interface with the script engine. When the plug-in is later removed, the configuration group for that plug-in can also be removed from the AngelScript interface without having to reinitialize everything.</p>
|
||||
<p>To register part of the interface in a configuration group, the registration should be done between calls to <a class="el" href="classas_i_script_engine.html#ac81014e50dd7efc1920adcb3fd2d1e5d">BeginConfigGroup</a> and <a class="el" href="classas_i_script_engine.html#a4cc5ed7ea71811655f7910d298bb5a02">EndConfigGroup</a>. This can be done as many times as desired, but groups cannot be nested. Observe that object methods, behaviours, and properties will always be placed in the same group where the object type was placed even if another group has been specified between the calls.</p>
|
||||
<p>To remove a configuration group the method <a class="el" href="classas_i_script_engine.html#ab607be7fe727cdcce502d2beedbf4c0a">RemoveConfigGroup</a> should be called with the name given to the BeginConfigGroup. It is only possible to remove a config group that is not currently in use. Possible causes that prevents the removal of a group may be:</p>
|
||||
<ul>
|
||||
<li>Another registered a function outside the group uses a type from the group</li>
|
||||
<li>A script is currently built that uses a type or function from the group</li>
|
||||
<li>An instance of a script object that uses a type or function from the group is alive</li>
|
||||
</ul>
|
||||
<p>It can be difficult to determine exactly where the use comes from so here's a few steps to do when RemoveConfigGroup returns <a class="el" href="angelscript_8h.html#a6e2a1647f02f2c5da931bab09e860f54ae38f8f5613a631df20d2cc105aafc612">asCONFIG_GROUP_IS_IN_USE</a>.</p>
|
||||
<ul>
|
||||
<li>Run a full cycle on the <a class="el" href="doc_gc.html">garbage collector</a> to destroy lingering objects</li>
|
||||
<li><a class="el" href="classas_i_script_engine.html#afb0ce55e5846eb18afdcf906aeb67cf7">Discard</a> any module that may have been compiled with the group</li>
|
||||
<li>Double check that no other group uses the entities from the group </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
123
docs/manual/doc_adv_generic_handle.html
Normal file
123
docs/manual/doc_adv_generic_handle.html
Normal file
@@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Registering a generic handle type</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_generic_handle.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Registering a generic handle type </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Sometimes it is useful to be able to take a reference to an object without having to force specific implementation on the object, e.g. when providing a generic storage class to scripts, or providing a generic messaging system.</p>
|
||||
<p>In AngelScript there is no common denominator for all object types, the reasons for this is that script classes and application registered classes have completely different implementation and cannot be generalized under a single superclass.</p>
|
||||
<p>Instead, AngelScript provides an alternative by allowing the application to register a generic handle type. This type would be implemented according to the application's needs, but to the script it would look like it was a generic <a class="el" href="doc_script_handle.html">handle</a> that can reference any reference type. With this the type will be able to hold objects, <a class="el" href="doc_datatypes_funcptr.html">functions</a>, and <a class="el" href="doc_addon_array.html">arrays</a>.</p>
|
||||
<p>To register the generic handle type, the application should follow the same principles as for a <a class="el" href="doc_register_val_type.html">value type</a>, except for a few details, that will be described here.</p>
|
||||
<ul>
|
||||
<li>The type must be registered with the additional flag <a class="el" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aadf3d1f30658e593f48c5c5f542ac4845">asOBJ_ASHANDLE</a>. This is the flag that tells AngelScript that the type simulates a generic handle.</li>
|
||||
<li>In order to allow assigning any handle to the type, the <a class="el" href="doc_script_class_ops.html">opHndlAssign</a> method must be registered with a <a class="el" href="doc_adv_var_type.html">variable parameter type</a>, e.g. 'ref &opHndlAssign(const ?&in)'.</li>
|
||||
<li>The <a class="el" href="doc_script_class_ops.html">opEquals</a> method must also be registered with a <a class="el" href="doc_adv_var_type.html">The variable parameter type</a> in order to allow the is and !is operators to behave as expected for a handle, e.g. 'bool opEquals(const ?&in)'.</li>
|
||||
<li>Finally the <a class="el" href="doc_script_class_ops.html">opCast</a> must be registered with the signature 'void opCast(?&out)' in order to allow a dynamic cast to any other type.</li>
|
||||
</ul>
|
||||
<p>As this is a quite useful type, with really very little need for customization, a standard add-on with this implementation has been provided with the SDK.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_handle.html">ref object</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
350
docs/manual/doc_adv_inheritappclass.html
Normal file
350
docs/manual/doc_adv_inheritappclass.html
Normal file
@@ -0,0 +1,350 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Inheriting from application registered class</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_inheritappclass.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Inheriting from application registered class </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>A script class cannot directly inherit from an application registered class, as the script classes are not compiled into native machine code like the application classes are.</p>
|
||||
<p>It is however possible to emulate the inheritance by using a proxy class to hide the underlying differences in an abstract layer. The proxy class has two parts, one is the C++ side that the application sees, and the other is the script side that the scripts can see and inherit from.</p>
|
||||
<p>The following is an example implementation of such a proxy class.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// On the C++ side</span></div>
|
||||
<div class="line"><span class="keyword">class </span>FooScripted</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> <span class="comment">// Public interface that we want the script to be able to override </span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> CallMe()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// If the script side is still alive, then call the scripted function</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !m_isDead->Get() )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine = m_obj->GetEngine();</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = engine-><a class="code" href="classas_i_script_engine.html#a32391ee83e58083b406ba068ab2ee049">RequestContext</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// GetMethodByDecl returns the virtual function on the script class</span></div>
|
||||
<div class="line"> <span class="comment">// thus when calling it, the VM will execute the derived method</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">Prepare</a>(m_obj->GetObjectType()->GetMethodByDecl(<span class="stringliteral">"void CallMe()"</span>));</div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a10d3c152b25d07584999f4d9fe5ce8b1">SetObject</a>(m_obj);</div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a22e42bf32902cbd6885731a6beeaca20">ReturnContext</a>(ctx);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> m_value;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// A factory function that can be used by the script side to create</span></div>
|
||||
<div class="line"> <span class="keyword">static</span> FooScripted *Factory()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = <a class="code" href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the function that is calling the factory so we can be certain it is the FooScript script class</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *func = ctx-><a class="code" href="classas_i_script_context.html#a1c101300447f2909e5d188409a7180f6">GetFunction</a>(0);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( func-><a class="code" href="classas_i_script_function.html#af930b362c37e5c4c117485d0bd4a34fb">GetObjectType</a>() == 0 || std::string(func-><a class="code" href="classas_i_script_function.html#af930b362c37e5c4c117485d0bd4a34fb">GetObjectType</a>()-><a class="code" href="classas_i_type_info.html#a49f83d3a9158331029324bfbe9ae46a8">GetName</a>()) != <span class="stringliteral">"FooScripted"</span> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">SetException</a>(<span class="stringliteral">"Invalid attempt to manually instantiate FooScript_t"</span>);</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the this pointer from the calling function so the FooScript C++</span></div>
|
||||
<div class="line"> <span class="comment">// class can be linked with the FooScript script class</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_object.html">asIScriptObject</a> *obj = <span class="keyword">reinterpret_cast<</span><a class="code" href="classas_i_script_object.html">asIScriptObject</a>*<span class="keyword">></span>(ctx-><a class="code" href="classas_i_script_context.html#a4f6761a7a0c872dda681d8e180830ff9">GetThisPointer</a>(0));</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">new</span> FooScripted(obj);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reference counting</span></div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> m_refCount++;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Increment also the reference counter to the script side so</span></div>
|
||||
<div class="line"> <span class="comment">// it isn't accidentally destroyed before the C++ side</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !m_isDead->Get() )</div>
|
||||
<div class="line"> m_obj->AddRef();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release()</div>
|
||||
<div class="line"> { </div>
|
||||
<div class="line"> <span class="comment">// Release the script instance too</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !m_isDead->Get() )</div>
|
||||
<div class="line"> m_obj->Release();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( --m_refCount == 0 ) <span class="keyword">delete</span> <span class="keyword">this</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Assignment operator</span></div>
|
||||
<div class="line"> FooScripted &operator=(<span class="keyword">const</span> FooScripted &o)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Copy only the content, not the script proxy class</span></div>
|
||||
<div class="line"> m_value = o.m_value;</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">protected</span>:</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The constructor and destructor are indirectly called</span></div>
|
||||
<div class="line"> FooScripted(<a class="code" href="classas_i_script_object.html">asIScriptObject</a> *obj) : m_obj(0), m_isDead(0), m_value(0), m_refCount(1)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Get the weak ref flag for the script object to</span></div>
|
||||
<div class="line"> <span class="comment">// avoid holding a strong reference to the script class</span></div>
|
||||
<div class="line"> m_isDead = obj-><a class="code" href="classas_i_script_object.html#a9ccca7fe3453219377fc9bd190bf7903">GetWeakRefFlag</a>();</div>
|
||||
<div class="line"> m_isDead-><a class="code" href="classas_i_lockable_shared_bool.html#a1183742552ce6b952cc3742bd456d787">AddRef</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> m_obj = obj;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> ~FooScripted()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Release the weak ref flag</span></div>
|
||||
<div class="line"> m_isDead-><a class="code" href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">Release</a>();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Reference count</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> m_refCount;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The C++ side holds a weak link to the script side to</span></div>
|
||||
<div class="line"> <span class="comment">// avoid a circular reference between the C++ side and</span></div>
|
||||
<div class="line"> <span class="comment">// script side</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a> *m_isDead;</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_object.html">asIScriptObject</a> *m_obj;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><p>This type is registered with the engine as the following:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> RegisterFooScripted(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"FooScripted_t"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"FooScripted_t"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a>, <span class="stringliteral">"FooScripted_t @f()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(FooScripted::Factory), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"FooScripted_t"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84">asBEHAVE_ADDREF</a>, <span class="stringliteral">"void f()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(FooScripted, AddRef), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"FooScripted_t"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a>, <span class="stringliteral">"void f()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(FooScripted, Release), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"FooScripted_t"</span>, <span class="stringliteral">"FooScripted_t &opAssign(const FooScripted_t &in)"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(FooScripted, <span class="keyword">operator</span>=), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"FooScripted_t"</span>, <span class="stringliteral">"void CallMe()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(FooScripted, CallMe), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">RegisterObjectProperty</a>(<span class="stringliteral">"FooScripted_t"</span>, <span class="stringliteral">"int m_value"</span>, <a class="code" href="angelscript_8h.html#a717eccea17214bc1eb64bb9789c4915a">asOFFSET</a>(FooScripted, m_value));</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The script side is declared as <a class="el" href="doc_script_shared.html">shared</a> so it can be used in all script modules. It is also declared as <a class="el" href="doc_script_class_inheritance.html#doc_script_class_inheritance_2">abstract</a> so it cannot be instantiated by itself, only as a parent class of another script class.</p>
|
||||
<p>This script section should preferably be included automatically by the application in all the modules that should be able to derive from the FooScripted class.</p>
|
||||
<pre>
|
||||
// On the script side
|
||||
shared abstract class FooScripted
|
||||
{
|
||||
// Allow scripts to create instances
|
||||
FooScripted()
|
||||
{
|
||||
// Create the C++ side of the proxy
|
||||
@m_obj = FooScripted_t();
|
||||
<br />
|
||||
|
||||
}</pre><pre> // The copy constructor performs a deep copy
|
||||
FooScripted(const FooScripted &o)
|
||||
{
|
||||
// Create a new C++ instance and copy content
|
||||
@m_obj = FooScripted_t();
|
||||
m_obj = o.m_obj; <br />
|
||||
"
|
||||
}</pre><pre> // Do a deep a copy of the C++ object
|
||||
FooScripted &opAssign(const FooScripted &o)
|
||||
{
|
||||
// copy content of C++ instance
|
||||
m_obj = o.m_obj;
|
||||
return this;
|
||||
}</pre><pre> // The script side forwards the call to the C++ side
|
||||
void CallMe() { m_obj.CallMe(); }</pre><pre> // The C++ side property is exposed to the script through accessors
|
||||
int m_value
|
||||
{
|
||||
get { return m_obj.m_value; }
|
||||
set { m_obj.m_value = value; }
|
||||
}</pre><pre> // The script class can be implicitly cast to the C++ type through the opImplCast method
|
||||
FooScripted_t @opImplCast() { return m_obj; }</pre><pre> // Hold a reference to the C++ side of the proxy
|
||||
private FooScripted_t @m_obj;
|
||||
}
|
||||
</pre><p>Now the scripts classes can derive from the FooScripted class <br />
|
||||
and access the properties and methods of the parent class normally.</p>
|
||||
<pre>
|
||||
// Implement a script class that derives from the application class
|
||||
class FooDerived : FooScripted
|
||||
{
|
||||
void CallMe()
|
||||
{
|
||||
m_value += 1;
|
||||
}
|
||||
}</pre><pre> void main()
|
||||
{
|
||||
// When newly created the m_value is 0
|
||||
FooDerived d;
|
||||
assert( d.m_value == 0 );</pre><pre> // When calling the method the m_value is incremented with 1
|
||||
d.CallMe();
|
||||
assert( d.m_value == 1 );
|
||||
}
|
||||
</pre><p>It is of course also possible to create an instance of the scripted class from the application and access it through the FooScripted C++ proxy, thus making it transparent from the rest of the application that the implementation is actually in the script.</p>
|
||||
<div class="fragment"><div class="line">FooScripted *CreateFooDerived(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Create an instance of the FooDerived script class that inherits from the FooScripted C++ class</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_object.html">asIScriptObject</a> *obj = <span class="keyword">reinterpret_cast<</span><a class="code" href="classas_i_script_object.html">asIScriptObject</a>*<span class="keyword">></span>(engine-><a class="code" href="classas_i_script_engine.html#a3101479b4340bc16bb9acb8e8d554266">CreateScriptObject</a>(mod->GetTypeInfoByName(<span class="stringliteral">"FooDerived"</span>)));</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the pointer to the C++ side of the FooScripted class</span></div>
|
||||
<div class="line"> FooScripted *obj2 = *<span class="keyword">reinterpret_cast<</span>FooScripted**<span class="keyword">></span>(obj-><a class="code" href="classas_i_script_object.html#a6a8a3c7d1e103e43923614b719e3cb3a">GetAddressOfProperty</a>(0));</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Increase the reference count to the C++ object, as this is what will </span></div>
|
||||
<div class="line"> <span class="comment">// be used to control the life time of the object from the application side </span></div>
|
||||
<div class="line"> obj2->AddRef();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Release the reference to the script side</span></div>
|
||||
<div class="line"> obj-><a class="code" href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">Release</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> obj2;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> Foo(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> FooScripted *obj = CreateFooDerived(engine);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Once the object is created the application can access it normally through</span></div>
|
||||
<div class="line"> <span class="comment">// the FooScripted pointer, without having to know that the implementation</span></div>
|
||||
<div class="line"> <span class="comment">// is actually done in the script.</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// When newly created the m_value is 0</span></div>
|
||||
<div class="line"> assert( obj->m_value == 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// When calling the method the m_value is incremented with 1 by the script </span></div>
|
||||
<div class="line"> obj->CallMe();</div>
|
||||
<div class="line"> assert( obj->m_value == 1 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Release the object to destroy the instance (this will also destroy the script side)</span></div>
|
||||
<div class="line"> obj->Release();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ad74043be9cc30f105c62f482ca720574"><div class="ttname"><a href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">asIScriptEngine::RegisterObjectMethod</a></div><div class="ttdeci">virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a method for the object type.</div></div>
|
||||
<div class="ttc" id="aclassas_i_lockable_shared_bool_html_a1183742552ce6b952cc3742bd456d787"><div class="ttname"><a href="classas_i_lockable_shared_bool.html#a1183742552ce6b952cc3742bd456d787">asILockableSharedBool::AddRef</a></div><div class="ttdeci">virtual int AddRef() const =0</div><div class="ttdoc">Adds a reference to the shared boolean.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a32391ee83e58083b406ba068ab2ee049"><div class="ttname"><a href="classas_i_script_engine.html#a32391ee83e58083b406ba068ab2ee049">asIScriptEngine::RequestContext</a></div><div class="ttdeci">virtual asIScriptContext * RequestContext()=0</div><div class="ttdoc">Request a context.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a></div><div class="ttdeci">@ asBEHAVE_FACTORY</div><div class="ttdoc">Factory.</div><div class="ttdef"><b>Definition:</b> angelscript.h:362</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a></div><div class="ttdeci">@ asBEHAVE_RELEASE</div><div class="ttdoc">Release.</div><div class="ttdef"><b>Definition:</b> angelscript.h:368</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a1c101300447f2909e5d188409a7180f6"><div class="ttname"><a href="classas_i_script_context.html#a1c101300447f2909e5d188409a7180f6">asIScriptContext::GetFunction</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunction(asUINT stackLevel=0)=0</div><div class="ttdoc">Returns the function at the specified callstack level.</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html_a49f83d3a9158331029324bfbe9ae46a8"><div class="ttname"><a href="classas_i_type_info.html#a49f83d3a9158331029324bfbe9ae46a8">asITypeInfo::GetName</a></div><div class="ttdeci">virtual const char * GetName() const =0</div><div class="ttdoc">Returns a temporary pointer to the name of the datatype.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e52894432737acac2e1a422e496bf84"><div class="ttname"><a href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">asIScriptContext::Execute</a></div><div class="ttdeci">virtual int Execute()=0</div><div class="ttdoc">Executes the prepared function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a10d3c152b25d07584999f4d9fe5ce8b1"><div class="ttname"><a href="classas_i_script_context.html#a10d3c152b25d07584999f4d9fe5ce8b1">asIScriptContext::SetObject</a></div><div class="ttdeci">virtual int SetObject(void *obj)=0</div><div class="ttdoc">Sets the object for a class method call.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f122dd87394f3a83ac766ea19f37317"><div class="ttname"><a href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">asIScriptEngine::RegisterObjectBehaviour</a></div><div class="ttdeci">virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a behaviour for the object type.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html_a9ccca7fe3453219377fc9bd190bf7903"><div class="ttname"><a href="classas_i_script_object.html#a9ccca7fe3453219377fc9bd190bf7903">asIScriptObject::GetWeakRefFlag</a></div><div class="ttdeci">virtual asILockableSharedBool * GetWeakRefFlag() const =0</div><div class="ttdoc">Returns the weak ref flag for the object.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a3101479b4340bc16bb9acb8e8d554266"><div class="ttname"><a href="classas_i_script_engine.html#a3101479b4340bc16bb9acb8e8d554266">asIScriptEngine::CreateScriptObject</a></div><div class="ttdeci">virtual void * CreateScriptObject(const asITypeInfo *type)=0</div><div class="ttdoc">Creates an object defined by its type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7345e6b3afabec24efd0ff77886d49a6"><div class="ttname"><a href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a></div><div class="ttdeci">#define asMETHOD(c, m)</div><div class="ttdoc">Returns an asSFuncPtr representing the class method specified by class and method name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:740</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a22e42bf32902cbd6885731a6beeaca20"><div class="ttname"><a href="classas_i_script_engine.html#a22e42bf32902cbd6885731a6beeaca20">asIScriptEngine::ReturnContext</a></div><div class="ttdeci">virtual void ReturnContext(asIScriptContext *ctx)=0</div><div class="ttdoc">Return a context when it won't be used anymore.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a></div><div class="ttdeci">@ asCALL_THISCALL</div><div class="ttdoc">A thiscall class method.</div><div class="ttdef"><b>Definition:</b> angelscript.h:232</div></div>
|
||||
<div class="ttc" id="aclassas_i_lockable_shared_bool_html"><div class="ttname"><a href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></div><div class="ttdoc">A lockable shared boolean.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4077</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84">asBEHAVE_ADDREF</a></div><div class="ttdeci">@ asBEHAVE_ADDREF</div><div class="ttdoc">AddRef.</div><div class="ttdef"><b>Definition:</b> angelscript.h:366</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a0aa35bf824180fe6aed685b40f0e8c34"><div class="ttname"><a href="classas_i_script_engine.html#a0aa35bf824180fe6aed685b40f0e8c34">asIScriptEngine::RegisterObjectProperty</a></div><div class="ttdeci">virtual int RegisterObjectProperty(const char *obj, const char *declaration, int byteOffset, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a property for the object type.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a6f0f071215e0f7effc0b765043f01275"><div class="ttname"><a href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">asIScriptContext::SetException</a></div><div class="ttdeci">virtual int SetException(const char *info, bool allowCatch=true)=0</div><div class="ttdoc">Sets an exception, which aborts the execution.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html"><div class="ttname"><a href="classas_i_script_object.html">asIScriptObject</a></div><div class="ttdoc">The interface for an instance of a script object.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3413</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a43976f42dfc6c1af23e132d36265173a"><div class="ttname"><a href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">asIScriptContext::Prepare</a></div><div class="ttdeci">virtual int Prepare(asIScriptFunction *func)=0</div><div class="ttdoc">Prepares the context for execution of the function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html_a4bed3c3ac9f16294985835747aa122d3"><div class="ttname"><a href="classas_i_script_object.html#a4bed3c3ac9f16294985835747aa122d3">asIScriptObject::Release</a></div><div class="ttdeci">virtual int Release() const =0</div><div class="ttdoc">Decrease reference counter.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_af930b362c37e5c4c117485d0bd4a34fb"><div class="ttname"><a href="classas_i_script_function.html#af930b362c37e5c4c117485d0bd4a34fb">asIScriptFunction::GetObjectType</a></div><div class="ttdeci">virtual asITypeInfo * GetObjectType() const =0</div><div class="ttdoc">Returns the object type for class or interface method.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a4f6761a7a0c872dda681d8e180830ff9"><div class="ttname"><a href="classas_i_script_context.html#a4f6761a7a0c872dda681d8e180830ff9">asIScriptContext::GetThisPointer</a></div><div class="ttdeci">virtual void * GetThisPointer(asUINT stackLevel=0)=0</div><div class="ttdoc">Returns a pointer to the object, if a class method is being executed.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_object_html_a6a8a3c7d1e103e43923614b719e3cb3a"><div class="ttname"><a href="classas_i_script_object.html#a6a8a3c7d1e103e43923614b719e3cb3a">asIScriptObject::GetAddressOfProperty</a></div><div class="ttdeci">virtual void * GetAddressOfProperty(asUINT prop)=0</div><div class="ttdoc">Returns a pointer to the property referenced by prop.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a717eccea17214bc1eb64bb9789c4915a"><div class="ttname"><a href="angelscript_8h.html#a717eccea17214bc1eb64bb9789c4915a">asOFFSET</a></div><div class="ttdeci">#define asOFFSET(s, m)</div><div class="ttdoc">Returns the offset of an attribute in a struct.</div><div class="ttdef"><b>Definition:</b> angelscript.h:672</div></div>
|
||||
<div class="ttc" id="agroup__api__principal__functions_html_gad3a20dc58093b92a5a44c7b6ada34a10"><div class="ttname"><a href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a></div><div class="ttdeci">AS_API asIScriptContext * asGetActiveContext()</div><div class="ttdoc">Returns the currently active context.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
210
docs/manual/doc_adv_jit.html
Normal file
210
docs/manual/doc_adv_jit.html
Normal file
@@ -0,0 +1,210 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: How to build a JIT compiler</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_jit.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">How to build a JIT compiler </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>AngelScript doesn't provide a built-in JIT compiler, instead it permits an external JIT compiler to be implemented through a public interface.</p>
|
||||
<p>To use JIT compilation, the scripts must be compiled with a few extra instructions that provide hints to the JIT compiler and also entry points so that the VM will know when to pass control to the JIT compiled function. By default this is turned off, and must thus be turned on by setting the engine property <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa7ff74f4afa490b55839daaf217cf898c">asEP_INCLUDE_JIT_INSTRUCTIONS</a>.</p>
|
||||
<p>If the application sets the <a class="el" href="classas_i_j_i_t_compiler.html">JIT compiler</a> with <a class="el" href="classas_i_script_engine.html#aee4f910163604203a27db1ffea3b1c9c">SetJITCompiler</a> AngelScript will automatically invoke it to provide the <a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">JIT functions</a> with each compilation or <a class="el" href="doc_adv_precompile.html">loading of pre-compiled bytecode</a>.</p>
|
||||
<h1><a class="anchor" id="doc_adv_jit_3"></a>
|
||||
The structure of the JIT function</h1>
|
||||
<p>The <a class="el" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">JIT compiled function</a> must follow certain rules in order to behave well with the virtual machine. The intention is that the VM will pass the control to the JIT function, and when the execution is to be suspended the JIT function returns the control to the VM, updating the internal state of the VM so that the VM can resume the execution when requested. Each time the JIT function returns control to the VM it must make sure that the <a class="el" href="structas_s_v_m_registers.html">VM registers</a> and stack values have been updated according to the code that was executed.</p>
|
||||
<p>The byte code will have a special instruction, <a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6705ee9692b45f118cfe0ea24581fae5">JitEntry</a>, which defines the positions where the VM can pass the control to the JIT function. These are usually placed for every script statement, and after each instruction that calls another function. This implies that the JIT compiled function needs to be able to start the execution at different points based on the argument in the JitEntry instruction. The value of the argument is defined by the JIT compiler and how it is interpreted is also up to the JIT compiler, with the exception of 0 that means that the control should not be passed to the JIT function.</p>
|
||||
<p>Some byte code instructions are not meant to be converted into native code. These are usually the ones that have a more global effect on the VM, e.g. the instructions that setup a call to a new script function, or that return from a previous instruction. When these functions are encountered, the JIT function should return the control to the VM, and then the VM will execute the instruction.</p>
|
||||
<p>Other byte code instructions may be partially implemented by the JIT function, for example those that can throw an exception based on specific conditions. One such example is the instructions for divisions, if the divider is 0 the VM will set an exception and abort the execution. For these instructions the JIT compiler should preferrably implement the condition that doesn't throw an exception, and if an exception is to be thrown the JIT function will instead break out to the VM.</p>
|
||||
<p>The following shows a possible structure of a JIT compiled function:</p>
|
||||
<pre>
|
||||
void jitCompiledFunc(asSVMRegisters *regs, asPWORD jitArg)
|
||||
{
|
||||
Read desired VM registers into CPU registers.
|
||||
Jump to the current position of the function based on the 'jitArg' argument.
|
||||
1:
|
||||
Execute code in block 1.
|
||||
Jump to exit if an illegal operation is done, e.g. divide by zero.
|
||||
Jump to exit if block ends with an instruction that should not be executed by JIT function.
|
||||
2:
|
||||
...
|
||||
3:
|
||||
...
|
||||
exit:
|
||||
Update the VM registers before returning control to VM.
|
||||
If necessary the function can invoke the methods of the context informed
|
||||
in the regs, e.g. to suspend the execution, or to set a script exception.
|
||||
}
|
||||
</pre><h1><a class="anchor" id="doc_adv_jit_2"></a>
|
||||
Traversing the byte code</h1>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> CJITCompiler::CompileFunction(<a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *func, <a class="code" href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a> *output)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">bool</span> success = StartNewCompilation();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Get the script byte code</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> length;</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> *byteCode = func-><a class="code" href="classas_i_script_function.html#afb38e9ba77ce8b49378e43dadd83ef94">GetByteCode</a>(&length);</div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> *end = byteCode + length;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">while</span>( byteCode < end )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Determine the instruction</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0">asEBCInstr</a> op = <a class="code" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0">asEBCInstr</a>(*(<a class="code" href="angelscript_8h.html#a48b3da7121b3abb56bff63b3beb0df63">asBYTE</a>*)byteCode);</div>
|
||||
<div class="line"> <span class="keywordflow">switch</span>( op )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Translate each byte code instruction into native code.</span></div>
|
||||
<div class="line"> <span class="comment">// The codes that cannot be translated should return the control</span></div>
|
||||
<div class="line"> <span class="comment">// to the VM, so that it can continue the processing. When </span></div>
|
||||
<div class="line"> <span class="comment">// the VM encounters the next JitEntry instruction it will</span></div>
|
||||
<div class="line"> <span class="comment">// transfer the control back to the JIT function.</span></div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6705ee9692b45f118cfe0ea24581fae5">asBC_JitEntry</a>:</div>
|
||||
<div class="line"> <span class="comment">// Update the argument for the JitEntry instruction with </span></div>
|
||||
<div class="line"> <span class="comment">// the argument that should be sent to the jit function.</span></div>
|
||||
<div class="line"> <span class="comment">// Remember that 0 means that the VM should not pass</span></div>
|
||||
<div class="line"> <span class="comment">// control to the JIT function.</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#aac9eb586274fc44bb1b838d833963996">asBC_PTRARG</a>(byteCode) = DetermineJitEntryArg();</div>
|
||||
<div class="line"> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Move to next instruction</span></div>
|
||||
<div class="line"> byteCode += <a class="code" href="angelscript_8h.html#a9f93754a6f4d43118cd0d2b3896875a5">asBCTypeSize</a>[<a class="code" href="angelscript_8h.html#ac58d23b688ddd6d6e788b034daf25df7">asBCInfo</a>[op].<a class="code" href="structas_s_b_c_info.html#aa0579956f325760177250e0eddd52ab4">type</a>];</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( success )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> *output = GetCompiledFunction();</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> -1;</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The following macros should be used to read the arguments from the bytecode instruction. The layout of the arguments is determined from the <a class="el" href="angelscript_8h.html#ac58d23b688ddd6d6e788b034daf25df7">asBCInfo</a> array.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#a7b3dbfcc3928ddd853a4ee53cbc13b69">asBC_DWORDARG</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a290586f7a153d5e8717b01680262b667">asBC_INTARG</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a92e1437ea399e8c545e15bffd651f45f">asBC_QWORDARG</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a0183edd413564ff4897eb4a2473d01f6">asBC_FLOATARG</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#aac9eb586274fc44bb1b838d833963996">asBC_PTRARG</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a942798ec89a8ac96550523d80570c703">asBC_WORDARG0</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a0a704bf4db31deda2a69d3216312618c">asBC_WORDARG1</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a2287157faea7f6d32b316c17e0858ddf">asBC_SWORDARG0</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a92601565873cf5d29a6876c2638d7fec">asBC_SWORDARG1</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#a698449bbbe369b8a479fb0dd82c9b18e">asBC_SWORDARG2</a></li>
|
||||
</ul>
|
||||
<p>What each <a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0">byte code</a> instruction does is described in <a class="el" href="doc_adv_jit_1.html">Byte code instructions</a>, but the exact implementation of each byte code instruction is best determined from the implementation in the VM, i.e. the asCScriptContext::ExecuteNext method. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_a5428f0c940201e5f3bbb28304aeb81bc"><div class="ttname"><a href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a></div><div class="ttdeci">unsigned long asDWORD</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:614</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac58d23b688ddd6d6e788b034daf25df7"><div class="ttname"><a href="angelscript_8h.html#ac58d23b688ddd6d6e788b034daf25df7">asBCInfo</a></div><div class="ttdeci">const asSBCInfo asBCInfo[256]</div><div class="ttdoc">Information on each bytecode instruction.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4884</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ab3692c4e5d47fc93f8c9646d1783aef0"><div class="ttname"><a href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0">asEBCInstr</a></div><div class="ttdeci">asEBCInstr</div><div class="ttdoc">The bytecode instructions used by the VM.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4351</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a48b3da7121b3abb56bff63b3beb0df63"><div class="ttname"><a href="angelscript_8h.html#a48b3da7121b3abb56bff63b3beb0df63">asBYTE</a></div><div class="ttdeci">unsigned char asBYTE</div><div class="ttdoc">8 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:598</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_af9d3986a33c1bda5c4f82a7aaa0dfeeb"><div class="ttname"><a href="angelscript_8h.html#af9d3986a33c1bda5c4f82a7aaa0dfeeb">asJITFunction</a></div><div class="ttdeci">void(* asJITFunction)(asSVMRegisters *registers, asPWORD jitArg)</div><div class="ttdoc">The function signature of a JIT compiled function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4316</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ab3692c4e5d47fc93f8c9646d1783aef0a6705ee9692b45f118cfe0ea24581fae5"><div class="ttname"><a href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6705ee9692b45f118cfe0ea24581fae5">asBC_JitEntry</a></div><div class="ttdeci">@ asBC_JitEntry</div><div class="ttdoc">If a JIT function is available and the argument is not 0 then call the JIT function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4703</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_afb38e9ba77ce8b49378e43dadd83ef94"><div class="ttname"><a href="classas_i_script_function.html#afb38e9ba77ce8b49378e43dadd83ef94">asIScriptFunction::GetByteCode</a></div><div class="ttdeci">virtual asDWORD * GetByteCode(asUINT *length=0)=0</div><div class="ttdoc">Returns the byte code buffer and length.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a9f93754a6f4d43118cd0d2b3896875a5"><div class="ttname"><a href="angelscript_8h.html#a9f93754a6f4d43118cd0d2b3896875a5">asBCTypeSize</a></div><div class="ttdeci">const int asBCTypeSize[21]</div><div class="ttdoc">Lookup table for determining the size of each type of bytecode instruction.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4815</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_aac9eb586274fc44bb1b838d833963996"><div class="ttname"><a href="angelscript_8h.html#aac9eb586274fc44bb1b838d833963996">asBC_PTRARG</a></div><div class="ttdeci">#define asBC_PTRARG(x)</div><div class="ttdoc">Macro to access the first pointer argument in the bytecode instruction.</div><div class="ttdef"><b>Definition:</b> angelscript.h:5156</div></div>
|
||||
<div class="ttc" id="astructas_s_b_c_info_html_aa0579956f325760177250e0eddd52ab4"><div class="ttname"><a href="structas_s_b_c_info.html#aa0579956f325760177250e0eddd52ab4">asSBCInfo::type</a></div><div class="ttdeci">asEBCType type</div><div class="ttdoc">Instruction argument layout.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4855</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
527
docs/manual/doc_adv_jit_1.html
Normal file
527
docs/manual/doc_adv_jit_1.html
Normal file
@@ -0,0 +1,527 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Byte code instructions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_jit_1.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Byte code instructions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This page gives a brief description of each of the byte code instructions that the virtual machine has.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_1">Object management</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_2">Math instructions</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_3">Bitwise instructions</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_4">Comparisons</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_5">Type conversions</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_6">Increment and decrement</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_7">Flow control</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_8">Stack and data management</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_9">Global variables</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html#doc_adv_jit_1_10">Initialization list management</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_1"></a>
|
||||
Object management</h1>
|
||||
<p>Perform a bitwise copy of a memory buffer to another</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa06ef833e37285449bfc72e0c93479a9">asBC_COPY</a></li>
|
||||
</ul>
|
||||
<p>Push the address and length of a string on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa9541dbcbb58f820d5d8e81414367d5e">asBC_STR</a></li>
|
||||
</ul>
|
||||
<p>Allocate the memory for an object and setup the VM to execute the constructor</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac215e24151dbbf8ca218ee90b77953d2">asBC_ALLOC</a></li>
|
||||
</ul>
|
||||
<p>Release the memory of an object or list buffer</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1d13cb9820edf1d65e09e3c70f67d3b9">asBC_FREE</a></li>
|
||||
</ul>
|
||||
<p>Move the address in an object variable to the object register. The address in the variable is then cleared.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a05fa84bd9f65d7e99871d9b78da54e16">asBC_LOADOBJ</a></li>
|
||||
</ul>
|
||||
<p>Move the address from the object register to an object variable. The address in the object register is then cleared.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aaa9dd5f07ce2b4b9d72750daa4b64294">asBC_STOREOBJ</a></li>
|
||||
</ul>
|
||||
<p>Copy the object handle from one address to another. The reference count of the object is updated to reflect the copy.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0509f97130860b6fe3477f66e9fb712d">asBC_REFCPY</a></li>
|
||||
</ul>
|
||||
<p>Copy the object handle on stack to a handle in a variable. The reference count of the object is updated to reflect the copy.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8b1c7e7b7c8054b36a9d48c3452adf79">asBC_RefCpyV</a></li>
|
||||
</ul>
|
||||
<p>Push the pointer of an object type on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0dcad2ccee9332253501c3cef2200fad">asBC_OBJTYPE</a></li>
|
||||
</ul>
|
||||
<p>Push the type id on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8f1ffc19b950ebc7b6a4b9ac97f8dc4d">asBC_TYPEID</a></li>
|
||||
</ul>
|
||||
<p>Pop an address to a script object from the stack. If the desired cast can be made store the address in the object register.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4ef6c5e255ffe285bff104bacaed2ba9">asBC_Cast</a></li>
|
||||
</ul>
|
||||
<p>Push the function pointer on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab4a58c4177502bd6d3a034f2d4244404">asBC_FuncPtr</a></li>
|
||||
</ul>
|
||||
<p>Load the address to a property of the object into the value register. Substitutes the sequence PshV4/8, ADDSi, PopRPtr.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8950187a9c91330124df91bb27d7a1a3">asBC_LoadThisR</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a55e484687643f87565827249a81cf3a8">asBC_LoadRObjR</a></li>
|
||||
</ul>
|
||||
<p>Load the address to a property of a value object into the value register. Substitutes the sequence PSF, ADDSi, PopRPtr.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2285121bf664f86d462560fde6dad0f7">asBC_LoadVObjR</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_2"></a>
|
||||
Math instructions</h1>
|
||||
<p>Negate the value in the variable. The original value is overwritten.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a01fe11f3f95464cb3e409c3181a02c1a">asBC_NEGi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a7de6d0118307feca68660e67c79ca7dc">asBC_NEGf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a928187662dfd857cf8edb10a632651d4">asBC_NEGd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a3cf16372d571ec566ae93fd80e05b1ad">asBC_NEGi64</a></li>
|
||||
</ul>
|
||||
<p>Perform the operation with the value of two variables and store the result in a third variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a42520944f391260636e0eed5c9ab76a9">asBC_ADDi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af04edb64674c1c46b1769b4f31828441">asBC_SUBi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a93c630d303bb6e91e044d6afea71b798">asBC_MULi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a27123834824beb61355869faf5e23cf4">asBC_DIVi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae8e569143d23f682b3aecfa100bdfd4e">asBC_MODi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1b9ae2022b484a3c44820b6528c68ac0">asBC_POWi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a45adae8be4e9dde1b77dc9346786cfef">asBC_POWu</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab1bffd05b8b41e4a9dd09618b82bba9d">asBC_ADDf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aca247b39114dc45ae993dd1cf80226aa">asBC_SUBf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab32f923ffcabab481a2e46f702b17f7a">asBC_MULf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0acf3448b40f2fc34b4007f27c4f8488a2">asBC_DIVf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae54338068d6b6e965c497c6b1d68c64e">asBC_MODf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aedc33b037796cfbb5879799a6bea3b0d">asBC_POWf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad2ff7a206ad788bd2b37b8ee92be7940">asBC_ADDd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a40632786e202cc6a617bbe63a8d4cc0f">asBC_SUBd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a411e71202157cfece504379e6171a464">asBC_MULd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a016b86c3e0706775fc653d6f94048765">asBC_DIVd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac2137a8a8fe7af5070f37e796d863af2">asBC_MODd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a17794eb37e2e24d3f92945e492fd8fdc">asBC_POWd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a550ee3e286be8a70a06194206c0ae1b9">asBC_POWdi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab1afb9b4dbebb726108b46887175c57e">asBC_ADDi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a14984f047b26178d73ea024e97b3718c">asBC_SUBi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a38931ac737104c4ccca730705bd7ec48">asBC_MULi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9f31be749c98afaa86f5b3a83218752b">asBC_DIVi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a3bd852f5aa7c1a12da37a7ac91b1c83f">asBC_MODi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a7546139b9cafeae5d71a345ec3b4424d">asBC_POWi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a23bbb267da86c108b4fe23f0443d5f1d">asBC_POWu64</a></li>
|
||||
</ul>
|
||||
<p>Perform the operation with a constant value and the value of the variable. The original value is overwritten.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1194db3e433a943156d548b2bb34ef13">asBC_ADDIi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab77b30af827c52ee62a5ccab94d96003">asBC_SUBIi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af29eb13449c228f4dead9ba6da590147">asBC_MULIi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a15032e422f3346940aa37ec6dc6305d7">asBC_ADDIf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a83fc6f0a163316a6be6c280df57fcd13">asBC_SUBIf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a29cb2ee51427268cf549f90e110b1e38">asBC_MULIf</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_3"></a>
|
||||
Bitwise instructions</h1>
|
||||
<p>Perform a boolean not operation on the value in the variable. The original value is overwritten.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a13a6093971474018818db5a76f012f26">asBC_NOT</a></li>
|
||||
</ul>
|
||||
<p>Perform a bitwise complement on the value in the variable. The original value is overwritten.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac9e8418aad908e23c4e2e9cbbc71f8fe">asBC_BNOT</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a263c5cfa90baf8f63c5b4d110c3d9daa">asBC_BNOT64</a></li>
|
||||
</ul>
|
||||
<p>Perform the operation with the value of two variables and store the result in a third variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a051857d502a904223293d1604765c0f5">asBC_BAND</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4265bc99ed27ff3e3cd55e7de3f6ee57">asBC_BOR</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a099bdbc768c58ad62d2662dd9727806a">asBC_BXOR</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af1dff3cce666a689e8b1d5ceb91f1b42">asBC_BAND64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a5d6d553690fa38dc7f2b6a7b9ee14345">asBC_BOR64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae4d7a6a1af23b2f14d5af7b6dfaa3f28">asBC_BXOR64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a671220a8df608a65acb7c5be7d950134">asBC_BSLL</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a427239dea36c73be86be67963dbc1935">asBC_BSRL</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae7f2672c3c3a6859f17ebc25df4d95a1">asBC_BSRA</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af18e856f167de0796acb84d3f5df09b2">asBC_BSLL64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0abb511dcd15fb9875ba270d5b95fed24d">asBC_BSRL64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4203e09b3bf5f15810f0e2076c0088a5">asBC_BSRA64</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_4"></a>
|
||||
Comparisons</h1>
|
||||
<p>Compare the value of two variables and store the result in the value register.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af81b0602117dd9ef104dea7d2d526cfa">asBC_CMPi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2d473195aba3ddcc8d6419c047d0c741">asBC_CMPu</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a158d7962cea577c9a18f639976c6c0ab">asBC_CMPf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad72b54941de6dccfbea9c6ccb5d915df">asBC_CMPd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa2c75f0562b433b18406a939bcd62e95">asBC_CMPi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af521b982839cdc97e9b2413ac085b09f">asBC_CMPu64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a17c0368321613c9e38e438f96b80bdd7">asBC_CmpPtr</a></li>
|
||||
</ul>
|
||||
<p>Compare the value of a variable with a constant and store the result in the value register.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a33a798d1fe04ec8e1794ddb0838039d9">asBC_CMPIi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad7195755387f9159b4a2c5de9e60a068">asBC_CMPIu</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2f5efa47419aa3a053f1e8916b46e303">asBC_CMPIf</a></li>
|
||||
</ul>
|
||||
<p>Test the value in the value register. Update the value register according to the result.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0afa0764106ecce859b73b84119cdbbb19">asBC_TZ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac63ed68678f4e7490d67727fd3dc6a80">asBC_TNZ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0136c50e72d9f3e09f053768373f8fd2">asBC_TS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6283325ca6354974eec243ce918e6902">asBC_TNS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6dc225b22eecb133457b82700081cbcf">asBC_TP</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa57f16a2b46be5e2ce7740389c8eb479">asBC_TNP</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_5"></a>
|
||||
Type conversions</h1>
|
||||
<p>Convert the value in the variable. The original value is overwritten.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aea965df01399592f1e8c3950a35e837f">asBC_iTOb</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0acdf698af6bd4a5e427922e9462244319">asBC_iTOw</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0afbfb6f5aaf4d6599e16b4bfe458ce01e">asBC_sbTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aad0cc8bb8012f257fa99f01b8b7035bd">asBC_swTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9c20fcde56da1d0386a10490fb13a7d6">asBC_ubTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1d90e73c2b31b0e15282d092b46cf742">asBC_uwTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a92116eabda2e6b20e1ea2a13a316decd">asBC_iTOf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a505d5d669a5d046b5fe5edbde407d12a">asBC_fTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6f445f24f6501cf4c3711929a1d5e111">asBC_uTOf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9e9e1d16d150ca95e5f8abee59aaed51">asBC_fTOu</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a043e40662a884a7c39bbd982d3e2266f">asBC_dTOi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a062cb021be1b64d913527c22c7dba896">asBC_dTOu64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a7e110775dee3e08f9ef7e2215fb48b26">asBC_i64TOd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a61a9abe7f4b17874cc1f2eff761bc3b2">asBC_u64TOd</a></li>
|
||||
</ul>
|
||||
<p>Convert the value of a variable and store the result in another variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0afb5dbe4edea3e5cfa521fd3a5738ccf6">asBC_dTOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab316237649a76cf10a1b9bc68c2792c4">asBC_dTOu</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a854599de98fcbd9334c9223e8e9058db">asBC_dTOf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad9a5f8875c44b01fa6e1501bb70bae00">asBC_iTOd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0abb2e2f37012d6cb75b446fc992dba6c4">asBC_uTOd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8d1a589383ae9187b58a3f774cbe77cd">asBC_fTOd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae66d679b16934aeb2c7047ea1b1fae85">asBC_i64TOi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a22f2099b91cb1bde2df44760ea2efed7">asBC_i64TOf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad293bf12c4a8de3c50794a9eaeac636d">asBC_u64TOf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af5f7cad82e5cd2dc4a3d690a2ab46bce">asBC_uTOi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa48a1b118c32dc9d5667b9039aa06bff">asBC_iTOi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0acd75aec128802694c2674b122204e704">asBC_fTOi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae5bd9d9c6b756c2898f2776b0b08e793">asBC_fTOu64</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_6"></a>
|
||||
Increment and decrement</h1>
|
||||
<p>Increment or decrement the value pointed to by the address in the value register.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a152dde2647cf17bf01f255cab7d7a398">asBC_INCi8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aeb53c8898d91276563cf360539b2c4ce">asBC_DECi8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4669b8c92a8b8d9c6e84d0ed1db14d33">asBC_INCi16</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9ea8e03a8da22997477fca4f79d55830">asBC_DECi16</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a630408d0f3892bfa8ba01da409ca30e3">asBC_INCi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad78d2aec3e51a9aaf3fb5f3c12afc420">asBC_DECi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6216ec910e53970e52e518da4786a37b">asBC_INCi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a27cdd04643b9331e2aedfb6c1af1c021">asBC_DECi64</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aef2f50c2ed4d67c3da6630616ad00a7b">asBC_INCf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0fedf5312b600d2cd8e991139ff237f1">asBC_DECf</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a46b7c1d75685f454688e361e4da99994">asBC_INCd</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a46ccee51c06462cd452c6a97a2854a22">asBC_DECd</a></li>
|
||||
</ul>
|
||||
<p>Increment or decrement the value in the variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af9579b13bff9bcc81710fe7dba9c0957">asBC_IncVi</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0f57e25fb34f2d086f35f60cfe51782e">asBC_DecVi</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_7"></a>
|
||||
Flow control</h1>
|
||||
<p>Setup the VM to begin execution of the other script function</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4055fd59f44ce3f31eac60377b0967c8">asBC_CALL</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aedb4e479a4988aac48f1facb6a0048d6">asBC_CALLINTF</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a22f812924fa0048de540e0cca53a2718">asBC_CALLBND</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a35c09c890b9f46160c193a3a07cdeedb">asBC_CallPtr</a></li>
|
||||
</ul>
|
||||
<p>Setup the VM to return to the calling function</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0adf0df27f972bc4edb9b2213fe6448f68">asBC_RET</a></li>
|
||||
</ul>
|
||||
<p>Make an unconditional jump to a relative position</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6742a11dd679468b98df9c45aabfb32b">asBC_JMP</a></li>
|
||||
</ul>
|
||||
<p>Make a jump to a relative position depending on the value in the value register</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a497ae321f5a5889c9bee415b7cc38e9c">asBC_JZ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a262d3c0a50f45e6b6de3f1b77f4b4bf0">asBC_JNZ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2357fddab027985d9af0398e304b0ec1">asBC_JS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a736796cbac759ad4fc43bb09267f36ca">asBC_JNS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac2792270f8022801384ccd0ae3b00604">asBC_JP</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae4f95a73cfe667f1928e7766ea09511e">asBC_JNP</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a31eae477a85a0b1ee618df42deb0519c">asBC_JMPP</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9da365af8ea85e3eb538567207d4a705">asBC_JLowZ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a12e9c561f401be75a6db13a94a687d77">asBC_JLowNZ</a></li>
|
||||
</ul>
|
||||
<p>Call an application registered function</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac21b3ff5a3ecb6d834bfe2bf7ff36669">asBC_CALLSYS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a25fe35c5c31674255821ecc3c9a9d23c">asBC_Thiscall1</a></li>
|
||||
</ul>
|
||||
<p>Save the state and suspend execution, then return control to the application</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a175714567c483ff439c1d2c125ca9608">asBC_SUSPEND</a></li>
|
||||
</ul>
|
||||
<p>Give control of execution to the JIT compiled function</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6705ee9692b45f118cfe0ea24581fae5">asBC_JitEntry</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_8"></a>
|
||||
Stack and data management</h1>
|
||||
<p>Push a constant value on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a53fa213a7d3fed6add6d37dfe073e1cb">asBC_PshC4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac987a5f48ff66860142d01ed51670d91">asBC_PshC8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a9343148f733f970e3463f37fac57f998">asBC_PshNull</a></li>
|
||||
</ul>
|
||||
<p>Push the stack frame pointer on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1c42ff5ba726e656b989e3408fe9648f">asBC_PSF</a></li>
|
||||
</ul>
|
||||
<p>Swap the top values on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac23d851c5aaffca166d6494bec9bcf24">asBC_SwapPtr</a></li>
|
||||
</ul>
|
||||
<p>Dereference top pointer on stack. Raises exception if pointer is null.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2628264804fd19af3ce94e0336b3eeeb">asBC_RDSPtr</a></li>
|
||||
</ul>
|
||||
<p>Add an offset to the top address on the stack. Raises exception if address is null.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0219f343e6e7248e72d209ea22b63f4d">asBC_ADDSi</a></li>
|
||||
</ul>
|
||||
<p>Push the value of a variable on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ab858dd8ba0b9fed72638c549f40f60ba">asBC_PshV4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ae2923dbf7fc9bb70c0c3cbbf8673467c">asBC_PshV8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a15f565f207bdaab4d5b72867cdd25007">asBC_PshVPtr</a></li>
|
||||
</ul>
|
||||
<p>Initialize the value of a variable with a constant.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af3909e9889d0994c0d0190a147eac3cb">asBC_SetV1</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a709cec30c38c5dc89dfcd92341dafd61">asBC_SetV2</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a95d9223bb76b2abcbc590318007aed93">asBC_SetV4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ade5e3b21c7d1b9348ac12fc4cd1cbf8a">asBC_SetV8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8b5cd32b4b5bc6aaafb0456d931dc11e">asBC_ClrVPtr</a></li>
|
||||
</ul>
|
||||
<p>Copy the value of one variable to another.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac8e1a29718cf8958201d578d56cf74b4">asBC_CpyVtoV4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af0a7f6b4a1c14352e7cd02e03c1e7595">asBC_CpyVtoV8</a></li>
|
||||
</ul>
|
||||
<p>Validate that an expected pointer is not null.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0ae4b5ff463c26aad9fbd975a144f2fa">asBC_CHKREF</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ad0c18f6eab27072771563d4464d06a4a">asBC_ChkRefS</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a81142673f63ffd177e20b6296718d3aa">asBC_ChkNullV</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af859e97239e00dd003a8f75fbf963ded">asBC_ChkNullS</a></li>
|
||||
</ul>
|
||||
<p>Push the variable index with the size of a pointer on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0adb056673fe9802b5d8351835d0c4cea9">asBC_VAR</a></li>
|
||||
</ul>
|
||||
<p>Replace a variable index on the stack with an address.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6ad13f895f055f69384efb4a67941369">asBC_GETREF</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aaef456de01ad209271078728d304b803">asBC_GETOBJ</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a6b9d0ef0c8e981a591c384792acf2c6d">asBC_GETOBJREF</a></li>
|
||||
</ul>
|
||||
<p>Pop and discard an address from the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a61f3044359836f88001928bcab382c1e">asBC_PopPtr</a></li>
|
||||
</ul>
|
||||
<p>Pop or push an address to or from the value register.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a567f07266bd50926c205460b31d579f6">asBC_PopRPtr</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a3ecef93739a85d45002cd073b00da52c">asBC_PshRPtr</a></li>
|
||||
</ul>
|
||||
<p>Copy a value between value register and a variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af77782bde1062e849fc6c02c8c4e0106">asBC_CpyVtoR4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a25f9b87968cb0fea646d003a90bbd0a6">asBC_CpyVtoR8</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a27458705bfaa7f4e5b27f848c0e59c7c">asBC_CpyRtoV4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a399ae190caa78f468883f9736e8f9d40">asBC_CpyRtoV8</a></li>
|
||||
</ul>
|
||||
<p>Copy a value from a variable to the address held in the value register</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a94dbdd03bb807ceb48c3ced7b08cbaf3">asBC_WRTV1</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0af50492589b9b48fb6cce810ea12b2313">asBC_WRTV2</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aecc937d822668f3d443c2cf7c2c9a91b">asBC_WRTV4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac912670273a5cc5857967d6c4ee9fb71">asBC_WRTV8</a></li>
|
||||
</ul>
|
||||
<p>Copy a value from the address held in the value register to a variable</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0375f41153eeaa6d250a6ee262ffa0ba">asBC_RDR1</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0aa470ed962fa3e1a86296998914cbcc12">asBC_RDR2</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0ac66bc5d2959ef22b6c967313aa791b54">asBC_RDR4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a36dc7a09798a7055d8faece1321e241a">asBC_RDR8</a></li>
|
||||
</ul>
|
||||
<p>Load the address of the variable into the value register</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a506cf72989aae9c3f0613b3fdd788a96">asBC_LDV</a></li>
|
||||
</ul>
|
||||
<p>Clear the upper bytes of the value register</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a1293f6086ce51f270a7d756413cabb9c">asBC_ClrHi</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_9"></a>
|
||||
Global variables</h1>
|
||||
<p>Push the value of a global variable on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a71be4bc7beb5407aac980f73cce33bd6">asBC_PshG4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a0c1133692af5029feef4a1e5aec5c65b">asBC_PshGPtr</a></li>
|
||||
</ul>
|
||||
<p>Load the address of a global variable into the value register</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a7eecc42f41efaa2a9e52a38b5b2e0761">asBC_LDG</a></li>
|
||||
</ul>
|
||||
<p>Load the address of a global variable into the value register and copy the value of the global variable to local variable</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a2d39346b29e025ea48c3d1f9ad5be43e">asBC_LdGRdR4</a></li>
|
||||
</ul>
|
||||
<p>Copy a value between local variable and global variable.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4e7398002dfd57870657a8df142259a1">asBC_CpyVtoG4</a></li>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a4ed62e4b84509466aef25d638026b883">asBC_CpyGtoV4</a></li>
|
||||
</ul>
|
||||
<p>Push the address of the global variable on the stack.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0adc83ae72a402eb4c8d8248ef2ef75d9c">asBC_PGA</a></li>
|
||||
</ul>
|
||||
<p>Initialize the variable of a global variable with a constant.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a880a2be05a247612df28ea4569a7a99b">asBC_SetG4</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_jit_1_10"></a>
|
||||
Initialization list management</h1>
|
||||
<p>Allocates the memory for the initialization list buffer</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a60cb5c56bd8cd1dfd7bde88be588b19c">asBC_AllocMem</a></li>
|
||||
</ul>
|
||||
<p>Sets the number of elements that will be repeated afterwards</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a8c8a41c980d7b8f2054780da0153ae64">asBC_SetListSize</a></li>
|
||||
</ul>
|
||||
<p>Sets the type of the next element</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a7abb1d21f26401e75305a2b4cf7a4733">asBC_SetListType</a></li>
|
||||
</ul>
|
||||
<p>Pushes the address of the list element on the stack</p>
|
||||
<ul>
|
||||
<li><a class="el" href="angelscript_8h.html#ab3692c4e5d47fc93f8c9646d1783aef0a980fccdeeebe67503f9623722ed893a5">asBC_PshListElmnt</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
115
docs/manual/doc_adv_jit_topic.html
Normal file
115
docs/manual/doc_adv_jit_topic.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: JIT compilation</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_jit_topic.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">JIT compilation </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><ul>
|
||||
<li><a class="el" href="doc_adv_jit.html">How to build a JIT compiler</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_1.html">Byte code instructions</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
19
docs/manual/doc_adv_jit_topic.js
Normal file
19
docs/manual/doc_adv_jit_topic.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var doc_adv_jit_topic =
|
||||
[
|
||||
[ "How to build a JIT compiler", "doc_adv_jit.html", [
|
||||
[ "The structure of the JIT function", "doc_adv_jit.html#doc_adv_jit_3", null ],
|
||||
[ "Traversing the byte code", "doc_adv_jit.html#doc_adv_jit_2", null ]
|
||||
] ],
|
||||
[ "Byte code instructions", "doc_adv_jit_1.html", [
|
||||
[ "Object management", "doc_adv_jit_1.html#doc_adv_jit_1_1", null ],
|
||||
[ "Math instructions", "doc_adv_jit_1.html#doc_adv_jit_1_2", null ],
|
||||
[ "Bitwise instructions", "doc_adv_jit_1.html#doc_adv_jit_1_3", null ],
|
||||
[ "Comparisons", "doc_adv_jit_1.html#doc_adv_jit_1_4", null ],
|
||||
[ "Type conversions", "doc_adv_jit_1.html#doc_adv_jit_1_5", null ],
|
||||
[ "Increment and decrement", "doc_adv_jit_1.html#doc_adv_jit_1_6", null ],
|
||||
[ "Flow control", "doc_adv_jit_1.html#doc_adv_jit_1_7", null ],
|
||||
[ "Stack and data management", "doc_adv_jit_1.html#doc_adv_jit_1_8", null ],
|
||||
[ "Global variables", "doc_adv_jit_1.html#doc_adv_jit_1_9", null ],
|
||||
[ "Initialization list management", "doc_adv_jit_1.html#doc_adv_jit_1_10", null ]
|
||||
] ]
|
||||
];
|
||||
130
docs/manual/doc_adv_multithread.html
Normal file
130
docs/manual/doc_adv_multithread.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Multithreading</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_multithread.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Multithreading </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>AngelScript supports multithreading, though not yet on all platforms. You can determine if multithreading is supported on your platform by calling the <a class="el" href="group__api__auxiliary__functions.html#gaba86cba765a7148e2a306b4305ba48f9">asGetLibraryOptions</a> function and checking the returned string for <code>"AS_NO_THREADS"</code>. If the identifier is in the returned string then multithreading is not supported.</p>
|
||||
<p>Even if you don't want or can't use multithreading, you can still write applications that execute <a class="el" href="doc_adv_concurrent.html">multiple scripts simultaneously</a>.</p>
|
||||
<h1><a class="anchor" id="doc_adv_multithread_1"></a>
|
||||
Things to think about with a multithreaded environment</h1>
|
||||
<ul>
|
||||
<li>If you plan on creating engines in multiple threads, the application should call <a class="el" href="group__api__multithread__functions.html#gaa5bea65c3f2a224bb1c677515e3bb0e2">asPrepareMultithread</a> before the first engine is created, and <a class="el" href="group__api__multithread__functions.html#ga011355a8978d438cec77b4e1f041cba7">asUnprepareMultithread</a> after the last engine has been released. This is to avoid race conditions when the engine creates the internal shared thread manager. If only one script engine is used, then it is not necessary to do go through these extra steps.</li>
|
||||
<li>Always call <a class="el" href="group__api__multithread__functions.html#ga51079811680d5217046aad2a2b695dc7">asThreadCleanup</a> before terminating a thread that accesses the script engine. If this is not done, the memory allocated specifically for that thread will be lost until the script engine is freed.</li>
|
||||
<li>If the application is composed of multiple application modules (dlls) then it may be necessary to share a single thread manager across the modules. Do this by calling <a class="el" href="group__api__multithread__functions.html#ga948def50c98db90596b706ca4b58041e">asGetThreadManager</a> in the main module and then call <a class="el" href="group__api__multithread__functions.html#gaa5bea65c3f2a224bb1c677515e3bb0e2">asPrepareMultithread</a> on the secondary modules with the returned pointer.</li>
|
||||
<li>Multiple threads may execute scripts in separate contexts. The contexts may execute scripts from the same module, but if the module has global variables you need to make sure the scripts perform proper access control so that they do not get corrupted, if multiple threads try to update them simultaneously.</li>
|
||||
<li>The engine will only allow one thread to build scripts at any one time, since this is something that changes the internal state of the engine and cannot safely be done in multiple threads simultaneously.</li>
|
||||
<li>Reference counters for objects that will be referred to by scripts in different threads must be thread safe in order to avoid race conditions as multiple threads attempt to update the same reference counter. The library provides a pair of functions to facilitate the implementation of thread safe reference counters. See <a class="el" href="group__api__multithread__functions.html#gaf0074d581ac2edd06e63e56e4be52c8e">asAtomicInc</a> and <a class="el" href="group__api__multithread__functions.html#ga0565bcb53be170dd85ae27a5b6f2b828">asAtomicDec</a>.</li>
|
||||
<li>Resources that are shared by script modules such as registered properties and objects must be protected by the application for simultaneous access, as the script engine doesn't do this automatically. A read-write lock is provided by the library that can be used for this. See <a class="el" href="group__api__multithread__functions.html#ga016dbf716a1c761b3f903b92eb8bb580">asAcquireExclusiveLock</a>, <a class="el" href="group__api__multithread__functions.html#ga8a0617637eea3d76e33a52758b2cd49f">asReleaseExclusiveLock</a>, <a class="el" href="group__api__multithread__functions.html#gaa45545a038adcc8c73348cfe9488f32d">asAcquireSharedLock</a>, and <a class="el" href="group__api__multithread__functions.html#ga44f7327c5601e8dbf74768a2f3cc0dc3">asReleaseSharedLock</a>.</li>
|
||||
<li>If you use <a class="el" href="doc_adv_custom_options.html#doc_adv_custom_options_engine">automatic garbage collection</a> (turned on by default) then you must make sure the behaviours registered for types to <a class="el" href="doc_gc_object.html">support garbage collection</a> must be thread safe as the garbage collector can be invoked from any thread that is executing a script.</li>
|
||||
<li>Many of the add-ons are not thread safe. Either create your own or make sure you review the add-ons you wish to use to guarantee thread safety.</li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_adv_fibers"></a>
|
||||
Fibers</h1>
|
||||
<p>AngelScript can be used with fibers as well. However, as fibers are not real threads you need to be careful if multiple fibers need to execute scripts. AngelScript keeps track of active contexts by pushing and popping the context pointers on a stack. With fibers you can easily corrupt this stack if you do not pay attention to where and when script executions are performed.</p>
|
||||
<p>Try to avoid switching fibers when a script is executing, instead you should <a class="el" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">suspend</a> the current script execution and only switch to the other fiber when the context's <a class="el" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a> method returns. If you really must switch fibers while executing a script, then make sure the second fiber initiates and concludes its own script execution before switching back to the original fiber. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
156
docs/manual/doc_adv_namespace.html
Normal file
156
docs/manual/doc_adv_namespace.html
Normal file
@@ -0,0 +1,156 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Using namespaces</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_namespace.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Using namespaces </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Namespaces can be used to group related functions and other entities together. Doing so avoids potential conflicts with other entities that happen to use the same name, but is otherwise unrelated.</p>
|
||||
<p>Namespaces can be used in the application registered interface, as well as in the <a class="el" href="doc_global_namespace.html">scripts</a>.</p>
|
||||
<h1><a class="anchor" id="doc_adv_namespace_reg"></a>
|
||||
Registering the interface with namespaces</h1>
|
||||
<p>To register a function, or other entity in a specific namespace, the application should first call the method <a class="el" href="classas_i_script_engine.html#a605f114814f1f64804c04391816d948b">SetDefaultNamespace</a> to define the desired namespace. After that the registration follows the normal procedure as described in the <a class="el" href="doc_register_api_topic.html">chapter on registering the interface</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> RegisterInNamespace(<a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Register the type and function in the namespace</span></div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a605f114814f1f64804c04391816d948b">SetDefaultNamespace</a>(<span class="stringliteral">"myspace"</span>); assert( r >= 0 );</div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"mytype"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void myfunc()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(myfunc), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>If desired nested namespaces can also be used by separating them with the scoping token, ::, e.g. SetDefaultNamespace("outer::inner");</p>
|
||||
<h1><a class="anchor" id="doc_adv_namespace_enum"></a>
|
||||
Finding entities in namespaces</h1>
|
||||
<p>As namespaces allow multiple declarations with the same signature, it is necessary to specify in which namespace a search for an entity is to be done. This is also done with the SetDefaultNamespace method. This applies to both the <a class="el" href="classas_i_script_engine.html#a605f114814f1f64804c04391816d948b">engine</a> and the <a class="el" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">module</a> interfaces.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> FindFuncInNamespace(<a class="code" href="classas_i_script_module.html">asIScriptModule</a> *module)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> r;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Look for the function in the namespace, i.e. myspace::myfunc</span></div>
|
||||
<div class="line"> r = module-><a class="code" href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">SetDefaultNamespace</a>(<span class="stringliteral">"myspace"</span>); assert( r >= 0 );</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *func1 = module-><a class="code" href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">GetFunctionByName</a>(<span class="stringliteral">"myfunc"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// When searching for a matching declaration the default namespace is also</span></div>
|
||||
<div class="line"> <span class="comment">// used unless an explicit namespace is given in the declaration itself.</span></div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *funcA = module-><a class="code" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>(<span class="stringliteral">"void myfunc()"</span>);</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *funcB = module-><a class="code" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>(<span class="stringliteral">"void myspace::myfunc()"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> assert( funcA == funcB );</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_module_html_ab4754d55d8667aefbed135b4794d461b"><div class="ttname"><a href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">asIScriptModule::GetFunctionByDecl</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunctionByDecl(const char *decl) const =0</div><div class="ttdoc">Returns the function by its declaration.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a605f114814f1f64804c04391816d948b"><div class="ttname"><a href="classas_i_script_engine.html#a605f114814f1f64804c04391816d948b">asIScriptEngine::SetDefaultNamespace</a></div><div class="ttdeci">virtual int SetDefaultNamespace(const char *nameSpace)=0</div><div class="ttdoc">Sets the current default namespace for registrations and searches.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a81d727c9677b683942b6087df4ce95ad"><div class="ttname"><a href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">asIScriptModule::GetFunctionByName</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunctionByName(const char *name) const =0</div><div class="ttdoc">Returns the function by its name.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_ab8629af79cee8212d0d244314d36f42a"><div class="ttname"><a href="classas_i_script_module.html#ab8629af79cee8212d0d244314d36f42a">asIScriptModule::SetDefaultNamespace</a></div><div class="ttdeci">virtual int SetDefaultNamespace(const char *nameSpace)=0</div><div class="ttdoc">Sets the default namespace that should be used in the following calls.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
151
docs/manual/doc_adv_precompile.html
Normal file
151
docs/manual/doc_adv_precompile.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Pre-compiled byte code</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_precompile.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Pre-compiled byte code </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Sometimes it may be useful to use pre-compiled bytecode instead of re-building the scripts every time a script is loaded. This can for example reduce load times, or if scripts are transferred over the net, it can reduce the transfer time for large scripts.</p>
|
||||
<p>To save already compiled code you should call the <a class="el" href="classas_i_script_module.html#ac6cd95dd97cc6abf28ab4d82257f5aeb">SaveByteCode</a> method on the <a class="el" href="classas_i_script_module.html">asIScriptModule</a>, passing in a pointer to the object that implements the <a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> interface. The script module will then push all the bytecode and related data onto this object with the <a class="el" href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">Write</a> method.</p>
|
||||
<p>When loading the pre-compiled bytecode you should first get an instance of the <a class="el" href="classas_i_script_module.html">asIScriptModule</a>, just as if compiling a new script. Instead of calling AddScriptSection followed by Build you will call the <a class="el" href="classas_i_script_module.html#a8b4a222e5309c6b367f136b6d2f664ba">LoadByteCode</a> method, passing it a pointer to the binary stream object. The script module will then pull all the bytecode and related data from that object with the <a class="el" href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">Read</a> method to reconstruct the script module.</p>
|
||||
<p>Here's a very simple example of how to implement the <a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a> interface:</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>CBytecodeStream : <span class="keyword">public</span> <a class="code" href="classas_i_binary_stream.html">asIBinaryStream</a></div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> CBytecodeStream(FILE *fp) : f(fp) {}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">void</span> <a class="code" href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">Write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> *ptr, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> size) </div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( size == 0 ) <span class="keywordflow">return</span>; </div>
|
||||
<div class="line"> fwrite(ptr, size, 1, f); </div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> <a class="code" href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">Read</a>(<span class="keywordtype">void</span> *ptr, <a class="code" href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a> size) </div>
|
||||
<div class="line"> { </div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( size == 0 ) <span class="keywordflow">return</span>; </div>
|
||||
<div class="line"> fread(ptr, size, 1, f); </div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">protected</span>:</div>
|
||||
<div class="line"> FILE *f;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_samples_asbuild.html">Generic compiler</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_adv_precompile_1"></a>
|
||||
Things to remember</h1>
|
||||
<ul>
|
||||
<li>All the objects, methods, properties, etc, used when compiling the bytecode must also be registered when loading the precompiled bytecode, otherwise the load will fail when not finding the correct entity.</li>
|
||||
<li>The script engine doesn't perform validation of the pre-compiled bytecode, so the application is responsible for authenticating the source. If this authentication isn't performed by the application you'll have potential security risks in your application as the bytecode may have been manually manipulated to perform otherwise illegal tasks.</li>
|
||||
<li>If the application that compiles the script code is separate from the application that will execute them, then you may register the functions and methods with null pointers so you don't need to actually implement all of them. Object properties must be registered with different offsets so that they can be differentiated by the bytecode loader. You should also set the engine property <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0facac241d97facce4eaf9e5b0ca40dfcf1">asEP_INIT_GLOBAL_VARS_AFTER_BUILD</a> to false with <a class="el" href="classas_i_script_engine.html#a1bce4e5f573a2ca0ff55163e28f761dd">asIScriptEngine::SetEngineProperty</a>, so the script engine doesn't attempt to initialize the global variables after the script has been built. The <a class="el" href="doc_addon_helpers.html">helper add-on</a> has a couple of functions to facilitate building an offline compiler.</li>
|
||||
<li>If the application is not going to compile scripts from source code, but only load pre-compiled scripts, then it may be beneficial to compile the library with the AS_NO_COMPILER define so as to reduce the size of the executable.</li>
|
||||
<li>To reduce the size of the saved bytecode you can strip the debug information from the code. This will skip saving information that is not necessary for executing the scripts, such as the name of script sections, line numbers, and the name and type of local variables.</li>
|
||||
<li>If the scripts use <a class="el" href="doc_script_shared.html">shared entities</a> then the size of the saved bytecode can be further reduced if the entities are declared as <a class="el" href="doc_script_shared.html#doc_script_shared_external">external</a>. To allow the offline compiler to compile scripts with external shared entities, the offline compiler must first build another module with all the shared entities that should be allowed to be declared as external.</li>
|
||||
<li>The saved bytecode is platform independent with only a couple of exceptions that is unlikely to affect application developers. The exceptions are 1) difference in size of primitive types (e.g. bool on older Mac PPC platforms) and 2) CPU floating point representation (i.e. IEEE 754 versus non-IEEE 754). Differences in pointer size (32bit vs 64bit), CPU endianess, different size of registered types and offsets of registered properties are all handled to provide platform independence.</li>
|
||||
<li>The saved bytecode is not guaranteed to be compatible for different versions of the AngelScript library so make sure you use the same library version when saving the bytecode that will be used when loading it. </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_binary_stream_html_a8bbd68cea1f96b42c723f9732ac19140"><div class="ttname"><a href="classas_i_binary_stream.html#a8bbd68cea1f96b42c723f9732ac19140">asIBinaryStream::Read</a></div><div class="ttdeci">virtual int Read(void *ptr, asUINT size)=0</div><div class="ttdoc">Read size bytes from the stream into the memory pointed to by ptr.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ac8186f029686800b7ce36bde4a55c815"><div class="ttname"><a href="angelscript_8h.html#ac8186f029686800b7ce36bde4a55c815">asUINT</a></div><div class="ttdeci">unsigned int asUINT</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:600</div></div>
|
||||
<div class="ttc" id="aclassas_i_binary_stream_html"><div class="ttname"><a href="classas_i_binary_stream.html">asIBinaryStream</a></div><div class="ttdoc">A binary stream interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4051</div></div>
|
||||
<div class="ttc" id="aclassas_i_binary_stream_html_a57724f9cd63a625a843bf97e7704d9a7"><div class="ttname"><a href="classas_i_binary_stream.html#a57724f9cd63a625a843bf97e7704d9a7">asIBinaryStream::Write</a></div><div class="ttdeci">virtual int Write(const void *ptr, asUINT size)=0</div><div class="ttdoc">Write size bytes to the stream from the memory pointed to by ptr.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
131
docs/manual/doc_adv_reflection.html
Normal file
131
docs/manual/doc_adv_reflection.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Reflection</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_reflection.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Reflection </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>While the script language doesn't offer built-in functionality for reflection, the application interface do provide all the necessary methods to enumerate everything within the scripts.</p>
|
||||
<p>The article on <a class="el" href="doc_debug.html">debugging</a> shows a little of these interfaces with the focus on debugging rather than reflection. The article on <a class="el" href="doc_adv_dynamic_build.html">dynamic compilations</a> shows another aspect where scripts may be partially modified at runtime.</p>
|
||||
<p>The following will do an overview of the available methods for enumerating the various entities in a script.</p>
|
||||
<h1><a class="anchor" id="doc_adv_reflection_vars"></a>
|
||||
Enumerating variables and properties</h1>
|
||||
<p>Global variables in a script module are enumerated with the interface <a class="el" href="classas_i_script_module.html">asIScriptModule</a>. Specifically the methods <a class="el" href="classas_i_script_module.html#a87e29773f7e6f2980d75288faaa74d02">GetGlobalVarCount</a> and <a class="el" href="classas_i_script_module.html#a939e6caf004c6fdae78fe89bb244d962">GetGlobalVar</a>. <a class="el" href="classas_i_script_module.html#a00cff95b43c256cc6b9062e135a473a2">GetGlobalVarIndexByName</a> and <a class="el" href="classas_i_script_module.html#ac3d5dafe8ca92bf618f438dc79ef2906">GetGlobalVarIndexByDecl</a> can be used if the name and/or declaration of the desired variable is known before hand. To inspect or even modify the value of the global variable the method <a class="el" href="classas_i_script_module.html#a0998d375ca1de02bc72f4544806da58c">GetAddressOfGlobalVar</a> should be used.</p>
|
||||
<p>The engine interface <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> has a similar set of methods for enumerating application registered global properties, i.e. <a class="el" href="classas_i_script_engine.html#aa69f6b37f9c7bdf9b52b9c1692daf048">GetGlobalPropertyCount</a>, <a class="el" href="classas_i_script_engine.html#a93bd686853a48647d2136792e27380fb">GetGlobalPropertyByIndex</a>, <a class="el" href="classas_i_script_engine.html#a07e85878869e4d0597c1177d767dc717">GetGlobalPropertyIndexByName</a>, and <a class="el" href="classas_i_script_engine.html#a91a4cc8af51ca439ca82b9b6630439b3">GetGlobalPropertyIndexByDecl</a>.</p>
|
||||
<p>Member properties of classes are accessed through the <a class="el" href="classas_i_script_object.html">asIScriptObject</a> interface for live object instances, and <a class="el" href="classas_i_type_info.html">asITypeInfo</a> interface for inspecting the class declarations without any live object instance.</p>
|
||||
<p>Local variables within functions can also be enumerated as long as the script has been compiled with debug information. These are then enumerated through the <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> interface for inspecting the declarations, and directly through <a class="el" href="classas_i_script_context.html">asIScriptContext</a> for inspecting and/or modifying them on the stack.</p>
|
||||
<h1><a class="anchor" id="doc_adv_reflection_funcs"></a>
|
||||
Enumerating functions and methods</h1>
|
||||
<p>Global functions in a script are enumerated with the interface <a class="el" href="classas_i_script_module.html">asIScriptModule</a>, using the methods <a class="el" href="classas_i_script_module.html#a373d102f109ae0fa20584f243ead4035">GetFunctionCount</a>, <a class="el" href="classas_i_script_module.html#afd4d9951ee006caa8ec1bab3d3d206fc">GetFunctionByIndex</a>, <a class="el" href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">GetFunctionByName</a>, and <a class="el" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>.</p>
|
||||
<p>The engine interface <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> also exposes methods for enumerating application registered functions in a similar manner.</p>
|
||||
<p>To enumerate methods of classes the interface <a class="el" href="classas_i_type_info.html">asITypeInfo</a> should be used.</p>
|
||||
<h1><a class="anchor" id="doc_adv_reflection_types"></a>
|
||||
Enumerating types</h1>
|
||||
<p><a class="el" href="classas_i_script_module.html">asIScriptModule</a> is of course used to enumerate the types declared in the scripts too. The methods <a class="el" href="classas_i_script_module.html#a931d0c00cba2df1b4e368e59bac1a207">GetObjectTypeCount</a>, <a class="el" href="classas_i_script_module.html#a49ebfdd345f18d88e489edebd4888af7">GetObjectTypeByIndex</a>, and <a class="el" href="classas_i_script_module.html#ae8460fa05f441072e14f984ccf507396">GetTypeInfoByName</a> are for enumerating classes and interfaces. The methods <a class="el" href="classas_i_script_module.html#a1a241b3dfd47f7ab5bb475c757e38df9">GetEnumCount</a> and <a class="el" href="classas_i_script_module.html#a0ec42bef3874f0fc0e6b929068ae927c">GetEnumByIndex</a> are for enumerating enums.</p>
|
||||
<p>The <a class="el" href="classas_i_script_engine.html">asIScriptEngine</a> interface has near identical methods for enumerating the application registered types.</p>
|
||||
<p>Many of the above methods return values called type ids that describes the type of the respective variable, property, or function argument. In many cases the type id can be directly inspected as a bitfield to get necessary information on the what the type is. The lower bits are just a sequence number where the first 12 numbers represents the built-in primitives, and anything higher represents either application registered types or script declared types. The higher bits indicate if the type represents a primitive, object, or handle. Use the flags in <a class="el" href="angelscript_8h.html#ae8c3a67a97321be53181e9ed396ad83a">asETypeIdFlags</a> to do the necessary verifications on the type id.</p>
|
||||
<p>For type ids that represent object types it may be necessary to obtain the <a class="el" href="classas_i_type_info.html">asITypeInfo</a> instance to get further information on what the type is. The method <a class="el" href="classas_i_script_engine.html#a55cc2d9592651538efcf79eb8106a867">GetTypeInfoById</a> is used to do this translate from type id to <a class="el" href="classas_i_type_info.html">asITypeInfo</a>. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
156
docs/manual/doc_adv_scoped_type.html
Normal file
156
docs/manual/doc_adv_scoped_type.html
Normal file
@@ -0,0 +1,156 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Registering a scoped reference type</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_scoped_type.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Registering a scoped reference type </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Some C++ value types have special requirements for the memory where they are located, e.g. specific alignment needs, or memory pooling. Since AngelScript doesn't provide that much control over where and how value types are allocated, they must be registered as reference types. In this case you'd register the type as a scoped reference type.</p>
|
||||
<p>A scoped reference type will have the life time controlled by the scope of the variable that instanciate it, i.e. as soon as the variable goes out of scope the instance is destroyed. This means that the type doesn't permit handles to be taken for the type.</p>
|
||||
<p>A scoped reference type requires only that the release behaviour is registered. The addref behaviour is not permitted. If the factory behaviour is not registered the script will not be able to instanciate objects of this type, but it can still receive them as parameters from the application.</p>
|
||||
<p>Since no handles can be taken for the object type, there is no need to keep track of the number of references held to the object. This means that the release behaviour should simply destroy and deallocate the object as soon as it's called.</p>
|
||||
<div class="fragment"><div class="line">scoped *Scoped_Factory()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">new</span> scoped;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> Scoped_Release(scoped *s)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( s ) <span class="keyword">delete</span> s;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Registering a scoped reference type</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"scoped"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a> | <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aaaae92b24e278976320f19d9dc75fe6db">asOBJ_SCOPED</a>); assert( r >= 0 );</div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"scoped"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a>, <span class="stringliteral">"scoped @f()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(Scoped_Factory), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"scoped"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a>, <span class="stringliteral">"void f()"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(Scoped_Release), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>Unfortunately any function that either takes or returns the type by value in C++ must be wrapped in order to permit AngelScript to manage the life time of the values.</p>
|
||||
<p>Here's an example of a function that takes a value and returns another and the corresponding wrapper.</p>
|
||||
<div class="fragment"><div class="line">scoped Foo(scoped a)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> scoped b;</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> b;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">scoped *Foo_wrapper(<span class="keyword">const</span> scoped &a)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">new</span> scoped(Foo(a));</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Registering the function</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"scoped @Foo(const scoped &in)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(Foo_wrapper), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>Observe how the function is registered to return the scoped value by handle even though the scoped types really don't support handles. This is done because AngelScript will call Release on the returned instance after it is done with the value it received.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_reg_basicref.html">Registering a reference type</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aaaae92b24e278976320f19d9dc75fe6db"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aaaae92b24e278976320f19d9dc75fe6db">asOBJ_SCOPED</a></div><div class="ttdeci">@ asOBJ_SCOPED</div><div class="ttdoc">The life time of objects of this type are controlled by the scope of the variable....</div><div class="ttdef"><b>Definition:</b> angelscript.h:260</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a></div><div class="ttdeci">@ asBEHAVE_FACTORY</div><div class="ttdoc">Factory.</div><div class="ttdef"><b>Definition:</b> angelscript.h:362</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a></div><div class="ttdeci">@ asBEHAVE_RELEASE</div><div class="ttdoc">Release.</div><div class="ttdef"><b>Definition:</b> angelscript.h:368</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a></div><div class="ttdeci">@ asCALL_CDECL_OBJLAST</div><div class="ttdoc">A cdecl function that takes the object pointer as the last parameter.</div><div class="ttdef"><b>Definition:</b> angelscript.h:234</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f122dd87394f3a83ac766ea19f37317"><div class="ttname"><a href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">asIScriptEngine::RegisterObjectBehaviour</a></div><div class="ttdeci">virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a behaviour for the object type.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
122
docs/manual/doc_adv_single_ref_type.html
Normal file
122
docs/manual/doc_adv_single_ref_type.html
Normal file
@@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Registering a single-reference type</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_single_ref_type.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Registering a single-reference type </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>A variant of the uninstanciable reference types is the single-reference type. This is a type that have only 1 reference accessing it, i.e. the script cannot store any extra references to the object during execution. The script is forced to use the reference it receives from the application at the moment the application passes it on to the script.</p>
|
||||
<p>The reference can be passed to the script through a property, either global or a class member, or it can be returned from an application registered function or class method.</p>
|
||||
<p>The script engine will not permit declaration of functions that take this type as a parameter, neither as a reference nor as a handle. If that was allowed it would mean that a reference to the instance is placed on the stack, which in turn means that it is no longer a single-reference type.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Registering the type so that it cannot be instanciated</span></div>
|
||||
<div class="line"><span class="comment">// by the script, nor allow scripts to store references to the type</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"single"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a> | <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aafa1830b02c4d51ddc25451e7ad1a7592">asOBJ_NOHANDLE</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>This sort of type is most useful when you want to have complete control over references to an object, for example so that the application can destroy and recreate objects of the type without having to worry about potential references held by scripts. This allows the application to control when a script has access to an object and it's members.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_reg_basicref.html">Registering a reference type</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aafa1830b02c4d51ddc25451e7ad1a7592"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aafa1830b02c4d51ddc25451e7ad1a7592">asOBJ_NOHANDLE</a></div><div class="ttdeci">@ asOBJ_NOHANDLE</div><div class="ttdoc">This reference type doesn't allow handles to be held. Only valid for reference types.</div><div class="ttdef"><b>Definition:</b> angelscript.h:258</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
209
docs/manual/doc_adv_template.html
Normal file
209
docs/manual/doc_adv_template.html
Normal file
@@ -0,0 +1,209 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Template types</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_template.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Template types </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>A template type in AngelScript works similarly to how templates work in C++. The scripts will be able to instantiate different forms of the template type by specifying which subtype that should be used. The methods for the instance will then be adapted to this subtype, so that the correct handling of parameters and return types will be applied.</p>
|
||||
<p>The implementation of the template type is not a C++ template though, instead it must be implemented as a generic class that can determine what to do dynamically at runtime based on the subtype for which it was instantiated. This is obviously a lot less efficient than having specific implementations for each type, and for that reason AngelScript permits the application to register a template specialization where the extra performance is needed.</p>
|
||||
<p>This gives the best of both worlds, performance where the subtype is known before hand, and support for all other types that cannot be pre-determined.</p>
|
||||
<h1><a class="anchor" id="doc_adv_template_1"></a>
|
||||
Registering the template type</h1>
|
||||
<p>Template types can be either <a class="el" href="doc_reg_basicref.html">reference types</a> or <a class="el" href="doc_register_val_type.html">value types</a>. Both are registered in a similar manner with only a few differences.</p>
|
||||
<p>The name of the type is formed by the name of the template type plus the name of the subtype with angle brackets. Multiple subtypes can be informed, separated by comma. The type flag asOBJ_TEMPLATE must used to tell AngelScript that it is a template type that is being registered.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register the template type as a garbage collected reference type</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"myTemplate<class T>"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a> | <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aacc1d835f9c25043cef86026a4aa6a470">asOBJ_GC</a> | <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aae8de459b4106475aa8766edb5b088aac">asOBJ_TEMPLATE</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register another template type as a value type</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"myValueTemplate<class T>"</span>, <span class="keyword">sizeof</span>(MyValueTempl), <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9fc16a8ac0f30f9ff9c6568e0b7be91d">asOBJ_VALUE</a> | <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aae8de459b4106475aa8766edb5b088aac">asOBJ_TEMPLATE</a> | asGetTypeTraits<MyValueTempl>()); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>The template type doesn't have to be <a class="el" href="doc_gc_object.html">garbage collected</a>, but since you may not know which subtypes it will be instantiated for, it is usually best to implement that support.</p>
|
||||
<p>When registering the behaviours, methods, and properties for the template type the type is identified with the name and subtype within angle brackets, but without the class token, e.g. <code>myTemplate<T></code>. The sub type is identified by just the name of the subtype as it was declared in the call to RegisterObjectType.</p>
|
||||
<p>The factory/construct behaviour for the template type is also different. In order for the implementation to know which subtype it is instantiated for, the factory/constructor receives the <a class="el" href="classas_i_type_info.html">asITypeInfo</a> of the template instance as a hidden first parameter. When registering the factory/constructor this hidden parameter is reflected in the declaration, for example as <code>int &in</code>.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register the factory behaviour</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myTemplate<T>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a>, <span class="stringliteral">"myTemplate<T>@ f(int&in)"</span>, <a class="code" href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a>(myTemplateFactory, (<a class="code" href="classas_i_type_info.html">asITypeInfo</a>*), myTemplate*), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register the construct behaviour</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myValueTemplate<T>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5aa4cf235bfbf72ec03d0f651cea324101">asBEHAVE_CONSTRUCT</a>, <span class="stringliteral">"void f(int&in)"</span>, <a class="code" href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a>(myValueTemplConstructor, (<a class="code" href="classas_i_type_info.html">asITypeInfo</a>*, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>The list factory/constructor, used to instantiate objects with initialization lists, is registered in the same way, i.e.:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register the list factory behaviour</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myTemplate<T>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5aea078bc3b877ce33a2335e78ddb4938d">asBEHAVE_LIST_FACTORY</a>, <span class="stringliteral">"myTemplate<T>@ f(int&in, uint)"</span>, <a class="code" href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a>(myTemplateListFactory, (<a class="code" href="classas_i_type_info.html">asITypeInfo</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>), myTemplate*), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register the list constructor behaviour</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myValueTemplate<T>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a04c0b561986c6814e8a54ce3679178a2">asBEHAVE_LIST_CONSTRUCT</a>, <span class="stringliteral">"void f(int&in, uint)"</span>, <a class="code" href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a>(myValueTemplListConstruct, (<a class="code" href="classas_i_type_info.html">asITypeInfo</a>*, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <span class="keywordtype">void</span>*), <span class="keywordtype">void</span>), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>Remember that since the subtype must be determined dynamically at runtime, it is not possible to declare functions to receive the subtype by value, nor to return it by value. Instead you'll have to design the methods and behaviours to take the type by reference. It is possible to use object handles, but then the script engine won't be able to instantiate the template type for primitives and other values types.</p>
|
||||
<p>The same goes for object properties. Templates can have properties just like any other class, but the properties must not be of the template subtype, since it is not known at the time of registration the size of this type.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_array.html">array template object</a></dd></dl>
|
||||
<h2><a class="anchor" id="doc_adv_template_1_1"></a>
|
||||
On subtype replacement for template instances</h2>
|
||||
<p>When a template type is instanced in a declaration, e.g. a variable, the compiler enumerates all the members of the template type to verify if any subtype is used which requires replacement. In most cases the replacement is a direct one-to-one mapping, but in cases where the subtype is used as a const parameter reference, then an additional instruction may be needed to get the expected behaviour.</p>
|
||||
<p>The following shows a method registered to take the subtype T as a const ref.</p>
|
||||
<div class="fragment"><div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"array<T>"</span>, <span class="stringliteral">"int find(const T&in value) const"</span>, ...); </div>
|
||||
</div><!-- fragment --><p>If this template is instantiated with a handle as a subtype, e.g. <code>array<Obj@></code>, then the method will become:</p>
|
||||
<pre>
|
||||
int find(Obj @const &in value) const
|
||||
</pre><p>This means that that the parameter takes the handle to a non-read only Obj. The actual handle cannot be modified, but the object the handle refers to can still be modified by the method. This in turn makes it impossible for a script to call the method if the handle the script has is read only.</p>
|
||||
<p>To allow the application developer to say that the method should allow handles to read only objects, a special keyword <code>if_handle_then_const</code> should be used.</p>
|
||||
<div class="fragment"><div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">RegisterObjectMethod</a>(<span class="stringliteral">"array<T>"</span>, <span class="stringliteral">"int find(const T&in if_handle_then_const value) const"</span>, ...); </div>
|
||||
</div><!-- fragment --><p>Now this becomes:</p>
|
||||
<pre>
|
||||
int find(const Obj @const &in value) const
|
||||
</pre><p>This means that the parameter takes a const handle to a read only Obj, i.e. both the handle itself and the object instance it refers to cannot be modified by the method. Now the script will be able to call the method both with read only handles and non-read only handles.</p>
|
||||
<h1><a class="anchor" id="doc_adv_template_4"></a>
|
||||
Validating template instantiations at compile time</h1>
|
||||
<p>In order to avoid unnecessary runtime validations of invalid template instantiations, the application should preferably register the <a class="el" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a8c9afe12ff833cd09bd893e1408b9103">asBEHAVE_TEMPLATE_CALLBACK</a> behaviour. This is a special behaviour function that the script engine will invoke every time a new template instance type is generated. The callback function can then perform necessary validations to verify if the type can be handled, and if not tell the engine that the instance isn't supported.</p>
|
||||
<p>The callback function must be a global function that receives an <a class="el" href="classas_i_type_info.html" title="The interface for describing types This interface is used to describe the types in the script engine.">asITypeInfo</a> pointer, and should return a boolean. If the template instance is valid the return value should be true.</p>
|
||||
<p>The function should also take a second parameter with an output reference to a boolean. This parameter should be set to true by the function if the template instance should not be garbage collected, which will make AngelScript clear the asOBJ_GC flag for the object type. If the template instance cannot form any circular references, then it doesn't need to be garbage collected, which reduces the work that has to be done by the garbage collector.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register the template callback</span></div>
|
||||
<div class="line"><span class="comment">// Observe that the asITypeInfo pointer argument is represented by the int reference</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myTemplate<T>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a8c9afe12ff833cd09bd893e1408b9103">asBEHAVE_TEMPLATE_CALLBACK</a>, <span class="stringliteral">"bool f(int &in, bool&out)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(myTemplateCallback), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --><p>Here's an example callback function:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">bool</span> myTemplateCallback(<a class="code" href="classas_i_type_info.html">asITypeInfo</a> *ot, <span class="keywordtype">bool</span> &dontGarbageCollect)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// This template will only support primitive types</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> typeId = ot-><a class="code" href="classas_i_type_info.html#aa1a56809ce5c340364ecd8beac508eb4">GetSubTypeId</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( typeId & <a class="code" href="angelscript_8h.html#ae8c3a67a97321be53181e9ed396ad83aa09eef59280d15a58c75e0c8983a3c3af">asTYPEID_MASK_OBJECT</a> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The script is attempting to instantiate the </span></div>
|
||||
<div class="line"> <span class="comment">// template with an object type, this is not allowed.</span></div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Tell AngelScript that this instance doesn't require garbage collection</span></div>
|
||||
<div class="line"> dontGarbageCollect = <span class="keyword">true</span>;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Primitive types are allowed</span></div>
|
||||
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_adv_template_2"></a>
|
||||
Template specializations</h1>
|
||||
<p>When registering a template specialization you override the template instance that AngelScript would normally do when compiling a declaration with the template type. This allow the application to register a completely different object with its own implementation for template specializations. Obviously it is recommended that the template specialization is registered so that to the script writer it is transparent, i.e. try to avoid having different method names or behaviours for the template type and template specializations.</p>
|
||||
<p>With the exception of the type name, a template specialization is registered exactly like a <a class="el" href="doc_register_type.html">normal type</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register a template specialization for the float subtype</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"myTemplate<float>"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>); assert( r >= 0 );</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register the factory (there are no hidden parameters for specializations)</span></div>
|
||||
<div class="line">r = engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"myTemplate<float>"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a>, <span class="stringliteral">"myTemplate<float>@ f()"</span>, <a class="code" href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a>(myTemplateFloatFactory, (), myTemplateFloat*), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); assert( r >= 0 );</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5aea078bc3b877ce33a2335e78ddb4938d"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5aea078bc3b877ce33a2335e78ddb4938d">asBEHAVE_LIST_FACTORY</a></div><div class="ttdeci">@ asBEHAVE_LIST_FACTORY</div><div class="ttdoc">Factory used exclusively for initialization lists.</div><div class="ttdef"><b>Definition:</b> angelscript.h:364</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ad74043be9cc30f105c62f482ca720574"><div class="ttname"><a href="classas_i_script_engine.html#ad74043be9cc30f105c62f482ca720574">asIScriptEngine::RegisterObjectMethod</a></div><div class="ttdeci">virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a method for the object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a0b3db16eea35213b6f41f8d19dc1bd4c">asBEHAVE_FACTORY</a></div><div class="ttdeci">@ asBEHAVE_FACTORY</div><div class="ttdoc">Factory.</div><div class="ttdef"><b>Definition:</b> angelscript.h:362</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4ac08652c72f1cc0dc81c37812fab0e253">asCALL_CDECL_OBJLAST</a></div><div class="ttdeci">@ asCALL_CDECL_OBJLAST</div><div class="ttdoc">A cdecl function that takes the object pointer as the last parameter.</div><div class="ttdef"><b>Definition:</b> angelscript.h:234</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a04c0b561986c6814e8a54ce3679178a2"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a04c0b561986c6814e8a54ce3679178a2">asBEHAVE_LIST_CONSTRUCT</a></div><div class="ttdeci">@ asBEHAVE_LIST_CONSTRUCT</div><div class="ttdoc">Constructor used exclusively for initialization lists.</div><div class="ttdef"><b>Definition:</b> angelscript.h:356</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5aa4cf235bfbf72ec03d0f651cea324101"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5aa4cf235bfbf72ec03d0f651cea324101">asBEHAVE_CONSTRUCT</a></div><div class="ttdeci">@ asBEHAVE_CONSTRUCT</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> angelscript.h:354</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html_aa1a56809ce5c340364ecd8beac508eb4"><div class="ttname"><a href="classas_i_type_info.html#aa1a56809ce5c340364ecd8beac508eb4">asITypeInfo::GetSubTypeId</a></div><div class="ttdeci">virtual int GetSubTypeId(asUINT subTypeIndex=0) const =0</div><div class="ttdoc">Returns the type id of the template sub type.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f122dd87394f3a83ac766ea19f37317"><div class="ttname"><a href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">asIScriptEngine::RegisterObjectBehaviour</a></div><div class="ttdeci">virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a behaviour for the object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a153aee5a6228913a469b6e6867e54efb"><div class="ttname"><a href="angelscript_8h.html#a153aee5a6228913a469b6e6867e54efb">asFUNCTIONPR</a></div><div class="ttdeci">#define asFUNCTIONPR(f, p, r)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name, parameter list,...</div><div class="ttdef"><b>Definition:</b> angelscript.h:684</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aacc1d835f9c25043cef86026a4aa6a470"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aacc1d835f9c25043cef86026a4aa6a470">asOBJ_GC</a></div><div class="ttdeci">@ asOBJ_GC</div><div class="ttdoc">A garbage collected type. Only valid for reference types.</div><div class="ttdef"><b>Definition:</b> angelscript.h:254</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9fc16a8ac0f30f9ff9c6568e0b7be91d"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9fc16a8ac0f30f9ff9c6568e0b7be91d">asOBJ_VALUE</a></div><div class="ttdeci">@ asOBJ_VALUE</div><div class="ttdoc">A value type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:252</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aae8de459b4106475aa8766edb5b088aac"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aae8de459b4106475aa8766edb5b088aac">asOBJ_TEMPLATE</a></div><div class="ttdeci">@ asOBJ_TEMPLATE</div><div class="ttdoc">A template type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:262</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a8c9afe12ff833cd09bd893e1408b9103"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a8c9afe12ff833cd09bd893e1408b9103">asBEHAVE_TEMPLATE_CALLBACK</a></div><div class="ttdeci">@ asBEHAVE_TEMPLATE_CALLBACK</div><div class="ttdoc">Callback for validating template instances.</div><div class="ttdef"><b>Definition:</b> angelscript.h:374</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ae8c3a67a97321be53181e9ed396ad83aa09eef59280d15a58c75e0c8983a3c3af"><div class="ttname"><a href="angelscript_8h.html#ae8c3a67a97321be53181e9ed396ad83aa09eef59280d15a58c75e0c8983a3c3af">asTYPEID_MASK_OBJECT</a></div><div class="ttdeci">@ asTYPEID_MASK_OBJECT</div><div class="ttdoc">If any of these bits are set, then the type is an object.</div><div class="ttdef"><b>Definition:</b> angelscript.h:492</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
191
docs/manual/doc_adv_timeout.html
Normal file
191
docs/manual/doc_adv_timeout.html
Normal file
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Timeout long running scripts</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_timeout.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Timeout long running scripts </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>To prevent long running scripts to freeze the application it may be necessary to add a way to timeout the execution. This article presents two different ways to do so.</p>
|
||||
<h1><a class="anchor" id="doc_adv_timeout_1"></a>
|
||||
With the line callback</h1>
|
||||
<p>The line callback feature can be used to perform some special treatment during execution of the scripts. The callback is called for every script statement, which makes it possible to verify if the script has <br />
|
||||
executed for too long time and if so suspend the execution to be resumed at a later time.</p>
|
||||
<p>Before calling the context's <a class="el" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a> method, set the callback function like so:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> ExecuteScriptWithTimeOut(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Define the timeout as 1 second</span></div>
|
||||
<div class="line"> DWORD timeOut = timeGetTime() + 1000;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Set up the line callback that will timout the script</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">SetLineCallback</a>(<a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(LineCallback), &timeOut, <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Execute the script</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> status = ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// If the status is asEXECUTION_SUSPENDED the script can</span></div>
|
||||
<div class="line"> <span class="comment">// be resumed by calling this function again.</span></div>
|
||||
<div class="line"> <span class="keywordflow">return</span> status;</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// The line callback function is called by the VM for each statement that is executed</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> LineCallback(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx, DWORD *timeOut)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// If the time out is reached we suspend the script</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( *timeOut < timeGetTime() )</div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a>();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>Take a look at the sample <a class="el" href="doc_samples_events.html">Events</a> to see this working.</p>
|
||||
<p>Observe that if the script is compiled with <a class="el" href="angelscript_8h.html#a53c2e8a74ade77c928316396394ebe0fa73b396e4ea6376f0962d19add962bd91">asEP_BUILD_WITHOUT_LINE_CUES</a>, the line callback will be invoked less frequently, though it is guaranteed to be invoked at least for every loop or function call.</p>
|
||||
<h1><a class="anchor" id="doc_adv_timeout_2"></a>
|
||||
With a secondary thread</h1>
|
||||
<p>A second thread can be set up to suspend the execution after the timeout. This thread can then be put to sleep so that it doesn't impact performance during the execution. When the thread wakes up it should call the context's <a class="el" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a> method.</p>
|
||||
<p>The below shows some possible code for doing this. Note that the code for setting up the thread is fictive, as this is different for each target OS.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The variables that are shared between the threads</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_context.html">asIScriptContext</a> *threadCtx;</div>
|
||||
<div class="line"><span class="keywordtype">int</span> threadId;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// This function will be executed in the secondary thread</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> SuspendThread()</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Put the thread to sleep until the timeout (1 second)</span></div>
|
||||
<div class="line"> Sleep(1000);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// When we wake-up we call the context's Suspend method</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">Suspend</a>();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// This function sets up the timeout thread and executes the script</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> ExecuteScriptWithTimeOut(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Set the shared context pointer before creating the thread</span></div>
|
||||
<div class="line"> threadCtx = ctx;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Create the thread that will immediately go to sleep</span></div>
|
||||
<div class="line"> threadId = CreateThread(SuspendThread);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Execute the script</span></div>
|
||||
<div class="line"> <span class="keywordtype">int</span> status = ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Destroy the secondary thread before releasing the context</span></div>
|
||||
<div class="line"> DestroyThread(threadId);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Clear the global variables</span></div>
|
||||
<div class="line"> threadId = 0;</div>
|
||||
<div class="line"> threadCtx = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// If the status is asEXECUTION_SUSPENDED the script can</span></div>
|
||||
<div class="line"> <span class="comment">// be resumed by calling this function again.</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> status;</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>Observe that this way of doing it is safe even if the AngelScript library has been built without <a class="el" href="doc_adv_multithread.html">multithread support</a>. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e52894432737acac2e1a422e496bf84"><div class="ttname"><a href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">asIScriptContext::Execute</a></div><div class="ttdeci">virtual int Execute()=0</div><div class="ttdoc">Executes the prepared function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ae2747f643bf9a07364f922c460ef57dd"><div class="ttname"><a href="classas_i_script_context.html#ae2747f643bf9a07364f922c460ef57dd">asIScriptContext::SetLineCallback</a></div><div class="ttdeci">virtual int SetLineCallback(asSFuncPtr callback, void *obj, int callConv)=0</div><div class="ttdoc">Sets a line callback function. The function will be called for each executed script statement.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ad4ac8be3586c46069b5870e40c86544a"><div class="ttname"><a href="classas_i_script_context.html#ad4ac8be3586c46069b5870e40c86544a">asIScriptContext::Suspend</a></div><div class="ttdeci">virtual int Suspend()=0</div><div class="ttdoc">Suspends the execution, which can then be resumed by calling Execute again.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
151
docs/manual/doc_adv_var_type.html
Normal file
151
docs/manual/doc_adv_var_type.html
Normal file
@@ -0,0 +1,151 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: The variable parameter type</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_var_type.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">The variable parameter type </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>The application can register functions that take a reference to a variable type, which means that the function can receive a reference to a variable of any type. This is useful when making generic containers.</p>
|
||||
<p>When a function is registered with this special parameter type, the function will receive both the reference and an extra argument with the type id of the variable type. The reference refers to the actual value that the caller sent, i.e. if the expression is an object handle then the reference will refer to the handle, not the actual object.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// An example usage with a native function</span></div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void func_c(?&in)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(func_c), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> func_c(<span class="keywordtype">void</span> *ref, <span class="keywordtype">int</span> typeId)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Do something with the reference</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// The type of the reference is determined through the type id</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// An example usage with a generic function</span></div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void func_g(?&in)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(func_g), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce">asCALL_GENERIC</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> func_g(<a class="code" href="classas_i_script_generic.html">asIScriptGeneric</a> *gen)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> *ref = gen-><a class="code" href="classas_i_script_generic.html#ac5c73473ccefe029582c5e3793d1a41b">GetArgAddress</a>(0);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> typeId = gen-><a class="code" href="classas_i_script_generic.html#a2bdce6872b371355665e932a962548cb">GetArgTypeId</a>(0);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> func_c(ref, typeId);</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>The variable type can also be used with <code>out</code> references, but not with <code>inout</code> references. Currently it can only be used with global functions, object constructors, and object methods. It cannot be used with other behaviours and operators.</p>
|
||||
<p>The variable type is not available within scripts, so it can only be used to register application functions.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_any.html">any object</a> and <a class="el" href="doc_addon_dict.html">dictionary object</a> for examples</dd></dl>
|
||||
<h1><a class="anchor" id="doc_adv_var_type_1"></a>
|
||||
Variable conversion operators</h1>
|
||||
<p>The variable parameter type can also be used in special versions of <a class="el" href="doc_script_class_ops.html#doc_script_class_conv">the opConv and opCast</a> operator overloads. This is especially useful for generic container types that need to be able to hold any type of content.</p>
|
||||
<ul>
|
||||
<li>void opCast(?&out)</li>
|
||||
<li>void opConv(?&out)</li>
|
||||
</ul>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_handle.html">ref object</a> and <a class="el" href="doc_addon_dict.html">dictionary object</a> for examples </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_generic_html_ac5c73473ccefe029582c5e3793d1a41b"><div class="ttname"><a href="classas_i_script_generic.html#ac5c73473ccefe029582c5e3793d1a41b">asIScriptGeneric::GetArgAddress</a></div><div class="ttdeci">virtual void * GetArgAddress(asUINT arg)=0</div><div class="ttdoc">Returns the address held in a reference or handle argument.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a750c26b6a6e0c9ccbb93078f532ef8ce">asCALL_GENERIC</a></div><div class="ttdeci">@ asCALL_GENERIC</div><div class="ttdoc">A function using the generic calling convention.</div><div class="ttdef"><b>Definition:</b> angelscript.h:238</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_generic_html"><div class="ttname"><a href="classas_i_script_generic.html">asIScriptGeneric</a></div><div class="ttdoc">The interface for the generic calling convention.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3242</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_generic_html_a2bdce6872b371355665e932a962548cb"><div class="ttname"><a href="classas_i_script_generic.html#a2bdce6872b371355665e932a962548cb">asIScriptGeneric::GetArgTypeId</a></div><div class="ttdeci">virtual int GetArgTypeId(asUINT arg, asDWORD *flags=0) const =0</div><div class="ttdoc">Returns the type id of the argument.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
193
docs/manual/doc_adv_weakref.html
Normal file
193
docs/manual/doc_adv_weakref.html
Normal file
@@ -0,0 +1,193 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Weak references</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_adv_weakref.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Weak references </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Even though AngelScript uses a <a class="el" href="doc_gc.html">garbage collector</a> to resolve cyclic references weak references may still come in handy. Weak references are especifically useful in scenarios were an object wants to be able to access other objects, but do not want to kept them alive longer than necessary.</p>
|
||||
<p>AngelScript supports weak references with the use of shared booleans. The code that wants to keep a weak reference to an object should obtain the weakref flag from that object, which is a shared boolean, and before using the pointer to the object it should check if this flag has been set to indicate that the object is no longer alive.</p>
|
||||
<p>Script classes automatically supports weak references without the script writing having to do anything. Application registered types on the other hand must register the behaviour <a class="el" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7a5e435e88a5fc1dcdee13fce091b081">asBEHAVE_GET_WEAKREF_FLAG</a> and implement the logic to set the flag upon destroying the object.</p>
|
||||
<p>The following code shows how to do a thread safe implementation:</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">class </span>MyClass</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"><span class="keyword">public</span>:</div>
|
||||
<div class="line"> MyClass() { refCount = 1; weakRefFlag = 0; }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> AddRef() { <a class="code" href="group__api__multithread__functions.html#gaf0074d581ac2edd06e63e56e4be52c8e">asAtomicInc</a>(refCount); }</div>
|
||||
<div class="line"> <span class="keywordtype">void</span> Release() </div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// If the weak ref flag exists it is because someone held a weak ref</span></div>
|
||||
<div class="line"> <span class="comment">// and that someone may add a reference to the object at any time. It</span></div>
|
||||
<div class="line"> <span class="comment">// is ok to check the existance of the weakRefFlag without locking here</span></div>
|
||||
<div class="line"> <span class="comment">// because if the refCount is 1 then no other thread is currently </span></div>
|
||||
<div class="line"> <span class="comment">// creating the weakRefFlag.</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( refCount == 1 && weakRefFlag )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Set the flag to tell others that the object is no longer alive</span></div>
|
||||
<div class="line"> <span class="comment">// We must do this before decreasing the refCount to 0 so we don't</span></div>
|
||||
<div class="line"> <span class="comment">// end up with a race condition between this thread attempting to </span></div>
|
||||
<div class="line"> <span class="comment">// destroy the object and the other that temporary added a strong</span></div>
|
||||
<div class="line"> <span class="comment">// ref from the weak ref.</span></div>
|
||||
<div class="line"> weakRefFlag->Set(<span class="keyword">true</span>);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( <a class="code" href="group__api__multithread__functions.html#ga0565bcb53be170dd85ae27a5b6f2b828">asAtomicDec</a>(refCount) == 0 ) </div>
|
||||
<div class="line"> <span class="keyword">delete</span> <span class="keyword">this</span>; </div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <a class="code" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a> *GetWeakRefFlag()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !weakRefFlag )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Lock globally so no other thread can attempt</span></div>
|
||||
<div class="line"> <span class="comment">// to create a shared bool at the same time</span></div>
|
||||
<div class="line"> <a class="code" href="group__api__multithread__functions.html#ga016dbf716a1c761b3f903b92eb8bb580">asAcquireExclusiveLock</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Make sure another thread didn't create the </span></div>
|
||||
<div class="line"> <span class="comment">// flag while we waited for the lock</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( !weakRefFlag )</div>
|
||||
<div class="line"> weakRefFlag = <a class="code" href="group__api__multithread__functions.html#gaa0ffb789dab56b5617e2f961f9c79fdb">asCreateLockableSharedBool</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <a class="code" href="group__api__multithread__functions.html#ga8a0617637eea3d76e33a52758b2cd49f">asReleaseExclusiveLock</a>();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">return</span> weakRefFlag;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keyword">static</span> MyClass *Factory() { <span class="keywordflow">return</span> <span class="keyword">new</span> MyClass(); }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keyword">protected</span>:</div>
|
||||
<div class="line"> ~MyClass()</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Release the weak reference flag that may still</span></div>
|
||||
<div class="line"> <span class="comment">// be accessed by the code that holds a weak reference</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( weakRefFlag )</div>
|
||||
<div class="line"> weakRefFlag->Release();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordtype">int</span> refCount;</div>
|
||||
<div class="line"> <a class="code" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a> *weakRefFlag;</div>
|
||||
<div class="line">};</div>
|
||||
</div><!-- fragment --><p>The <a class="el" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7a5e435e88a5fc1dcdee13fce091b081">asBEHAVE_GET_WEAKREF_FLAG</a> behaviour for this class is registered like this:</p>
|
||||
<div class="fragment"><div class="line">engine-><a class="code" href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">RegisterObjectType</a>(<span class="stringliteral">"MyClass"</span>, 0, <a class="code" href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a>);</div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"MyClass"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84">asBEHAVE_ADDREF</a>, <span class="stringliteral">"void f()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(MyClass, AddRef), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"MyClass"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a>, <span class="stringliteral">"void f()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(MyClass, Release), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">RegisterObjectBehaviour</a>(<span class="stringliteral">"MyClass"</span>, <a class="code" href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7a5e435e88a5fc1dcdee13fce091b081">asBEHAVE_GET_WEAKREF_FLAG</a>, <span class="stringliteral">"int &f()"</span>, <a class="code" href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a>(MyClass, GetWeakRefFlag), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a>);</div>
|
||||
</div><!-- fragment --><p>The script language doesn't have a built-in syntax for weak references. Instead a standard <a class="el" href="doc_addon_weakref.html">weakref add-on</a> has been implemented to provide this for the applications that wants to provide this support in the scripts. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7134ce13c81967191af401a1e5170a0c">asBEHAVE_RELEASE</a></div><div class="ttdeci">@ asBEHAVE_RELEASE</div><div class="ttdoc">Release.</div><div class="ttdef"><b>Definition:</b> angelscript.h:368</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a29c6c087c8c5b5cdb6271cfd161cc5a6"><div class="ttname"><a href="classas_i_script_engine.html#a29c6c087c8c5b5cdb6271cfd161cc5a6">asIScriptEngine::RegisterObjectType</a></div><div class="ttdeci">virtual int RegisterObjectType(const char *obj, int byteSize, asDWORD flags)=0</div><div class="ttdoc">Registers a new object type.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861"><div class="ttname"><a href="angelscript_8h.html#a855d86fa9ee15b9f75e553ee376b5c7aa9450e038342b36c745858d2e5ae4b861">asOBJ_REF</a></div><div class="ttdeci">@ asOBJ_REF</div><div class="ttdoc">A reference type.</div><div class="ttdef"><b>Definition:</b> angelscript.h:250</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f122dd87394f3a83ac766ea19f37317"><div class="ttname"><a href="classas_i_script_engine.html#a9f122dd87394f3a83ac766ea19f37317">asIScriptEngine::RegisterObjectBehaviour</a></div><div class="ttdeci">virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0</div><div class="ttdoc">Registers a behaviour for the object type.</div></div>
|
||||
<div class="ttc" id="agroup__api__multithread__functions_html_gaf0074d581ac2edd06e63e56e4be52c8e"><div class="ttname"><a href="group__api__multithread__functions.html#gaf0074d581ac2edd06e63e56e4be52c8e">asAtomicInc</a></div><div class="ttdeci">AS_API int asAtomicInc(int &value)</div><div class="ttdoc">Increments the value by one and returns the result as a single atomic instruction.</div></div>
|
||||
<div class="ttc" id="agroup__api__multithread__functions_html_ga016dbf716a1c761b3f903b92eb8bb580"><div class="ttname"><a href="group__api__multithread__functions.html#ga016dbf716a1c761b3f903b92eb8bb580">asAcquireExclusiveLock</a></div><div class="ttdeci">AS_API void asAcquireExclusiveLock()</div><div class="ttdoc">Acquire an exclusive lock.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a7a5e435e88a5fc1dcdee13fce091b081"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a7a5e435e88a5fc1dcdee13fce091b081">asBEHAVE_GET_WEAKREF_FLAG</a></div><div class="ttdeci">@ asBEHAVE_GET_WEAKREF_FLAG</div><div class="ttdoc">Obtain weak ref flag.</div><div class="ttdef"><b>Definition:</b> angelscript.h:370</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7345e6b3afabec24efd0ff77886d49a6"><div class="ttname"><a href="angelscript_8h.html#a7345e6b3afabec24efd0ff77886d49a6">asMETHOD</a></div><div class="ttdeci">#define asMETHOD(c, m)</div><div class="ttdoc">Returns an asSFuncPtr representing the class method specified by class and method name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:740</div></div>
|
||||
<div class="ttc" id="agroup__api__multithread__functions_html_ga8a0617637eea3d76e33a52758b2cd49f"><div class="ttname"><a href="group__api__multithread__functions.html#ga8a0617637eea3d76e33a52758b2cd49f">asReleaseExclusiveLock</a></div><div class="ttdeci">AS_API void asReleaseExclusiveLock()</div><div class="ttdoc">Release an exclusive lock.</div></div>
|
||||
<div class="ttc" id="agroup__api__multithread__functions_html_ga0565bcb53be170dd85ae27a5b6f2b828"><div class="ttname"><a href="group__api__multithread__functions.html#ga0565bcb53be170dd85ae27a5b6f2b828">asAtomicDec</a></div><div class="ttdeci">AS_API int asAtomicDec(int &value)</div><div class="ttdoc">Decrements the value by one and returns the result as a single atomic instruction.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4aea516c8742acc1edff6a43dc1bb09e96">asCALL_THISCALL</a></div><div class="ttdeci">@ asCALL_THISCALL</div><div class="ttdoc">A thiscall class method.</div><div class="ttdef"><b>Definition:</b> angelscript.h:232</div></div>
|
||||
<div class="ttc" id="aclassas_i_lockable_shared_bool_html"><div class="ttname"><a href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a></div><div class="ttdoc">A lockable shared boolean.</div><div class="ttdef"><b>Definition:</b> angelscript.h:4077</div></div>
|
||||
<div class="ttc" id="agroup__api__multithread__functions_html_gaa0ffb789dab56b5617e2f961f9c79fdb"><div class="ttname"><a href="group__api__multithread__functions.html#gaa0ffb789dab56b5617e2f961f9c79fdb">asCreateLockableSharedBool</a></div><div class="ttdeci">AS_API asILockableSharedBool * asCreateLockableSharedBool()</div><div class="ttdoc">Create a lockable shared boolean.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84"><div class="ttname"><a href="angelscript_8h.html#a7e38df5b10ec8cbf2a688f1d114097c5a1dfa5b72ad69a7bf70636d4fcb1b1d84">asBEHAVE_ADDREF</a></div><div class="ttdeci">@ asBEHAVE_ADDREF</div><div class="ttdoc">AddRef.</div><div class="ttdef"><b>Definition:</b> angelscript.h:366</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
130
docs/manual/doc_advanced.html
Normal file
130
docs/manual/doc_advanced.html
Normal file
@@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Advanced topics</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_advanced.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Advanced topics </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><ul>
|
||||
<li><a class="el" href="doc_debug.html">Debugging scripts</a></li>
|
||||
<li><a class="el" href="doc_adv_timeout.html">Timeout long running scripts</a></li>
|
||||
<li><a class="el" href="doc_gc.html">Garbage collection</a></li>
|
||||
<li><a class="el" href="doc_adv_multithread.html">Multithreading</a></li>
|
||||
<li><a class="el" href="doc_adv_concurrent.html">Concurrent scripts</a></li>
|
||||
<li><a class="el" href="doc_adv_coroutine.html">Co-routines</a></li>
|
||||
<li><a class="el" href="doc_adv_dynamic_build.html">Dynamic compilations</a></li>
|
||||
<li><a class="el" href="doc_adv_precompile.html">Pre-compiled byte code</a></li>
|
||||
<li><a class="el" href="doc_finetuning.html">Fine tuning</a></li>
|
||||
<li><a class="el" href="doc_adv_access_mask.html">Access masks and exposing different interfaces</a></li>
|
||||
<li><a class="el" href="doc_adv_namespace.html">Using namespaces</a></li>
|
||||
<li><a class="el" href="doc_adv_dynamic_config.html">Dynamic configurations</a></li>
|
||||
<li><a class="el" href="doc_adv_custom_options.html">Custom options</a></li>
|
||||
<li><a class="el" href="doc_adv_reflection.html">Reflection</a></li>
|
||||
<li><a class="el" href="doc_adv_inheritappclass.html">Inheriting from application registered class</a></li>
|
||||
<li><a class="el" href="doc_adv_jit_topic.html">JIT compilation</a></li>
|
||||
</ul>
|
||||
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>Add page about imports and function binding</dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
62
docs/manual/doc_advanced.js
Normal file
62
docs/manual/doc_advanced.js
Normal file
@@ -0,0 +1,62 @@
|
||||
var doc_advanced =
|
||||
[
|
||||
[ "Debugging scripts", "doc_debug.html", [
|
||||
[ "Setting line breaks", "doc_debug.html#doc_debug_1", null ],
|
||||
[ "Viewing the call stack", "doc_debug.html#doc_debug_2", null ],
|
||||
[ "Inspecting variables", "doc_debug.html#doc_debug_3", null ],
|
||||
[ "Debugging internally executed scripts", "doc_debug.html#doc_debug_4", null ]
|
||||
] ],
|
||||
[ "Timeout long running scripts", "doc_adv_timeout.html", [
|
||||
[ "With the line callback", "doc_adv_timeout.html#doc_adv_timeout_1", null ],
|
||||
[ "With a secondary thread", "doc_adv_timeout.html#doc_adv_timeout_2", null ]
|
||||
] ],
|
||||
[ "Garbage collection", "doc_gc.html", [
|
||||
[ "Callback for detected circular references", "doc_gc.html#doc_gc_circcallback", null ],
|
||||
[ "Garbage collection and multi-threading", "doc_gc.html#doc_gc_threads", null ]
|
||||
] ],
|
||||
[ "Multithreading", "doc_adv_multithread.html", [
|
||||
[ "Things to think about with a multithreaded environment", "doc_adv_multithread.html#doc_adv_multithread_1", null ],
|
||||
[ "Fibers", "doc_adv_multithread.html#doc_adv_fibers", null ]
|
||||
] ],
|
||||
[ "Concurrent scripts", "doc_adv_concurrent.html", null ],
|
||||
[ "Co-routines", "doc_adv_coroutine.html", null ],
|
||||
[ "Dynamic compilations", "doc_adv_dynamic_build.html", [
|
||||
[ "On demand builds", "doc_adv_dynamic_build.html#doc_adv_dynamic_build_ondemand", null ],
|
||||
[ "Incremental builds", "doc_adv_dynamic_build.html#doc_adv_dynamic_build_incr", null ],
|
||||
[ "Hot reloading scripts", "doc_adv_dynamic_build.html#doc_adv_dynamic_build_hot", [
|
||||
[ "Things to consider", "doc_adv_dynamic_build.html#doc_adv_dynamic_build_hot_1", null ]
|
||||
] ]
|
||||
] ],
|
||||
[ "Pre-compiled byte code", "doc_adv_precompile.html", [
|
||||
[ "Things to remember", "doc_adv_precompile.html#doc_adv_precompile_1", null ]
|
||||
] ],
|
||||
[ "Fine tuning", "doc_finetuning.html", [
|
||||
[ "Cache the functions and types", "doc_finetuning.html#doc_finetuning_1", null ],
|
||||
[ "Reuse the context object", "doc_finetuning.html#doc_finetuning_2", [
|
||||
[ "Context pool", "doc_finetuning.html#doc_finetuning_2_1", null ],
|
||||
[ "Nested calls", "doc_finetuning.html#doc_finetuning_2_2", null ]
|
||||
] ],
|
||||
[ "Compile scripts without line cues", "doc_finetuning.html#doc_finetuning_3", null ],
|
||||
[ "Disable thread safety", "doc_finetuning.html#doc_finetuning_4", null ],
|
||||
[ "Turn off automatic garbage collection", "doc_finetuning.html#doc_finetuning_5", null ],
|
||||
[ "Compare native calling convention versus generic calling convention", "doc_finetuning.html#doc_finetuning_6", null ]
|
||||
] ],
|
||||
[ "Access masks and exposing different interfaces", "doc_adv_access_mask.html", null ],
|
||||
[ "Using namespaces", "doc_adv_namespace.html", [
|
||||
[ "Registering the interface with namespaces", "doc_adv_namespace.html#doc_adv_namespace_reg", null ],
|
||||
[ "Finding entities in namespaces", "doc_adv_namespace.html#doc_adv_namespace_enum", null ]
|
||||
] ],
|
||||
[ "Dynamic configurations", "doc_adv_dynamic_config.html", null ],
|
||||
[ "Custom options", "doc_adv_custom_options.html", [
|
||||
[ "Registerable types", "doc_adv_custom_options.html#doc_adv_custom_options_reg_types", null ],
|
||||
[ "Language modifications", "doc_adv_custom_options.html#doc_adv_custom_options_lang_mod", null ],
|
||||
[ "Engine behaviours", "doc_adv_custom_options.html#doc_adv_custom_options_engine", null ]
|
||||
] ],
|
||||
[ "Reflection", "doc_adv_reflection.html", [
|
||||
[ "Enumerating variables and properties", "doc_adv_reflection.html#doc_adv_reflection_vars", null ],
|
||||
[ "Enumerating functions and methods", "doc_adv_reflection.html#doc_adv_reflection_funcs", null ],
|
||||
[ "Enumerating types", "doc_adv_reflection.html#doc_adv_reflection_types", null ]
|
||||
] ],
|
||||
[ "Inheriting from application registered class", "doc_adv_inheritappclass.html", null ],
|
||||
[ "JIT compilation", "doc_adv_jit_topic.html", "doc_adv_jit_topic" ]
|
||||
];
|
||||
125
docs/manual/doc_advanced_api.html
Normal file
125
docs/manual/doc_advanced_api.html
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Advanced application interface</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_advanced_api.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Advanced application interface </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><ul>
|
||||
<li><a class="el" href="doc_strings.html">Custom string type</a></li>
|
||||
<li><a class="el" href="doc_arrays.html">Custom array type</a></li>
|
||||
<li><a class="el" href="doc_gc_object.html">Garbage collected objects</a></li>
|
||||
<li><a class="el" href="doc_generic.html">The generic calling convention</a></li>
|
||||
<li><a class="el" href="doc_adv_generic_handle.html">Registering a generic handle type</a></li>
|
||||
<li><a class="el" href="doc_adv_scoped_type.html">Registering a scoped reference type</a></li>
|
||||
<li><a class="el" href="doc_adv_single_ref_type.html">Registering a single-reference type</a></li>
|
||||
<li><a class="el" href="doc_adv_class_hierarchy.html">Class hierarchies</a></li>
|
||||
<li><a class="el" href="doc_adv_var_type.html">The variable parameter type</a></li>
|
||||
<li><a class="el" href="doc_adv_template.html">Template types</a></li>
|
||||
<li><a class="el" href="doc_adv_weakref.html">Weak references</a></li>
|
||||
<li><a class="el" href="doc_cpp_exceptions.html">C++ exceptions and longjmp</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
43
docs/manual/doc_advanced_api.js
Normal file
43
docs/manual/doc_advanced_api.js
Normal file
@@ -0,0 +1,43 @@
|
||||
var doc_advanced_api =
|
||||
[
|
||||
[ "Custom string type", "doc_strings.html", [
|
||||
[ "Registering the custom string type", "doc_strings.html#doc_string_register", null ],
|
||||
[ "Unicode vs ASCII", "doc_strings.html#doc_strings_1", null ],
|
||||
[ "Multiline string literals", "doc_strings.html#doc_string_2", null ],
|
||||
[ "Character literals", "doc_strings.html#doc_string_3", null ]
|
||||
] ],
|
||||
[ "Custom array type", "doc_arrays.html", null ],
|
||||
[ "Garbage collected objects", "doc_gc_object.html", [
|
||||
[ "GC support behaviours", "doc_gc_object.html#doc_reg_gcref_1", null ],
|
||||
[ "Factory for garbage collection", "doc_gc_object.html#doc_reg_gcref_2", null ],
|
||||
[ "Addref and release for garbage collection", "doc_gc_object.html#doc_reg_gcref_3", null ],
|
||||
[ "GC behaviours for value types", "doc_gc_object.html#doc_reg_gcref_value", null ],
|
||||
[ "Garbage collected objects and multi-threading", "doc_gc_object.html#doc_reg_gcref_4", null ]
|
||||
] ],
|
||||
[ "The generic calling convention", "doc_generic.html", [
|
||||
[ "Extracting function arguments", "doc_generic.html#doc_generic_1", null ],
|
||||
[ "Returning values", "doc_generic.html#doc_generic_2", null ]
|
||||
] ],
|
||||
[ "Registering a generic handle type", "doc_adv_generic_handle.html", null ],
|
||||
[ "Registering a scoped reference type", "doc_adv_scoped_type.html", null ],
|
||||
[ "Registering a single-reference type", "doc_adv_single_ref_type.html", null ],
|
||||
[ "Class hierarchies", "doc_adv_class_hierarchy.html", [
|
||||
[ "Establishing the relationship", "doc_adv_class_hierarchy.html#doc_adv_class_hierarchy_1", null ],
|
||||
[ "Inherited methods and properties", "doc_adv_class_hierarchy.html#doc_adv_class_hierarchy_2", null ]
|
||||
] ],
|
||||
[ "The variable parameter type", "doc_adv_var_type.html", [
|
||||
[ "Variable conversion operators", "doc_adv_var_type.html#doc_adv_var_type_1", null ]
|
||||
] ],
|
||||
[ "Template types", "doc_adv_template.html", [
|
||||
[ "Registering the template type", "doc_adv_template.html#doc_adv_template_1", [
|
||||
[ "On subtype replacement for template instances", "doc_adv_template.html#doc_adv_template_1_1", null ]
|
||||
] ],
|
||||
[ "Validating template instantiations at compile time", "doc_adv_template.html#doc_adv_template_4", null ],
|
||||
[ "Template specializations", "doc_adv_template.html#doc_adv_template_2", null ]
|
||||
] ],
|
||||
[ "Weak references", "doc_adv_weakref.html", null ],
|
||||
[ "C++ exceptions and longjmp", "doc_cpp_exceptions.html", [
|
||||
[ "Exceptions", "doc_cpp_exceptions.html#doc_cpp_exceptions_1", null ],
|
||||
[ "longjmp", "doc_cpp_exceptions.html#doc_cpp_exceptions_2", null ]
|
||||
] ]
|
||||
];
|
||||
120
docs/manual/doc_api.html
Normal file
120
docs/manual/doc_api.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.16"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: The API reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(initResizable);
|
||||
/* @license-end */</script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.16 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_api.html','');});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">The API reference </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This is the reference documentation for the AngelScript application programming interface.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="doc_api_functions.html">Functions</a></li>
|
||||
<li><a class="el" href="doc_api_interfaces.html">Interfaces</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sun Sep 22 2019 11:47:54 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
14
docs/manual/doc_api.js
Normal file
14
docs/manual/doc_api.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var doc_api =
|
||||
[
|
||||
[ "Functions", "doc_api_functions.html", [
|
||||
[ "Principal functions", "doc_api_functions.html#doc_api_funcs_1", null ],
|
||||
[ "Multithread support", "doc_api_functions.html#doc_api_funcs_2", null ],
|
||||
[ "Custom memory management", "doc_api_functions.html#doc_api_funcs_3", null ],
|
||||
[ "Auxiliary functions", "doc_api_functions.html#doc_api_funcs_4", null ]
|
||||
] ],
|
||||
[ "Interfaces", "doc_api_interfaces.html", [
|
||||
[ "Principal interfaces", "doc_api_interfaces.html#doc_api_intf_1", null ],
|
||||
[ "Secondary interfaces", "doc_api_interfaces.html#doc_api_intf_2", null ],
|
||||
[ "Auxiliary interfaces", "doc_api_interfaces.html#doc_api_intf_3", null ]
|
||||
] ]
|
||||
];
|
||||
145
docs/manual/doc_api_functions.html
Normal file
145
docs/manual/doc_api_functions.html
Normal file
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_api_functions.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Functions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="doc_api_funcs_1"></a>
|
||||
Principal functions</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a></li>
|
||||
<li><a class="el" href="group__api__principal__functions.html#gad3a20dc58093b92a5a44c7b6ada34a10">asGetActiveContext</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_api_funcs_2"></a>
|
||||
Multithread support</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#gaa5bea65c3f2a224bb1c677515e3bb0e2">asPrepareMultithread</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga011355a8978d438cec77b4e1f041cba7">asUnprepareMultithread</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga948def50c98db90596b706ca4b58041e">asGetThreadManager</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga51079811680d5217046aad2a2b695dc7">asThreadCleanup</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga016dbf716a1c761b3f903b92eb8bb580">asAcquireExclusiveLock</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga8a0617637eea3d76e33a52758b2cd49f">asReleaseExclusiveLock</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#gaa45545a038adcc8c73348cfe9488f32d">asAcquireSharedLock</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga44f7327c5601e8dbf74768a2f3cc0dc3">asReleaseSharedLock</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#gaf0074d581ac2edd06e63e56e4be52c8e">asAtomicInc</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#ga0565bcb53be170dd85ae27a5b6f2b828">asAtomicDec</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_api_funcs_3"></a>
|
||||
Custom memory management</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="group__api__memory__functions.html#ga527ab125defc58aa40cc151a25582a31">asSetGlobalMemoryFunctions</a></li>
|
||||
<li><a class="el" href="group__api__memory__functions.html#ga9267c4ad35aceaf7cc0961cd42147ee7">asResetGlobalMemoryFunctions</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_api_funcs_4"></a>
|
||||
Auxiliary functions</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="group__api__auxiliary__functions.html#ga79cbcfe1a47e436da6f2f28ff0314f75">asGetLibraryVersion</a></li>
|
||||
<li><a class="el" href="group__api__auxiliary__functions.html#gaba86cba765a7148e2a306b4305ba48f9">asGetLibraryOptions</a></li>
|
||||
<li><a class="el" href="group__api__multithread__functions.html#gaa0ffb789dab56b5617e2f961f9c79fdb">asCreateLockableSharedBool</a></li>
|
||||
<li><a class="el" href="group__api__principal__functions.html#ga863f2a1e60e6c19eea9c6b34690dcc00">asGetTypeTraits</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sun Jul 12 2020 16:59:16 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
134
docs/manual/doc_api_interfaces.html
Normal file
134
docs/manual/doc_api_interfaces.html
Normal file
@@ -0,0 +1,134 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Interfaces</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_api_interfaces.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Interfaces </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="doc_api_intf_1"></a>
|
||||
Principal interfaces</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="classas_i_script_engine.html">asIScriptEngine</a></li>
|
||||
<li><a class="el" href="classas_i_script_module.html">asIScriptModule</a></li>
|
||||
<li><a class="el" href="classas_i_script_context.html">asIScriptContext</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_api_intf_2"></a>
|
||||
Secondary interfaces</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="classas_i_script_generic.html">asIScriptGeneric</a></li>
|
||||
<li><a class="el" href="classas_i_script_object.html">asIScriptObject</a></li>
|
||||
<li><a class="el" href="classas_i_type_info.html">asITypeInfo</a></li>
|
||||
<li><a class="el" href="classas_i_script_function.html">asIScriptFunction</a></li>
|
||||
<li><a class="el" href="classas_i_string_factory.html">asIStringFactory</a></li>
|
||||
<li><a class="el" href="classas_i_j_i_t_compiler.html">asIJITCompiler</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="doc_api_intf_3"></a>
|
||||
Auxiliary interfaces</h1>
|
||||
<ul>
|
||||
<li><a class="el" href="classas_i_binary_stream.html">asIBinaryStream</a></li>
|
||||
<li><a class="el" href="classas_i_lockable_shared_bool.html">asILockableSharedBool</a> </li>
|
||||
</ul>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sun Jul 12 2020 16:59:16 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
115
docs/manual/doc_arrays.html
Normal file
115
docs/manual/doc_arrays.html
Normal file
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Custom array type</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_arrays.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Custom array type </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>Like the <a class="el" href="doc_strings.html">string type</a>, AngelScript doesn't have a built-in dynamic array type. Instead the application developers that wishes to allow dynamic arrays in the scripts should register this in the way that is best suited for the application. To save time a readily usable add-on is provided with a fully implemented <a class="el" href="doc_addon_array.html">dynamic array type</a>. <br />
|
||||
</p>
|
||||
<p>If you wish to create your own array type, you'll need to understand how <a class="el" href="doc_adv_template.html">template types</a> work. A template type is a special form of registering a type that the engine can then use to instanciate the true types based on the desired sub-types. This allow a single type registration to cover all possible array types that the script may need, instead of the application having to register a specific type for each type of array.</p>
|
||||
<p>Of course, a generic type like this will have a drawback in performance due to runtime checks to determine the actual type, so the application should consider registering <a class="el" href="doc_adv_template.html#doc_adv_template_2">template specializations</a> of the most common array types. This will allow the best optimizations for those types, and will also permit better interaction with the application as the template specialization can better match the actual array types that the application uses. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
187
docs/manual/doc_as_vs_cpp_types.html
Normal file
187
docs/manual/doc_as_vs_cpp_types.html
Normal file
@@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Datatypes in AngelScript and C++</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_as_vs_cpp_types.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Datatypes in AngelScript and C++ </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="doc_as_vs_cpp_types_1"></a>
|
||||
Primitives</h1>
|
||||
<p>Primitives in AngelScript have direct matches in C++.</p>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100"><b>AngelScript</b></td><td width="150"><b>C++</b></td><td width="100"><b>Size (bits)</b> </td></tr>
|
||||
<tr>
|
||||
<td>void </td><td>void </td><td>0 </td></tr>
|
||||
<tr>
|
||||
<td>int8 </td><td>signed char </td><td>8 </td></tr>
|
||||
<tr>
|
||||
<td>int16 </td><td>signed short </td><td>16 </td></tr>
|
||||
<tr>
|
||||
<td>int </td><td>signed int (*) </td><td>32 </td></tr>
|
||||
<tr>
|
||||
<td>int64 </td><td>signed int64_t </td><td>64 </td></tr>
|
||||
<tr>
|
||||
<td>uint8 </td><td>unsigned char </td><td>8 </td></tr>
|
||||
<tr>
|
||||
<td>uint16</td><td>unsigned short </td><td>16 </td></tr>
|
||||
<tr>
|
||||
<td>uint </td><td>unsigned int (*) </td><td>32 </td></tr>
|
||||
<tr>
|
||||
<td>uint64</td><td>unsigned uint64_t </td><td>64 </td></tr>
|
||||
<tr>
|
||||
<td>float </td><td>float </td><td>32 </td></tr>
|
||||
<tr>
|
||||
<td>double</td><td>double </td><td>64 </td></tr>
|
||||
<tr>
|
||||
<td>bool </td><td>bool </td><td>8 (**) </td></tr>
|
||||
</table>
|
||||
<p>(*) An int can actually be of varying size on different platforms in C++, but most commonly it is 32 bits long. AngelScript will always assume 32 bits though.</p>
|
||||
<p>(**) On 32 bit PowerPC platforms the bool type commonly have the size of 32 bit, when compiled on such platforms AngelScript also uses 32 bits for the bool type</p>
|
||||
<h1><a class="anchor" id="doc_as_vs_cpp_types_5"></a>
|
||||
Strings</h1>
|
||||
<p>AngelScript expects the application to register its own <a class="el" href="doc_strings.html">string type</a>, so the string types should match perfectly.</p>
|
||||
<p>The char* string type that is so convenient in C++ is however very difficult to use in a scripted environment where you do not have full control over how it is used. For that reason it is recommended that you wrap any functions that use the char* string type so that the string is properly converted to an object that can be safely handled by both the application and the script engine, e.g. std::string or another class of your preference.</p>
|
||||
<h1><a class="anchor" id="doc_as_vs_cpp_types_2"></a>
|
||||
Arrays</h1>
|
||||
<p>AngelScript also expects the application to register the type that should be used for <a class="el" href="doc_arrays.html">dynamic arrays</a>. Normally this is done by registering the <a class="el" href="doc_addon_array.html">array template object</a> add-on, but the application is free to do it differently.</p>
|
||||
<p>It is also possible to have different object types for different array types, so the application can match the array type exactly with the types used in C++.</p>
|
||||
<h1><a class="anchor" id="doc_as_vs_cpp_types_3"></a>
|
||||
Object handles</h1>
|
||||
<p>The AngelScript object handles are reference counted pointers to objects. This means that for object handles to work, the object must have some way of counting references, for example an AddRef/Release method pair.</p>
|
||||
<p>When AngelScript passes an object handle by value to a function it increases the reference count to count for the argument instance, thus the function is responsible for releasing the reference once it is finished with it. In the same manner AngelScript expects any handle returned from a function to already have the reference accounted for.</p>
|
||||
<p>However, when registering functions/methods with AngelScript the application can tell the library that it should automatically take care of releasing the handle references once a function return, likewise for returned handles. This is done by adding a + sign to the @ type modifier. When doing this an object handle can be safely passed to a C++ function that expects a normal pointer, but don't release it afterwards.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_obj_handle.html">Object handles to the application</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_as_vc_cpp_types_5"></a>
|
||||
Script classes and interfaces</h1>
|
||||
<p>All script classes and interfaces are seen as the <a class="el" href="classas_i_script_object.html">asIScriptObject</a> type by the application. The <a class="el" href="classas_i_script_object.html">asIScriptObject</a> interface has methods to determine the actual type of the script class or interface, as well as to interact with the actual object instance.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_use_script_class.html">Using script classes</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_as_vc_cpp_types_6"></a>
|
||||
Function pointers</h1>
|
||||
<p>All script function pointers are seen as the <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> type by the application. The <a class="el" href="classas_i_script_function.html">asIScriptFunction</a> type has methods to obtain the name of the function and the parameter and return types, etc.</p>
|
||||
<h1><a class="anchor" id="doc_as_vs_cpp_types_4"></a>
|
||||
Parameter references</h1>
|
||||
<p>Because AngelScript needs to guarantee validity of pointers at all times, it doesn't always pass references to the true object to the function parameter. Instead it creates a copy of the object, whose reference is passed to the function, and if the reference is marked to return a value, the clone is copied back to the original object (if it still exists) once the function returns.</p>
|
||||
<p>Because of this, AngelScript's parameter references are mostly compatible with C++ references, or pointers, except that the address normally shouldn't be stored for later use, since the object may be destroyed once the function returns.</p>
|
||||
<p>If it is necessary to store the address of the object, then object handles should be used instead.</p>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="100" valign="top"><b>Reference</b></td><td valign="top"><b>Description</b> </td></tr>
|
||||
<tr>
|
||||
<td valign="top">&in</td><td>A copy of the value is always taken and the reference to the copy is passed to the function. For script functions this is not useful, but it is maintained for compatibility with application registered functions. </td></tr>
|
||||
<tr>
|
||||
<td valign="top">const &in</td><td>If the life time of the value can be guaranteed to be valid during the execution of the function, the reference to the true object is passed to the function, otherwise a copy is made. </td></tr>
|
||||
<tr>
|
||||
<td valign="top">&out</td><td>A reference to an unitialized value is passed to the function. When the function returns the value is copied to the true reference. The argument expression is evaluated only after the function call. This is the best way to have functions return multiple values. </td></tr>
|
||||
<tr>
|
||||
<td valign="top">const &out</td><td>Useless as the function wouldn't be able to modify the value. </td></tr>
|
||||
<tr>
|
||||
<td valign="top">&inout</td><td>The true reference is always passed to the function. Only objects that support object handles can be used with this type as they can always be guaranteed to stay alive during the call. </td></tr>
|
||||
<tr>
|
||||
<td valign="top">const &inout</td><td>The referred to object will be read-only. </td></tr>
|
||||
</table>
|
||||
<p>If the application wants parameter references that work like they do in C++, then this can be allowed by <a class="el" href="doc_adv_custom_options.html#doc_adv_custom_options_lang_mod">setting an engine property</a>. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
251
docs/manual/doc_call_script_func.html
Normal file
251
docs/manual/doc_call_script_func.html
Normal file
@@ -0,0 +1,251 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Calling a script function</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_call_script_func.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Calling a script function </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="doc_call_script_1"></a>
|
||||
Preparing context and executing the function</h1>
|
||||
<p>Normally a script function is executed in a few steps:</p>
|
||||
<ol>
|
||||
<li>
|
||||
Prepare the context </li>
|
||||
<li>
|
||||
Set the function arguments </li>
|
||||
<li>
|
||||
Execute the function </li>
|
||||
<li>
|
||||
Retrieve the return value </li>
|
||||
</ol>
|
||||
<p>The code for this might look something like this:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Get a script context instance. Usually you'll want to reuse a previously</span></div>
|
||||
<div class="line"><span class="comment">// created instance to avoid the overhead of allocating the instance with</span></div>
|
||||
<div class="line"><span class="comment">// each call.</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = engine-><a class="code" href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">CreateContext</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Obtain the function from the module. This should preferrably </span></div>
|
||||
<div class="line"><span class="comment">// be cached if the same function is called multiple times.</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *func = engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(module_name)-><a class="code" href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">GetFunctionByDecl</a>(function_declaration);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Prepare() must be called to allow the context to prepare the stack</span></div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">Prepare</a>(func);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Set the function arguments</span></div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a14cac831c1b419f552ca62a239dfcf45">SetArgDWord</a>(...);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">int</span> r = ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r == <a class="code" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a6d3730dd7a91aff81cafaaca4e93efaa">asEXECUTION_FINISHED</a> )</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// The return value is only valid if the execution finished successfully</span></div>
|
||||
<div class="line"> <a class="code" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> ret = ctx-><a class="code" href="classas_i_script_context.html#a43cd2fb72685aef96e8ddc622c9621bf">GetReturnDWord</a>();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Release the context when you're done with it</span></div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a1b13a5f3e58627e9ff4300c0c6f0f3cf">Release</a>();</div>
|
||||
</div><!-- fragment --><p>If your application allows the execution to be suspended, either by using the callback function or registering a function that allow the script to manually suspend the execution, then the execution function may return before finishing with the return code asEXECUTION_SUSPENDED. In that case you can later resume the execution by simply calling the execution function again.</p>
|
||||
<p>Note that the return value retrieved with GetReturnValue() is only valid if the script function returned successfully, i.e. if Execute() returned asEXECUTION_FINISHED.</p>
|
||||
<h1><a class="anchor" id="doc_call_script_2"></a>
|
||||
Passing and returning primitives</h1>
|
||||
<p>When calling script functions that take arguments, the values of these arguments must be set after the call to Prepare() and before Execute(). The arguments are set using a group of SetArg methods:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> SetArgDWord(<span class="keywordtype">int</span> arg, <a class="code" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> value);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> SetArgQWord(<span class="keywordtype">int</span> arg, <a class="code" href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a> value);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> SetArgFloat(<span class="keywordtype">int</span> arg, <span class="keywordtype">float</span> value);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> SetArgDouble(<span class="keywordtype">int</span> arg, <span class="keywordtype">double</span> value);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> SetArgByte(<span class="keywordtype">int</span> arg, <a class="code" href="angelscript_8h.html#a48b3da7121b3abb56bff63b3beb0df63">asBYTE</a> value);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> SetArgWord(<span class="keywordtype">int</span> arg, <a class="code" href="angelscript_8h.html#a340da175136fbe283932fa3c3442cea0">asWORD</a> value);</div>
|
||||
</div><!-- fragment --><p><code>arg</code> is the argument number, where the first argument is on 0, the second on 1, and so on. <code>value</code> is the value of the argument. What method to use is determined by the type of the parameter. For primitive types you can use any of these. If the parameter type is a reference to a primitive type it is recommended to use the SetArgAddress() method and pass the pointer as the value. For non-primitive types the method SetArgObject() should be used, which will be described in the next section.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The context has been prepared for a script </span></div>
|
||||
<div class="line"><span class="comment">// function with the following signature:</span></div>
|
||||
<div class="line"><span class="comment">// int function(int, double, bool, int &out)</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Put the arguments on the context stack, starting with the first one</span></div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a14cac831c1b419f552ca62a239dfcf45">SetArgDWord</a>(0, 1);</div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#acbdddda3b80c37b70b8fd35c8e7383b9">SetArgDouble</a>(1, 3.141592);</div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#ac5ac8ce5bb209f43d4da620db5d271da">SetArgByte</a>(2, <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="keywordtype">int</span> val;</div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#aa8de8f21dfbb2cdf0becbabaa3e883ed">SetArgAddress</a>(3, &val);</div>
|
||||
</div><!-- fragment --><p>Once the script function has been executed the return value is retrieved in a similar way using the group of GetReturn methods:</p>
|
||||
<div class="fragment"><div class="line"><a class="code" href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a> GetReturnDWord();</div>
|
||||
<div class="line"><a class="code" href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a> GetReturnQWord();</div>
|
||||
<div class="line"><span class="keywordtype">float</span> GetReturnFloat();</div>
|
||||
<div class="line"><span class="keywordtype">double</span> GetReturnDouble();</div>
|
||||
<div class="line"><a class="code" href="angelscript_8h.html#a48b3da7121b3abb56bff63b3beb0df63">asBYTE</a> GetReturnByte();</div>
|
||||
<div class="line"><a class="code" href="angelscript_8h.html#a340da175136fbe283932fa3c3442cea0">asWORD</a> GetReturnWord();</div>
|
||||
</div><!-- fragment --><p>Note that you must make sure the returned value is in fact valid, for example if the script function was interrupted by a script exception the value would not be valid. You do this by verifying the return code from Execute() or GetState(), where the return code should be asEXECUTION_FINISHED.</p>
|
||||
<h1><a class="anchor" id="doc_call_script_3"></a>
|
||||
Passing and returning objects</h1>
|
||||
<p>Passing registered object types to a script function is done in a similar way to how primitive types are passed. The function to use is SetArgObject():</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> SetArgObject(<span class="keywordtype">int</span> arg, <span class="keywordtype">void</span> *<span class="keywordtype">object</span>);</div>
|
||||
</div><!-- fragment --><p><code>arg</code> is the argument number, just like the other SetArg methods. <code>object</code> is a pointer to the object you wish to pass.</p>
|
||||
<p>This same method is used both for parameters passed by value and for those passed by reference. The library will automatically make a copy of the object if the parameter is defined to be passed by value.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The complex object we wish to pass to the script function</span></div>
|
||||
<div class="line">CObject obj;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Pass the object to the function</span></div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a09044a12dfb2d44d19bd8a4025cb814d">SetArgObject</a>(0, &obj);</div>
|
||||
</div><!-- fragment --><p>Getting an object returned by a script function is done in a similar way, using GetReturnObject():</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> *GetReturnObject();</div>
|
||||
</div><!-- fragment --><p>This method will return a pointer to the object returned by the script function. The library will still hold a reference to the object, which will only be freed as the context is released.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The object where we want to store the return value</span></div>
|
||||
<div class="line">CObject obj;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Execute the function</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> r = ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r == <a class="code" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a6d3730dd7a91aff81cafaaca4e93efaa">asEXECUTION_FINISHED</a> )</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Get a pointer to the returned object and copy it to our object</span></div>
|
||||
<div class="line"> obj = *(CObject*)ctx-><a class="code" href="classas_i_script_context.html#a6d5739fac9c90bcd0fea55d01841d43a">GetReturnObject</a>();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>It is important to make a copy of the returned object, or if it is managed by reference counting add a reference to it. If this is not done the pointer obtained with GetReturnObject() will be invalidated as the context is released, or reused for another script function call.</p>
|
||||
<h1><a class="anchor" id="doc_call_script_4"></a>
|
||||
Exception handling</h1>
|
||||
<p>If the script performs an illegal action, e.g. calling a method on a null handle, then the script engine will throw a script exception. The virtual machine will then abort the execution and the <a class="el" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a> method will return with the value <a class="el" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69aa3d548fa7d2278d848e50222b700c6c8">asEXECUTION_EXCEPTION</a>.</p>
|
||||
<p>At this time it is possible to obtain information about the exception through the <a class="el" href="classas_i_script_context.html">asIScriptContext</a>'s methods. Example:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> PrintExceptionInfo(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine = ctx-><a class="code" href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">GetEngine</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determine the exception that occurred</span></div>
|
||||
<div class="line"> printf(<span class="stringliteral">"desc: %s\n"</span>, ctx-><a class="code" href="classas_i_script_context.html#a46e2411bc84e99f57e7d9fe2374bb479">GetExceptionString</a>());</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determine the function where the exception occurred</span></div>
|
||||
<div class="line"> <span class="keyword">const</span> <a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *<span class="keyword">function</span> = ctx-><a class="code" href="classas_i_script_context.html#a8e59aceec42080d29e08b44460ceb8b3">GetExceptionFunction</a>();</div>
|
||||
<div class="line"> printf(<span class="stringliteral">"func: %s\n"</span>, function->GetDeclaration());</div>
|
||||
<div class="line"> printf(<span class="stringliteral">"modl: %s\n"</span>, function->GetModuleName());</div>
|
||||
<div class="line"> printf(<span class="stringliteral">"sect: %s\n"</span>, function->GetScriptSectionName());</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determine the line number where the exception occurred</span></div>
|
||||
<div class="line"> printf(<span class="stringliteral">"line: %d\n"</span>, ctx-><a class="code" href="classas_i_script_context.html#a22e3c351fe6b13ba0a62010dfc305080">GetExceptionLineNumber</a>());</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>If desired, it is also possible to <a class="el" href="classas_i_script_context.html#a4d1f481473df3f7aefccc5bb6904e405">register a callback function</a> that will be called at the moment the exception occurred, before the <a class="el" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a> method returns. The exception callback can then use <a class="el" href="classas_i_script_context.html#a57cfcc729b214fdaacb1358e03daf610">WillExceptionBeCaught</a> to determine if the exception will be <a class="el" href="doc_script_statements.html#try">caught within the script</a> or if it will abort the execution.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_debug.html">Debugging scripts</a> for information on examining the callstack, and <a class="el" href="doc_addon_helpers.html">GetExceptionInfo</a> for a helper function to get information on exceptions. </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html_aa8de8f21dfbb2cdf0becbabaa3e883ed"><div class="ttname"><a href="classas_i_script_context.html#aa8de8f21dfbb2cdf0becbabaa3e883ed">asIScriptContext::SetArgAddress</a></div><div class="ttdeci">virtual int SetArgAddress(asUINT arg, void *addr)=0</div><div class="ttdoc">Sets the address of a reference or handle argument.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a22e3c351fe6b13ba0a62010dfc305080"><div class="ttname"><a href="classas_i_script_context.html#a22e3c351fe6b13ba0a62010dfc305080">asIScriptContext::GetExceptionLineNumber</a></div><div class="ttdeci">virtual int GetExceptionLineNumber(int *column=0, const char **sectionName=0)=0</div><div class="ttdoc">Returns the line number where the exception occurred.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a5428f0c940201e5f3bbb28304aeb81bc"><div class="ttname"><a href="angelscript_8h.html#a5428f0c940201e5f3bbb28304aeb81bc">asDWORD</a></div><div class="ttdeci">unsigned long asDWORD</div><div class="ttdoc">32 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:614</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_ab4754d55d8667aefbed135b4794d461b"><div class="ttname"><a href="classas_i_script_module.html#ab4754d55d8667aefbed135b4794d461b">asIScriptModule::GetFunctionByDecl</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunctionByDecl(const char *decl) const =0</div><div class="ttdoc">Returns the function by its declaration.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e52894432737acac2e1a422e496bf84"><div class="ttname"><a href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">asIScriptContext::Execute</a></div><div class="ttdeci">virtual int Execute()=0</div><div class="ttdoc">Executes the prepared function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_acbdddda3b80c37b70b8fd35c8e7383b9"><div class="ttname"><a href="classas_i_script_context.html#acbdddda3b80c37b70b8fd35c8e7383b9">asIScriptContext::SetArgDouble</a></div><div class="ttdeci">virtual int SetArgDouble(asUINT arg, double value)=0</div><div class="ttdoc">Sets a double argument value.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a6d5739fac9c90bcd0fea55d01841d43a"><div class="ttname"><a href="classas_i_script_context.html#a6d5739fac9c90bcd0fea55d01841d43a">asIScriptContext::GetReturnObject</a></div><div class="ttdeci">virtual void * GetReturnObject()=0</div><div class="ttdoc">Return a pointer to the returned object.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a48b3da7121b3abb56bff63b3beb0df63"><div class="ttname"><a href="angelscript_8h.html#a48b3da7121b3abb56bff63b3beb0df63">asBYTE</a></div><div class="ttdeci">unsigned char asBYTE</div><div class="ttdoc">8 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:598</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a46e2411bc84e99f57e7d9fe2374bb479"><div class="ttname"><a href="classas_i_script_context.html#a46e2411bc84e99f57e7d9fe2374bb479">asIScriptContext::GetExceptionString</a></div><div class="ttdeci">virtual const char * GetExceptionString()=0</div><div class="ttdoc">Returns the exception string text.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a07f12016c5435aec5b63449abb6e4d8d"><div class="ttname"><a href="classas_i_script_context.html#a07f12016c5435aec5b63449abb6e4d8d">asIScriptContext::GetEngine</a></div><div class="ttdeci">virtual asIScriptEngine * GetEngine() const =0</div><div class="ttdoc">Returns a pointer to the engine.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a867f14b4137dd4602fda1e616b217a69a6d3730dd7a91aff81cafaaca4e93efaa"><div class="ttname"><a href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69a6d3730dd7a91aff81cafaaca4e93efaa">asEXECUTION_FINISHED</a></div><div class="ttdeci">@ asEXECUTION_FINISHED</div><div class="ttdoc">The context has successfully completed the execution.</div><div class="ttdef"><b>Definition:</b> angelscript.h:398</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a10aea5de212e440ffd6ec8fc0b17563d"><div class="ttname"><a href="angelscript_8h.html#a10aea5de212e440ffd6ec8fc0b17563d">asQWORD</a></div><div class="ttdeci">unsigned __int64 asQWORD</div><div class="ttdoc">64 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:619</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a09044a12dfb2d44d19bd8a4025cb814d"><div class="ttname"><a href="classas_i_script_context.html#a09044a12dfb2d44d19bd8a4025cb814d">asIScriptContext::SetArgObject</a></div><div class="ttdeci">virtual int SetArgObject(asUINT arg, void *obj)=0</div><div class="ttdoc">Sets the object argument value.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2630e1cd03ffab0fee9b820bf0afe42a"><div class="ttname"><a href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">asIScriptEngine::CreateContext</a></div><div class="ttdeci">virtual asIScriptContext * CreateContext()=0</div><div class="ttdoc">Creates a new script context.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_ac5ac8ce5bb209f43d4da620db5d271da"><div class="ttname"><a href="classas_i_script_context.html#ac5ac8ce5bb209f43d4da620db5d271da">asIScriptContext::SetArgByte</a></div><div class="ttdeci">virtual int SetArgByte(asUINT arg, asBYTE value)=0</div><div class="ttdoc">Sets an 8-bit argument value.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e59aceec42080d29e08b44460ceb8b3"><div class="ttname"><a href="classas_i_script_context.html#a8e59aceec42080d29e08b44460ceb8b3">asIScriptContext::GetExceptionFunction</a></div><div class="ttdeci">virtual asIScriptFunction * GetExceptionFunction()=0</div><div class="ttdoc">Returns the function where the exception occurred.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a14cac831c1b419f552ca62a239dfcf45"><div class="ttname"><a href="classas_i_script_context.html#a14cac831c1b419f552ca62a239dfcf45">asIScriptContext::SetArgDWord</a></div><div class="ttdeci">virtual int SetArgDWord(asUINT arg, asDWORD value)=0</div><div class="ttdoc">Sets a 32-bit integer argument value.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a43976f42dfc6c1af23e132d36265173a"><div class="ttname"><a href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">asIScriptContext::Prepare</a></div><div class="ttdeci">virtual int Prepare(asIScriptFunction *func)=0</div><div class="ttdoc">Prepares the context for execution of the function.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a43cd2fb72685aef96e8ddc622c9621bf"><div class="ttname"><a href="classas_i_script_context.html#a43cd2fb72685aef96e8ddc622c9621bf">asIScriptContext::GetReturnDWord</a></div><div class="ttdeci">virtual asDWORD GetReturnDWord()=0</div><div class="ttdoc">Returns the 32-bit return value.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a340da175136fbe283932fa3c3442cea0"><div class="ttname"><a href="angelscript_8h.html#a340da175136fbe283932fa3c3442cea0">asWORD</a></div><div class="ttdeci">unsigned short asWORD</div><div class="ttdoc">16 bit unsigned integer</div><div class="ttdef"><b>Definition:</b> angelscript.h:599</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a1b13a5f3e58627e9ff4300c0c6f0f3cf"><div class="ttname"><a href="classas_i_script_context.html#a1b13a5f3e58627e9ff4300c0c6f0f3cf">asIScriptContext::Release</a></div><div class="ttdeci">virtual int Release() const =0</div><div class="ttdoc">Decrease reference counter.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
207
docs/manual/doc_callbacks.html
Normal file
207
docs/manual/doc_callbacks.html
Normal file
@@ -0,0 +1,207 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Funcdefs and script callback functions</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_callbacks.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Funcdefs and script callback functions </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p><a class="el" href="doc_global_funcdef.html">Funcdefs</a> are used to define a function signature for callbacks. This funcdef is then used to declare variables or function parameters that can hold handles to functions of matching signature.</p>
|
||||
<p>The application can also <a class="el" href="classas_i_script_engine.html#a03c1a2cc23ae4b742c927f3472a1a4f7">register funcdefs</a> as part of the application interface if the intention is for the script to set callbacks that will be called from the application. Once this is done, the application can receive the function handles as an <a class="el" href="classas_i_script_function.html" title="The interface for a script function description.">asIScriptFunction</a> pointer which can then be <a class="el" href="doc_call_script_func.html">executed</a> normally.</p>
|
||||
<h1><a class="anchor" id="doc_callbacks_example"></a>
|
||||
An example</h1>
|
||||
<p>Let's say the application needs to allow the script to set a callback that will then be called at some event. To do this the application would first register the funcdef that defines the signature of the callback. Then it needs to register the function that will be used to set the callback from the script.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Register a simple funcdef for the callback</span></div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a03c1a2cc23ae4b742c927f3472a1a4f7">RegisterFuncdef</a>(<span class="stringliteral">"void CallbackFunc()"</span>); </div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register a function for setting the callback</span></div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">RegisterGlobalFunction</a>(<span class="stringliteral">"void SetCallback(CallbackFunc @cb)"</span>, <a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(SetCallback), <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>); </div>
|
||||
</div><!-- fragment --><p>With this interface, the script would be able to inform the callback like this:</p>
|
||||
<pre>
|
||||
void main()
|
||||
{
|
||||
// Tell the application what script function to call
|
||||
SetCallback(MyCallback);
|
||||
}</pre><pre> // The signature matches the registered CallbackFunc funcdef
|
||||
void MyCallback()
|
||||
{
|
||||
...
|
||||
}
|
||||
</pre><p>The implementation for the SetCallback function might look something like this.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The callback is a script function.</span></div>
|
||||
<div class="line"><span class="comment">// Don't forget to release this before cleaning up the engine.</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *callback = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> SetCallback(<a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *cb)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Release the previous callback, if any</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( callback )</div>
|
||||
<div class="line"> callback-><a class="code" href="classas_i_script_function.html#a0a98f1f7f91574a11d7d8c5062bdcdee">Release</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Store the received handle for later use</span></div>
|
||||
<div class="line"> callback = cb;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Do not release the received script function </span></div>
|
||||
<div class="line"> <span class="comment">// until it won't be used any more</span></div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>To call the actual callback when it is time, the application uses the script context just like for any other <a class="el" href="doc_call_script_func.html">call to a script function</a>.</p>
|
||||
<h1><a class="anchor" id="doc_callbacks_delegate"></a>
|
||||
Delegates</h1>
|
||||
<p>Of course, callbacks can be used with <a class="el" href="doc_datatypes_funcptr.html">delegates</a> as well. Delegates are special function objects that holds a reference to an object and the method it should call on it. If this is exactly how the application should treat them, then the above example will work exactly the same and the application never needs to worry about whether the callback is actually a global function or a delegate object.</p>
|
||||
<p>Sometimes however, it may be beneficial to break up the delegate, and have the application store the actual object and method separately, for example if the application should use a <a class="el" href="doc_adv_weakref.html">weak reference</a> to avoid keeping the object alive longer than desired. The following shows how to retrieve the internals of the delegate:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// The callback, and accompanying object, if the callback is a class method</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *callback = 0;</div>
|
||||
<div class="line"><span class="keywordtype">void</span> *callbackObject = 0;</div>
|
||||
<div class="line"><a class="code" href="classas_i_type_info.html">asITypeInfo</a> *callbackObjectType = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> SetCallback(<a class="code" href="classas_i_script_function.html">asIScriptFunction</a> *cb)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Release the previous callback, if any</span></div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( callback )</div>
|
||||
<div class="line"> callback-><a class="code" href="classas_i_script_function.html#a0a98f1f7f91574a11d7d8c5062bdcdee">Release</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( callbackObject )</div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#a82873d3769ded547894a7c3d52c220fd">ReleaseScriptObject</a>(callbackObject, callbackObjectType);</div>
|
||||
<div class="line"> callback = 0;</div>
|
||||
<div class="line"> callbackObject = 0;</div>
|
||||
<div class="line"> callbackObjectType = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( cb && cb-><a class="code" href="classas_i_script_function.html#aa4d06c7d590e7eb4df280a8224f4499c">GetFuncType</a>() == <a class="code" href="angelscript_8h.html#a06fb2a1ebf5d007e0d542abced1b648fa02773b148f9c6fb3ed5d945a940f302a">asFUNC_DELEGATE</a> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> callbackObject = cb-><a class="code" href="classas_i_script_function.html#ae1786c3f4341dc3bfcaacc3cb8900a57">GetDelegateObject</a>();</div>
|
||||
<div class="line"> callbackObjectType = cb-><a class="code" href="classas_i_script_function.html#ad79461f80fcffd513b43564d75cc5360">GetDelegateObjectType</a>();</div>
|
||||
<div class="line"> callback = cb-><a class="code" href="classas_i_script_function.html#aa28f4e68da8abb770d7f725375bcd2bb">GetDelegateFunction</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Hold on to the object and method</span></div>
|
||||
<div class="line"> engine-><a class="code" href="classas_i_script_engine.html#ade1d309876c876c733d437a53e708c28">AddRefScriptObject</a>(callbackObject, callbackObjectType);</div>
|
||||
<div class="line"> callback-><a class="code" href="classas_i_script_function.html#a0a00f9581e7ece5f2a536d0e22c10d0c">AddRef</a>();</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Release the delegate, since it won't be used anymore</span></div>
|
||||
<div class="line"> cb-><a class="code" href="classas_i_script_function.html#a0a98f1f7f91574a11d7d8c5062bdcdee">Release</a>();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Store the received handle for later use</span></div>
|
||||
<div class="line"> callback = cb;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Do not release the received script function </span></div>
|
||||
<div class="line"> <span class="comment">// until it won't be used any more</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a82873d3769ded547894a7c3d52c220fd"><div class="ttname"><a href="classas_i_script_engine.html#a82873d3769ded547894a7c3d52c220fd">asIScriptEngine::ReleaseScriptObject</a></div><div class="ttdeci">virtual void ReleaseScriptObject(void *obj, const asITypeInfo *type)=0</div><div class="ttdoc">Release the object pointer.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_a0a00f9581e7ece5f2a536d0e22c10d0c"><div class="ttname"><a href="classas_i_script_function.html#a0a00f9581e7ece5f2a536d0e22c10d0c">asIScriptFunction::AddRef</a></div><div class="ttdeci">virtual int AddRef() const =0</div><div class="ttdoc">Increases the reference counter.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_a0a98f1f7f91574a11d7d8c5062bdcdee"><div class="ttname"><a href="classas_i_script_function.html#a0a98f1f7f91574a11d7d8c5062bdcdee">asIScriptFunction::Release</a></div><div class="ttdeci">virtual int Release() const =0</div><div class="ttdoc">Decrease reference counter.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a03c1a2cc23ae4b742c927f3472a1a4f7"><div class="ttname"><a href="classas_i_script_engine.html#a03c1a2cc23ae4b742c927f3472a1a4f7">asIScriptEngine::RegisterFuncdef</a></div><div class="ttdeci">virtual int RegisterFuncdef(const char *decl)=0</div><div class="ttdoc">Registers a function definition.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_ad79461f80fcffd513b43564d75cc5360"><div class="ttname"><a href="classas_i_script_function.html#ad79461f80fcffd513b43564d75cc5360">asIScriptFunction::GetDelegateObjectType</a></div><div class="ttdeci">virtual asITypeInfo * GetDelegateObjectType() const =0</div><div class="ttdoc">Returns the type of the delegated object.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2f84b9b51733f22c68b8448b02c2f1c7"><div class="ttname"><a href="classas_i_script_engine.html#a2f84b9b51733f22c68b8448b02c2f1c7">asIScriptEngine::RegisterGlobalFunction</a></div><div class="ttdeci">virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0</div><div class="ttdoc">Registers a global function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_aa28f4e68da8abb770d7f725375bcd2bb"><div class="ttname"><a href="classas_i_script_function.html#aa28f4e68da8abb770d7f725375bcd2bb">asIScriptFunction::GetDelegateFunction</a></div><div class="ttdeci">virtual asIScriptFunction * GetDelegateFunction() const =0</div><div class="ttdoc">Returns the function for the delegate.</div></div>
|
||||
<div class="ttc" id="aclassas_i_type_info_html"><div class="ttname"><a href="classas_i_type_info.html">asITypeInfo</a></div><div class="ttdoc">The interface for describing types This interface is used to describe the types in the script engine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3527</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_ae1786c3f4341dc3bfcaacc3cb8900a57"><div class="ttname"><a href="classas_i_script_function.html#ae1786c3f4341dc3bfcaacc3cb8900a57">asIScriptFunction::GetDelegateObject</a></div><div class="ttdeci">virtual void * GetDelegateObject() const =0</div><div class="ttdoc">Returns the object for the delegate.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html"><div class="ttname"><a href="classas_i_script_function.html">asIScriptFunction</a></div><div class="ttdoc">The interface for a script function description.</div><div class="ttdef"><b>Definition:</b> angelscript.h:3823</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_ade1d309876c876c733d437a53e708c28"><div class="ttname"><a href="classas_i_script_engine.html#ade1d309876c876c733d437a53e708c28">asIScriptEngine::AddRefScriptObject</a></div><div class="ttdeci">virtual void AddRefScriptObject(void *obj, const asITypeInfo *type)=0</div><div class="ttdoc">Increase the reference counter for the script object.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a06fb2a1ebf5d007e0d542abced1b648fa02773b148f9c6fb3ed5d945a940f302a"><div class="ttname"><a href="angelscript_8h.html#a06fb2a1ebf5d007e0d542abced1b648fa02773b148f9c6fb3ed5d945a940f302a">asFUNC_DELEGATE</a></div><div class="ttdeci">@ asFUNC_DELEGATE</div><div class="ttdoc">A function delegate.</div><div class="ttdef"><b>Definition:</b> angelscript.h:557</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_function_html_aa4d06c7d590e7eb4df280a8224f4499c"><div class="ttname"><a href="classas_i_script_function.html#aa4d06c7d590e7eb4df280a8224f4499c">asIScriptFunction::GetFuncType</a></div><div class="ttdeci">virtual asEFuncType GetFuncType() const =0</div><div class="ttdoc">Returns the type of the function.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
229
docs/manual/doc_compile_lib.html
Normal file
229
docs/manual/doc_compile_lib.html
Normal file
@@ -0,0 +1,229 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Compile the library</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_compile_lib.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Compile the library </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>In the sdk/angelscript/projects directory you'll find project files for many of the popular compilers. However, these project files are not always up to date with the latest version of the library. If you get any compiler or linker errors please make sure the project file include all the files in the sdk/angelscript/source directory, and that the project settings are set according to this article.</p>
|
||||
<p>If you don't find a project file for your compiler, you can easily create your own project by adding all the files in the sdk/angelscript/source directory, and configuring the project apropriately. If you have a new compiler/target that hasn't been used with AngelScript before, you may need to edit the as_config.h file to make sure the library is compiled properly.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_compile_lib.html#doc_compile_platforms">Considerations for specific platforms</a></dd></dl>
|
||||
<h1><a class="anchor" id="doc_compile_lib_1"></a>
|
||||
Set compile time options</h1>
|
||||
<p>The code tries to contain compiler differences in as few places as possible. The header as_config.h was created for that purpose. There you will find some #defines that allow different compilers to work. You'll probably not have to change this file, but if you're using a compiler not previously used and you're getting compiler errors it might be worth it to take a look at this file.</p>
|
||||
<p>There are also a couple of other #defines used in the code to alter the compilation. When compiling the library you might want to define ANGELSCRIPT_EXPORT so that library functions are exported. If you include the library source code directly in your application project you shouldn't have to define this flag.</p>
|
||||
<p>If AS_DEPRECATED is defined then some backwards compatibility is maintained, this can help you do the upgrade to the latest version a little more smoothly. There is no guarantee that the backwards compatibility will be maintained though so try to remove use of deprecated functions as soon as possible.</p>
|
||||
<h1><a class="anchor" id="doc_compile_lib_2"></a>
|
||||
Linking with the library</h1>
|
||||
<p>There are four ways of compiling and linking with AngelScript in order to use it. I recommend linking with a static library. Note that all four ways are interchangable with only a small change in your code, i.e a defined flag before including the header file, and possibly a routine for manually loading the dll. The rest of your code should look exactly the same for each of the alternatives.</p>
|
||||
<h2><a class="anchor" id="doc_compile_lib_2_1"></a>
|
||||
1. Include library source files in project</h2>
|
||||
<p>You can take the source files for AngelScript and include them directly in your own project. The advantage of this is that you can be sure that the same compiler options are used for the library and the host applications, e.g. multi-threaded or single-threaded CRT. The disadvantage is that your project will be poluted with the library files.</p>
|
||||
<p>The files that need to use the library should include the angelscript.h header with no need for any special settings.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Include the library interface</span></div>
|
||||
<div class="line"><span class="preprocessor">#include "<a class="code" href="angelscript_8h.html">angelscript.h</a>"</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Start using the library</span></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_lib_2_2"></a>
|
||||
2. Compile a static library and link into project</h2>
|
||||
<p>The most recommended way is to compile a static library that your project will link with. When compiling the static library you have to make sure that the correct compiler settings are used so that you don't get conflicts in linkage with the CRT functions. This happens if you for example compile the library with dynamically linked multi-threaded CRT and your application with statically linked single-threaded CRT. (For Visual C++ you'll find these settings under Project -> Settings -> C/C++ -> Category: Code Generation)</p>
|
||||
<p>To use the library you only need to include the angelscript.h header file.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Include the library interface</span></div>
|
||||
<div class="line"><span class="preprocessor">#include "<a class="code" href="angelscript_8h.html">angelscript.h</a>"</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Start using the library</span></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_lib_2_3"></a>
|
||||
3. Compile a dynamically loaded library with an import library</h2>
|
||||
<p>With Microsoft Visual C++ it is possible to compile a dynamically loaded library with an import library. The import library will then take care of the work needed to load the dll and bind the functions. A possible disadvantage of this method is that you are not able to give any user-friendly error messages in case loading the library fails.</p>
|
||||
<p>To use the library you'll have to define ANGELSCRIPT_DLL_LIBRARY_IMPORT before including the angelscript.h header file.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Include the library interface</span></div>
|
||||
<div class="line"><span class="preprocessor">#define ANGELSCRIPT_DLL_LIBRARY_IMPORT</span></div>
|
||||
<div class="line"><span class="preprocessor">#include "<a class="code" href="angelscript_8h.html">angelscript.h</a>"</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Start using the library</span></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_lib_2_4"></a>
|
||||
4. Load the dynamically loaded library manually</h2>
|
||||
<p>If you want to use a dll, e.g. to share code between applications, I recommend loading the library manually as you can treat any failures to load or bind functions graciously.</p>
|
||||
<p>To use manually loaded dll, you should define ANGELSCRIPT_DLL_MANUAL_IMPORT before including the angelscript.h header file. This will insure that the header file doesn't declare the function prototypes, as you will most likely want to use these names for the function pointers.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Include the library interface</span></div>
|
||||
<div class="line"><span class="preprocessor">#define ANGELSCRIPT_DLL_MANUAL_IMPORT</span></div>
|
||||
<div class="line"><span class="preprocessor">#include "<a class="code" href="angelscript_8h.html">angelscript.h</a>"</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Declare the function pointers</span></div>
|
||||
<div class="line"><span class="keyword">typedef</span> <a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> * AS_CALL t_asCreateScriptEngine(<span class="keywordtype">int</span>);</div>
|
||||
<div class="line">t_asCreateScriptEngine *<a class="code" href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a> = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Declare the rest of the functions</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Load the dll and bind the functions (error handling left out for clarity)</span></div>
|
||||
<div class="line">HMODULE dll = LoadLibrary(<span class="stringliteral">"angelscript.dll"</span>);</div>
|
||||
<div class="line"><a class="code" href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a> = (t_asCreateScriptEngine*)GetProcAddress(dll, <span class="stringliteral">"_asCreateScriptEngine"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Bind the other functions</span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// ... Start using the library</span></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_compile_platforms"></a>
|
||||
Considerations for specific platforms</h1>
|
||||
<p>As mentioned before, for most platforms the compilation of the library is as easy as including all source files and compiling them. However, on some platforms specific actions needs to be performed to compile the library correctly.</p>
|
||||
<h2><a class="anchor" id="doc_compile_win64"></a>
|
||||
Windows 64bit</h2>
|
||||
<p>The MSVC compiler doesn't support inline assembler for the x86 64bit CPU family. To support this platform a separate assembler file has been created: as_callfunc_x64_msvc_asm.asm.</p>
|
||||
<p>To compile this file it is necessary to configure a custom build command with the following:</p>
|
||||
<div class="fragment"><div class="line">ml64.exe /c /nologo /Fo$(OutDir)\as_callfunc_x64_msvc_asm.obj /W3 /Zi /Ta $(InputDir)\$(InputFileName)</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_msvc_sdk"></a>
|
||||
Microsoft Visual C++</h2>
|
||||
<p>While AngelScript doesn't use Microsoft's language extensions you may still face trouble compiling the library if you disable the language extensions. This is because Microsoft's own SDK may have code that relies on the language extensions, e.g. in version 6.0a you might get compiler errors due to the existance of $ in the macro definitions in the specstrings.h header from the Platform SDK. This particular problem was fixed by Microsoft in version 6.1 of their SDK, but there may be others so it might just easier to leave the language extensions turned on.</p>
|
||||
<h2><a class="anchor" id="doc_compile_gnuc"></a>
|
||||
GNUC based compilers</h2>
|
||||
<p>In order to properly intergrate with C++ without the need for wrappers AngelScript uses a lot of pointer casts. Unfortunately it is not possible to always guarantee strict aliasing because of this, so on GNUC based compilers it is necessary to disable compiler optimizations that assume strict aliasing.</p>
|
||||
<p>Use the following compiler argument to disable this:</p>
|
||||
<div class="fragment"><div class="line">-fno-strict-aliasing</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_pocketpc"></a>
|
||||
Pocket PC with ARM CPU</h2>
|
||||
<p>The MSVC compiler doesn't support inline assembler for the ARM CPU, so a separate assembler file has been written with this code: as_callfunc_arm_msvc.asm.</p>
|
||||
<p>In order to compile this file properly it is necessary to configure a custom build command with the following:</p>
|
||||
<div class="fragment"><div class="line">armasm -g $(InputPath)</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="doc_compile_marmalade"></a>
|
||||
Marmalade</h2>
|
||||
<p>Marmalade is a cross platform SDK created with mobile devices in mind. It functions by abstracting the underlying OS with its own C runtime library even though it uses the common C++ compilers, e.g. MSVC on Windows, and GNUC on Linux and Mac.</p>
|
||||
<p>When compiling AngelScript with Marmalade for iOS and Android scons must be used in order to properly compile the native ARM assembler routines. For Windows Phone you should be able to use MSVC normally.</p>
|
||||
<h1><a class="anchor" id="doc_compile_size"></a>
|
||||
Size of the library</h1>
|
||||
<p>The size of the library depends on many different factors, such as compiler brand, compiler flags, and also what features of AngelScript that are included. However, to give an idea of how much space the library will take up on the disk and memory I've compiled the <a class="el" href="doc_samples_asrun.html">asrun sample</a> in a few different ways and noted down the size.</p>
|
||||
<table class="doxtable">
|
||||
<tr>
|
||||
<td><b>Options</b></td><td><b>Size of binary on disk</b> </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded dll / optimize for speed<br />
|
||||
Without including AngelScript</td><td>14KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded dll / optimize for speed<br />
|
||||
Using AngelScript and add-ons</td><td>796KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded dll / optimize for speed<br />
|
||||
AngelScript without compiler (AS_NO_COMPILER) and add-ons</td><td>453KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded static / optimize for speed<br />
|
||||
Using AngelScript but without add-ons</td><td>867KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded static / optimize for speed<br />
|
||||
Using AngelScript and add-ons</td><td>1015KB </td></tr>
|
||||
<tr>
|
||||
<td>64 bit / multithreaded static / optimize for speed<br />
|
||||
Using AngelScript and add-ons</td><td>1336KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded static / optimize for size<br />
|
||||
Using AngelScript and add-ons</td><td>797KB </td></tr>
|
||||
<tr>
|
||||
<td>32 bit / multithreaded dll / optimize for size<br />
|
||||
Using AngelScript and add-ons</td><td>582KB </td></tr>
|
||||
</table>
|
||||
<p>Based on this we can draw the conclusion that the engine and VM takes up about 300KB when optimized for speed, the compiler adds another 350KB, and the add-ons yet another 150KB.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>These tests were made with MSVC 2012 and version 2.30.2 of the library. </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="agroup__api__principal__functions_html_gacb6a62345d9cca6c9b5a3dac67d80d0b"><div class="ttname"><a href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a></div><div class="ttdeci">AS_API asIScriptEngine * asCreateScriptEngine(asDWORD version=ANGELSCRIPT_VERSION)</div><div class="ttdoc">Creates the script engine.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html"><div class="ttname"><a href="angelscript_8h.html">angelscript.h</a></div><div class="ttdoc">The API definition for AngelScript.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
187
docs/manual/doc_compile_script.html
Normal file
187
docs/manual/doc_compile_script.html
Normal file
@@ -0,0 +1,187 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: Compiling scripts</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_compile_script.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">Compiling scripts </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>After <a class="el" href="doc_register_api.html">registering the application interface</a> it's time to compile the scripts that will be executed.</p>
|
||||
<h1><a class="anchor" id="doc_compile_script_msg"></a>
|
||||
Message callback</h1>
|
||||
<p>Before starting the compilation, remember to have the message callback set in the engine so that you can get more information on compilation errors than just an error code. In fact, it is recommended to set the message callback right after creating the script engine, as the message callback may even be helpful while registering the application interface.</p>
|
||||
<p>The message callback has been designed so that it doesn't output anything if there are no errors or warnings, so when everything is ok, you shouldn't get anything from it. But if the <a class="el" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a> method returns an error, the message callback will have received detailed information about the error.</p>
|
||||
<p>If desired, the application may send its own messages to the callback via the <a class="el" href="classas_i_script_engine.html#a936ce6566af958bb75ba1c0945d8b03a">WriteMessage</a> method on the engine.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Implement a simple message callback function</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> MessageCallback(<span class="keyword">const</span> <a class="code" href="structas_s_message_info.html">asSMessageInfo</a> *msg, <span class="keywordtype">void</span> *param)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keyword">const</span> <span class="keywordtype">char</span> *type = <span class="stringliteral">"ERR "</span>;</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( msg-><a class="code" href="structas_s_message_info.html#a6aa9231534b8aea2a3099cdc3206bcc8">type</a> == <a class="code" href="angelscript_8h.html#a8badcd23652646db5c5c6981dc73d4f5a210c2023d6971d688a0302096acf945d">asMSGTYPE_WARNING</a> ) </div>
|
||||
<div class="line"> type = <span class="stringliteral">"WARN"</span>;</div>
|
||||
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span>( msg-><a class="code" href="structas_s_message_info.html#a6aa9231534b8aea2a3099cdc3206bcc8">type</a> == <a class="code" href="angelscript_8h.html#a8badcd23652646db5c5c6981dc73d4f5ae29dba474231c07149dca09a9258f80d">asMSGTYPE_INFORMATION</a> ) </div>
|
||||
<div class="line"> type = <span class="stringliteral">"INFO"</span>;</div>
|
||||
<div class="line"> printf(<span class="stringliteral">"%s (%d, %d) : %s : %s\n"</span>, msg-><a class="code" href="structas_s_message_info.html#aeca6368be12c84b62ed8c659b1e4615c">section</a>, msg-><a class="code" href="structas_s_message_info.html#a21ef80321436f229a547411a6598ea21">row</a>, msg-><a class="code" href="structas_s_message_info.html#a08b23a360ac52110323bbf4aad553d9d">col</a>, type, msg-><a class="code" href="structas_s_message_info.html#af76694c6342dd82ef6aca0dff42072f5">message</a>);</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Set the message callback when creating the engine</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_engine.html">asIScriptEngine</a> *engine = <a class="code" href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a>();</div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#a74192fe950808eb72a64e3e371f0ea02">SetMessageCallback</a>(<a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(MessageCallback), 0, <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>);</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="doc_compile_script_load"></a>
|
||||
Loading and compiling scripts</h1>
|
||||
<p>To build a script module you first obtain a module from the engine, then add the script sections, and finally compile them. A compiled script module may be composed of one or more script sections, so your application may store each section in different files, or even generate them dynamically. It doesn't matter in which order the script sections are added to the module, as the compiler is able to resolve all names regardless of where they are declared in the script.</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Create a new script module</span></div>
|
||||
<div class="line"><a class="code" href="classas_i_script_module.html">asIScriptModule</a> *mod = engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(<span class="stringliteral">"module"</span>, <a class="code" href="angelscript_8h.html#ae4cf50de5273eb8c03c6e91e6e014f0ca0843ab784ed9a9ea6cb47d915825186f">asGM_ALWAYS_CREATE</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Load and add the script sections to the module</span></div>
|
||||
<div class="line"><span class="keywordtype">string</span> script;</div>
|
||||
<div class="line">LoadScriptFile(<span class="stringliteral">"script.as"</span>, script);</div>
|
||||
<div class="line">mod-><a class="code" href="classas_i_script_module.html#a330835919b565c76c25e9425536f50b7">AddScriptSection</a>(<span class="stringliteral">"script.as"</span>, script.c_str());</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Build the module</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> r = mod-><a class="code" href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">Build</a>();</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r < 0 )</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// The build failed. The message stream will have received </span></div>
|
||||
<div class="line"> <span class="comment">// compiler errors that shows what needs to be fixed</span></div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>AngelScript doesn't provide built-in functions for loading script files as most applications have their own way of loading files. However, it is quite easy to write your own routines for loading script files, for example:</p>
|
||||
<div class="fragment"><div class="line"><span class="comment">// Load the entire script file into a string buffer</span></div>
|
||||
<div class="line"><span class="keywordtype">void</span> LoadScriptFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *fileName, <span class="keywordtype">string</span> &script)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Open the file in binary mode</span></div>
|
||||
<div class="line"> FILE *f = fopen(<span class="stringliteral">"test.as"</span>, <span class="stringliteral">"rb"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Determine the size of the file</span></div>
|
||||
<div class="line"> fseek(f, 0, SEEK_END);</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> len = ftell(f);</div>
|
||||
<div class="line"> fseek(f, 0, SEEK_SET);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> <span class="comment">// Load the entire file in one call</span></div>
|
||||
<div class="line"> script.resize(len);</div>
|
||||
<div class="line"> fread(&script[0], len, 1, f);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> fclose(f);</div>
|
||||
<div class="line">} </div>
|
||||
</div><!-- fragment --><p>As AngelScript doesn't load the files itself, it also doesn't have built-in support for including other files from within the script. However, if you look in the add-on directory, you'll find a <a class="el" href="doc_addon_build.html">CScriptBuilder</a> class that provides this support and more. It is a helper class for loading files, perform a pre-processing pass, and then building the module. You can a see an example of how to use the script builder in <a class="el" href="doc_hello_world.html">Your first script</a>.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_adv_precompile.html">Pre-compiled byte code</a> </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="astructas_s_message_info_html_a08b23a360ac52110323bbf4aad553d9d"><div class="ttname"><a href="structas_s_message_info.html#a08b23a360ac52110323bbf4aad553d9d">asSMessageInfo::col</a></div><div class="ttdeci">int col</div><div class="ttdoc">The column.</div><div class="ttdef"><b>Definition:</b> angelscript.h:773</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a8badcd23652646db5c5c6981dc73d4f5ae29dba474231c07149dca09a9258f80d"><div class="ttname"><a href="angelscript_8h.html#a8badcd23652646db5c5c6981dc73d4f5ae29dba474231c07149dca09a9258f80d">asMSGTYPE_INFORMATION</a></div><div class="ttdeci">@ asMSGTYPE_INFORMATION</div><div class="ttdoc">The message is informational only.</div><div class="ttdef"><b>Definition:</b> angelscript.h:424</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_ae4cf50de5273eb8c03c6e91e6e014f0ca0843ab784ed9a9ea6cb47d915825186f"><div class="ttname"><a href="angelscript_8h.html#ae4cf50de5273eb8c03c6e91e6e014f0ca0843ab784ed9a9ea6cb47d915825186f">asGM_ALWAYS_CREATE</a></div><div class="ttdeci">@ asGM_ALWAYS_CREATE</div><div class="ttdoc">Always create a new module, discarding the existing one.</div><div class="ttdef"><b>Definition:</b> angelscript.h:528</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html"><div class="ttname"><a href="classas_i_script_engine.html">asIScriptEngine</a></div><div class="ttdoc">The engine interface.</div><div class="ttdef"><b>Definition:</b> angelscript.h:1092</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a74192fe950808eb72a64e3e371f0ea02"><div class="ttname"><a href="classas_i_script_engine.html#a74192fe950808eb72a64e3e371f0ea02">asIScriptEngine::SetMessageCallback</a></div><div class="ttdeci">virtual int SetMessageCallback(const asSFuncPtr &callback, void *obj, asDWORD callConv)=0</div><div class="ttdoc">Sets a message callback that will receive compiler messages.</div></div>
|
||||
<div class="ttc" id="astructas_s_message_info_html_a21ef80321436f229a547411a6598ea21"><div class="ttname"><a href="structas_s_message_info.html#a21ef80321436f229a547411a6598ea21">asSMessageInfo::row</a></div><div class="ttdeci">int row</div><div class="ttdoc">The row number.</div><div class="ttdef"><b>Definition:</b> angelscript.h:771</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="agroup__api__principal__functions_html_gacb6a62345d9cca6c9b5a3dac67d80d0b"><div class="ttname"><a href="group__api__principal__functions.html#gacb6a62345d9cca6c9b5a3dac67d80d0b">asCreateScriptEngine</a></div><div class="ttdeci">AS_API asIScriptEngine * asCreateScriptEngine(asDWORD version=ANGELSCRIPT_VERSION)</div><div class="ttdoc">Creates the script engine.</div></div>
|
||||
<div class="ttc" id="astructas_s_message_info_html_aeca6368be12c84b62ed8c659b1e4615c"><div class="ttname"><a href="structas_s_message_info.html#aeca6368be12c84b62ed8c659b1e4615c">asSMessageInfo::section</a></div><div class="ttdeci">const char * section</div><div class="ttdoc">The script section where the message is raised.</div><div class="ttdef"><b>Definition:</b> angelscript.h:769</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a8badcd23652646db5c5c6981dc73d4f5a210c2023d6971d688a0302096acf945d"><div class="ttname"><a href="angelscript_8h.html#a8badcd23652646db5c5c6981dc73d4f5a210c2023d6971d688a0302096acf945d">asMSGTYPE_WARNING</a></div><div class="ttdeci">@ asMSGTYPE_WARNING</div><div class="ttdoc">The message is a warning.</div><div class="ttdef"><b>Definition:</b> angelscript.h:422</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html"><div class="ttname"><a href="classas_i_script_module.html">asIScriptModule</a></div><div class="ttdoc">The interface to the script modules.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2218</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a8acf107194c5f079d7f7507309ebe613"><div class="ttname"><a href="classas_i_script_module.html#a8acf107194c5f079d7f7507309ebe613">asIScriptModule::Build</a></div><div class="ttdeci">virtual int Build()=0</div><div class="ttdoc">Build the previously added script sections.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a330835919b565c76c25e9425536f50b7"><div class="ttname"><a href="classas_i_script_module.html#a330835919b565c76c25e9425536f50b7">asIScriptModule::AddScriptSection</a></div><div class="ttdeci">virtual int AddScriptSection(const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0</div><div class="ttdoc">Add a script section for the next build.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="astructas_s_message_info_html_af76694c6342dd82ef6aca0dff42072f5"><div class="ttname"><a href="structas_s_message_info.html#af76694c6342dd82ef6aca0dff42072f5">asSMessageInfo::message</a></div><div class="ttdeci">const char * message</div><div class="ttdoc">The message text.</div><div class="ttdef"><b>Definition:</b> angelscript.h:777</div></div>
|
||||
<div class="ttc" id="astructas_s_message_info_html_a6aa9231534b8aea2a3099cdc3206bcc8"><div class="ttname"><a href="structas_s_message_info.html#a6aa9231534b8aea2a3099cdc3206bcc8">asSMessageInfo::type</a></div><div class="ttdeci">asEMsgType type</div><div class="ttdoc">The type of message.</div><div class="ttdef"><b>Definition:</b> angelscript.h:775</div></div>
|
||||
<div class="ttc" id="astructas_s_message_info_html"><div class="ttname"><a href="structas_s_message_info.html">asSMessageInfo</a></div><div class="ttdoc">Represents a compiler message.</div><div class="ttdef"><b>Definition:</b> angelscript.h:767</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
165
docs/manual/doc_cpp_exceptions.html
Normal file
165
docs/manual/doc_cpp_exceptions.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.18"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AngelScript: C++ exceptions and longjmp</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function() { init_search(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr style="height: 56px;">
|
||||
<td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td>
|
||||
<td id="projectalign" style="padding-left: 0.5em;">
|
||||
<div id="projectname">AngelScript
|
||||
</div>
|
||||
</td>
|
||||
<td> <div id="MSearchBox" class="MSearchBoxInactive">
|
||||
<span class="left">
|
||||
<img id="MSearchSelect" src="search/mag_sel.png"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
alt=""/>
|
||||
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||||
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||||
onblur="searchBox.OnSearchFieldFocus(false)"
|
||||
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||||
</span><span class="right">
|
||||
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.18 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
||||
$(document).ready(function(){initNavTree('doc_cpp_exceptions.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="PageDoc"><div class="header">
|
||||
<div class="headertitle">
|
||||
<div class="title">C++ exceptions and longjmp </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="doc_cpp_exceptions_1"></a>
|
||||
Exceptions</h1>
|
||||
<p>Application functions and class methods registered with the script engine are allowed to throw C++ exceptions. The virtual machine will automatically catch any C++ exception, abort the script execution, and return control to the application.</p>
|
||||
<div class="fragment"><div class="line"><a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx = engine-><a class="code" href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">CreateContext</a>();</div>
|
||||
<div class="line">ctx-><a class="code" href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">Prepare</a>(engine-><a class="code" href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">GetModule</a>(<span class="stringliteral">"test"</span>)-><a class="code" href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">GetFunctionByName</a>(<span class="stringliteral">"func"</span>));</div>
|
||||
<div class="line"><span class="keywordtype">int</span> r = ctx-><a class="code" href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">Execute</a>();</div>
|
||||
<div class="line"><span class="keywordflow">if</span>( r == <a class="code" href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69aa3d548fa7d2278d848e50222b700c6c8">asEXECUTION_EXCEPTION</a> )</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">string</span> err = ctx-><a class="code" href="classas_i_script_context.html#a46e2411bc84e99f57e7d9fe2374bb479">GetExceptionString</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span>( err == <span class="stringliteral">"Caught an exception from the application"</span> )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// An application function threw an exception while being invoked from the script</span></div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p>By default the VM has no way of distinguishing between different types of exceptions and will just give a standard exception string for all of them. If desired a <a class="el" href="classas_i_script_engine.html#addce6a202934a4918f7776b2f77c43fd">callback can be registered</a> with the engine to provide a translation of the exception type to a more informative exception string.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> TranslateException(<a class="code" href="classas_i_script_context.html">asIScriptContext</a> *ctx, <span class="keywordtype">void</span>* <span class="comment">/*userParam*/</span>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">try</span> </div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Retrow the original exception so we can catch it again</span></div>
|
||||
<div class="line"> <span class="keywordflow">throw</span>;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">catch</span>( std::exception &e )</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Tell the VM the type of exception that occurred</span></div>
|
||||
<div class="line"> ctx-><a class="code" href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">SetException</a>(e.what());</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">catch</span>(...)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The callback must not allow any exception to be thrown, but it is not necessary </span></div>
|
||||
<div class="line"> <span class="comment">// to explicitly set an exception string if the default exception string is sufficient</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Register the callback with the engine</span></div>
|
||||
<div class="line">engine-><a class="code" href="classas_i_script_engine.html#addce6a202934a4918f7776b2f77c43fd">SetTranslateAppExceptionCallback</a>(<a class="code" href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a>(TranslateException), 0, <a class="code" href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a>);</div>
|
||||
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="doc_addon_helpers.html">GetExceptionInfo</a> helper function</dd></dl>
|
||||
<dl class="section note"><dt>Note</dt><dd>The ability to catch exceptions can be turned off by compiling the library with the AS_NO_EXCEPTIONS defined. If this is done, the application should not register any functions that may throw exceptions, as the end result will be undefined should an exception occur.</dd></dl>
|
||||
<h1><a class="anchor" id="doc_cpp_exceptions_2"></a>
|
||||
longjmp</h1>
|
||||
<p>Some applications uses longjmp to do error handling. When performing a longjmp to a previously saved state, there is no chance for the code to do a cleanup of all that happened after the saved state. Because of that the application must not register functions that can perform a longjmp out from the function, as that can leave the virtual machine in an undefined state. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
</div><!-- doc-content -->
|
||||
<div class="ttc" id="aclassas_i_script_context_html"><div class="ttname"><a href="classas_i_script_context.html">asIScriptContext</a></div><div class="ttdoc">The interface to the virtual machine.</div><div class="ttdef"><b>Definition:</b> angelscript.h:2717</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a9f7cdc52b59034e6e55eb8a56b427aa4"><div class="ttname"><a href="classas_i_script_engine.html#a9f7cdc52b59034e6e55eb8a56b427aa4">asIScriptEngine::GetModule</a></div><div class="ttdeci">virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0</div><div class="ttdoc">Return an interface pointer to the module.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a8e52894432737acac2e1a422e496bf84"><div class="ttname"><a href="classas_i_script_context.html#a8e52894432737acac2e1a422e496bf84">asIScriptContext::Execute</a></div><div class="ttdeci">virtual int Execute()=0</div><div class="ttdoc">Executes the prepared function.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a867f14b4137dd4602fda1e616b217a69aa3d548fa7d2278d848e50222b700c6c8"><div class="ttname"><a href="angelscript_8h.html#a867f14b4137dd4602fda1e616b217a69aa3d548fa7d2278d848e50222b700c6c8">asEXECUTION_EXCEPTION</a></div><div class="ttdeci">@ asEXECUTION_EXCEPTION</div><div class="ttdoc">The execution was terminated by an unhandled script exception.</div><div class="ttdef"><b>Definition:</b> angelscript.h:404</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a46e2411bc84e99f57e7d9fe2374bb479"><div class="ttname"><a href="classas_i_script_context.html#a46e2411bc84e99f57e7d9fe2374bb479">asIScriptContext::GetExceptionString</a></div><div class="ttdeci">virtual const char * GetExceptionString()=0</div><div class="ttdoc">Returns the exception string text.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_module_html_a81d727c9677b683942b6087df4ce95ad"><div class="ttname"><a href="classas_i_script_module.html#a81d727c9677b683942b6087df4ce95ad">asIScriptModule::GetFunctionByName</a></div><div class="ttdeci">virtual asIScriptFunction * GetFunctionByName(const char *name) const =0</div><div class="ttdoc">Returns the function by its name.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a78f8f2c7f1c88b12e74a5ac47b4184ae"><div class="ttname"><a href="angelscript_8h.html#a78f8f2c7f1c88b12e74a5ac47b4184ae">asFUNCTION</a></div><div class="ttdeci">#define asFUNCTION(f)</div><div class="ttdoc">Returns an asSFuncPtr representing the function specified by the name.</div><div class="ttdef"><b>Definition:</b> angelscript.h:675</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_a2630e1cd03ffab0fee9b820bf0afe42a"><div class="ttname"><a href="classas_i_script_engine.html#a2630e1cd03ffab0fee9b820bf0afe42a">asIScriptEngine::CreateContext</a></div><div class="ttdeci">virtual asIScriptContext * CreateContext()=0</div><div class="ttdoc">Creates a new script context.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_engine_html_addce6a202934a4918f7776b2f77c43fd"><div class="ttname"><a href="classas_i_script_engine.html#addce6a202934a4918f7776b2f77c43fd">asIScriptEngine::SetTranslateAppExceptionCallback</a></div><div class="ttdeci">virtual int SetTranslateAppExceptionCallback(asSFuncPtr callback, void *param, int callConv)=0</div><div class="ttdoc">Register the exception translation callback.</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a6f0f071215e0f7effc0b765043f01275"><div class="ttname"><a href="classas_i_script_context.html#a6f0f071215e0f7effc0b765043f01275">asIScriptContext::SetException</a></div><div class="ttdeci">virtual int SetException(const char *info, bool allowCatch=true)=0</div><div class="ttdoc">Sets an exception, which aborts the execution.</div></div>
|
||||
<div class="ttc" id="aangelscript_8h_html_a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4"><div class="ttname"><a href="angelscript_8h.html#a3ec92ea3c4762e44c2df788ceccdd1e4a68ae43cc91cdfc3fa4590c9e6164e4f4">asCALL_CDECL</a></div><div class="ttdeci">@ asCALL_CDECL</div><div class="ttdoc">A cdecl function.</div><div class="ttdef"><b>Definition:</b> angelscript.h:226</div></div>
|
||||
<div class="ttc" id="aclassas_i_script_context_html_a43976f42dfc6c1af23e132d36265173a"><div class="ttname"><a href="classas_i_script_context.html#a43976f42dfc6c1af23e132d36265173a">asIScriptContext::Prepare</a></div><div class="ttdeci">virtual int Prepare(asIScriptFunction *func)=0</div><div class="ttdoc">Prepares the context for execution of the function.</div></div>
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated on Sat Dec 5 2020 23:20:24 for AngelScript by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.18 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user