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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

file

Note

file is only available in the scripts if the application registers support for it.

Script example:

  file f;
  // Open the file in 'read' mode
  if( f.open("file.txt", "r") >= 0 )
  {
      // Read the whole file into the string buffer
      string str = f.readString(f.getSize());
      f.close();
  }

Supporting file object

Methods

int open(const string &in filename, const string &in mode)

Opens a file. The mode can be "r" for reading, "w" for writing, or "a" for appending.

If the file couldn't be opened, a negative value is returned.

int close()

Closes the file.

If no file is open, a negative value is returned.

int getSize() const

Returns the size of the file, or a negative value if no file is open.

bool isEndOfFile() const

Returns true if the current position is at the end of the file.

string readString(uint length)

Reads length bytes into a string and returns it.

string readLine()

Reads until a new line character, e.g. '\n', or end-of-file and returns the string. The new line character is also returned in the string.

int64 readInt(uint bytes)

Reads bytes as a signed integer number.

uint64 readUInt(uint bytes)

Reads bytes as an unsigned integer number.

float readFloat()

Reads 4 bytes as a float number.

double readDouble()

Reads 8 bytes as a double number.

int writeString(const string &in str)

Writes the bytes of the string into the file.

Returns the number of bytes written, or a negative value on error.

int writeInt(int64 value, uint bytes)

Writes bytes as a signed integer value.

Returns the number of bytes written, or a negative value on error.

int writeUInt(uint64 value, uint bytes)

Writes bytes as an unsigned integer value.

Returns the number of bytes written, or a negative value on error.

int writeFloat(float value)

Writes 4 bytes as a float value.

Returns the number of bytes written, or a negative value on error.

int writeDouble(double value)

Writes 8 bytes as a double value.

Returns the number of bytes written, or a negative value on error.

int getPos() const

Returns the current position in the file, or a negative value on error.

int setPos(int pos)

Sets the current position in the file. Returns the previous position or a negative value on error.

int movePos(int delta)

Moves the position delta bytes relative to the current position. Returns the previous position or a negative value on error.

Properties

bool mostSignificantByteFirst

This property should be set to true if the most significant bit should be read or written first in the methods that reads/writes numbers.

It is set to false by default, which is the standard on most platforms.

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

filesystem

Note

filesystem is only available in the scripts if the application registers support for it.

Supporting filesystem object

Methods

bool changeCurrentPath(const string &in path)

This changes the current directory used by the filesystem object. It will return true if the given path is valid.

It doesn't change the application' working directory.

string getCurrentPath() const

Returns the current path used by the filesystem object.

array<string> @getDirs()

Returns a list with the names of all directories in the current path.

array<string> @getFiles()

Returns a list with the names of all files in the current path.

bool isDir(const string &in path)

Returns true if the given path is a directory.

bool isLink(const string &in path)

Returns true if the given path is a link.

int64 getSize(const string &in) const

Returns the size of a file.

Returns -1 if the file doesn't exist or cannot be accessed.

int makeDir(const string &in)

Creates a new directory. Returns 0 on success.

int removeDir(const string &in)

Removes a directory. Will only remove the directory if it is empty. Returns 0 on success.

int deleteFile(const string &in)

Deletes a file. Returns 0 on success.

int copyFile(const string &in, const string &in)

Copies a file. Returns 0 on success.

int move(const string &in, const string &in)

Moves or renames a file or directory. Returns 0 on success.

datetime getCreateDateTime(const string &in)

Returns the date and time of the file creation in UTC.

Raises an exception if the file doesn't exist or cannot be accessed.

datetime getModifyDateTime(const string &in)

Returns the date and time of the last modification of the file in UTC.

Raises an exception if the file doesn't exist or cannot be accessed.

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

repo_name: Antidote/openrpgeditor

license: mit


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

string

Note

Strings are only available in the scripts if the application registers the support for them. The syntax for using strings may differ for the application you're working with so consult the application's manual for more details.

See also

Strings for information on syntax for string literals

Supporting string object and functions

The string object supports a number of operators, and has several class methods and supporting global functions to facilitate the manipulation of strings.

Operators

= assignment

The assignment operator copies the content of the right hand string into the left hand string.

Assignment of primitive types is allowed, which will do a default transformation of the primitive to a string.

+, += concatenation

The concatenation operator appends the content of the right hand string to the end of the left hand string.

Concatenation of primitives types is allowed, which will do a default transformation of the primitive to a string.

==, != equality

Compares the content of the two strings.

<, >, <=, >= comparison

Compares the content of the two strings. The comparison is done on the byte values in the strings, which may not correspond to alphabetical comparisons for some languages.

[] index operator

The index operator gives access to a single byte in the string.

Methods

uint length() const

Returns the length of the string.

void resize(uint)

Sets the length of the string.

bool isEmpty() const

Returns true if the string is empty, i.e. the length is zero.

string substr(uint start = 0, int count = -1) const

Returns a string with the content starting at start and the number of bytes given by count. The default arguments will return the whole string as the new string.

void insert(uint pos, const string &in other)

Inserts another string other at position pos in the original string.

void erase(uint pos, int count = -1)

Erases a range of characters from the string, starting at position pos and counting count characters.

int findFirst(const string &in str, uint start = 0) const

Find the first occurrence of the value str in the string, starting at start. If no occurrence is found a negative value will be returned.

int findLast(const string &in str, int start = -1) const

Find the last occurrence of the value str in the string. If start is informed the search will begin at that position, i.e. any potential occurrence after that position will not be searched. If no occurrence is found a negative value will be returned.

int findFirstOf(const string &in chars, int start = 0) const

 int findFirstNotOf(const string &in chars, int start = 0) const

 int findLastOf(const string &in chars, int start = -1) const

 int findLastNotOf(const string &in chars, int start = -1) const

The first variant finds the first character in the string that matches on of the characters in chars, starting at start. If no occurrence is found a negative value will be returned.

The second variant finds the first character that doesn't match any of those in chars. The third and last variant are the same except they start the search from the end of the string.

Note

These functions work on the individual bytes in the strings. They do not attempt to understand encoded characters, e.g. UTF-8 encoded characters that can take up to 4 bytes.

array<string>@ split(const string &in delimiter) const

Splits the string in smaller strings where the delimiter is found.

Functions

string join(const array<string> &in arr, const string &in delimiter)

Concatenates the strings in the array into a large string, separated by the delimiter.

int64 parseInt(const string &in str, uint base = 10, uint &out byteCount = 0)

 uint64 parseUInt(const string &in str, uint base = 10, uint &out byteCount = 0)

Parses the string for an integer value. The base can be 10 or 16 to support decimal numbers or hexadecimal numbers. If byteCount is provided it will be set to the number of bytes that were considered as part of the integer value.

double parseFloat(const string &in, uint &out byteCount = 0)

Parses the string for a floating point value. If byteCount is provided it will be set to the number of bytes that were considered as part of the value.

string formatInt(int64 val, const string &in options = '', uint width = 0)

 string formatUInt(uint64 val, const string &in options = '', uint width = 0)

 string formatFloat(double val, const string &in options = '', uint width = 0, uint precision = 0)

The format functions takes a string that defines how the number should be formatted. The string is a combination of the following characters:

l = left justify

0 = pad with zeroes

+ = always include the sign, even if positive

space = add a space in case of positive number

h = hexadecimal integer small letters (not valid for formatFloat)

H = hexadecimal integer capital letters (not valid for formatFloat)

e = exponent character with small e (only valid for formatFloat)

E = exponent character with capital E (only valid for formatFloat)

Examples:

  // Left justify number in string with 10 characters
  string justified = formatInt(number, 'l', 10);

  // Create hexadecimal representation with capital letters, right justified
  string hex = formatInt(number, 'H', 10);

  // Right justified, padded with zeroes and two digits after decimal separator
  string num = formatFloat(number, '0', 8, 2);

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

System functions

Note

The system functions are only available in the scripts if the application registers support for it.

Functions

void print(const string &in line)

Prints a line to the standard output.

string getInput()

Gets a line from the standard input.

array<string> @getCommandLineArgs()

Gets the command line arguments as an array.

int exec(const string &in cmd)

 int exec(const string &in cmd, string &out output)

Executes a system command.

Returns -1 on error or raises an exception. On success returns the exit code from the system commmand.

The second alternative allows to capture the stdout into a string, to be further processed.

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Serialization

To serialize scripts the application needs to be able to iterate through all variables, and objects that have any relation to the script and store their content in a way that would allow it to be restored at a later time. For simple values this is trivial, but for objects and handles it becomes more complex as it is necessary to keep track of references between objects and internal structure of both classes defined by scripts and application registered types.

Iterating through the variables and members of objects is already described in the article about reflection, so this article will focus on the storing and restoring of values.

Look at the source code for the Serializer add-on for a sample implementation of serialization.

See also

Hot reloading scripts

Serialization of modules

To serialize the script modules you'll need to enumerate all the global variables and serialize each of them.

When deserializing the module, first compile it normally either from source script or by loading a pre-compiled byte code, except you first need to turn off initialization of global variables by turning off the engine property asEP_INIT_GLOBAL_VARS_AFTER_BUILD.

Serialization of global variables

To serialize a global variable you'll need the name and namespace to use as the key for the variable, and then the type id and address of the variable. You get these with the methods asIScriptModule::GetGlobalVar and asIScriptModule::GetAddressOfGlobalVar. If the type id is for a primitive type, then the value can be stored as is. If it is a handle or reference you'll need to serialize the reference itself and the object it refers to. If the type id is an object type then serialize the object and its content.

To deserialize the global variable, you'll use the name and namespace to look it up, and then use GetAddressOfGlobalVar to get the address of the memory that needs to be restored with the serialized content.

Serialization of objects

To serialize script objects you'll use the asIScriptObject interface to iterate over the members to store the content. Remember that objects can hold references to other objects and even to itself so it is important to keep track of object instances already serialized and just store a reference if the same object comes up again.

When deserializing the script objects you should first allocate the memory using asIScriptEngine::CreateUninitializedScriptObject so that the constructor is not executed, and then iterate over the members to restore their content.

For application registered types you obviously need to provide your own implementation as the script engine doesn't know the full content of the types and thus cannot provide an interface for serialization.

Serialization of contexts

Serialization of a script context involves storing the full call stack with all the function calls, local variables, registers, etc. To do this you'll use the asIScriptContext interface.

Use GetCallstackSize to get the size of the call stack

For each call stack entry do:

Use GetCallStateRegisters to store the registers, i.e. program pointer, stack pointer, etc.

Use GetVarCount, GetVar, and GetAddressOfVar to store all local variables, including unnamed temporary variables

Use GetArgsOnStackCount and GetArgOnStack to store values pushed on the stack for a subsequent function call

Use GetStateRegisters to store additional context registers

To deserialize a context follow these steps:

Call StartDeserialization to tell the context that a deserialization will be done

For each call stack entry previously stored do:

Call PushFunction to reserve space for a call stack entry

Call SetCallStateRegisters to restore the registers

Use GetVar and GetAddressOfVar to restore all local variables

Use GetArgOnStack to restore values pushed on the stack

Call SetStateRegisters to restore additional context registers

Call FinishDeserialization to conclude the serialization and allow the execution to resume

Todo:

Add information on known restrictions, e.g. serialized contexts can only be restored on same cpu architecture, etc

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Getting started

Overview

Compile the library

Your first script

Good practices

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


code:
var doc_start =
[
    [ "Overview", "doc_overview.html", null ],
    [ "Compile the library", "doc_compile_lib.html", [
      [ "Set compile time options", "doc_compile_lib.html#doc_compile_lib_1", null ],
      [ "Linking with the library", "doc_compile_lib.html#doc_compile_lib_2", [
        [ "1. Include library source files in project", "doc_compile_lib.html#doc_compile_lib_2_1", null ],
        [ "2. Compile a static library and link into project", "doc_compile_lib.html#doc_compile_lib_2_2", null ],
        [ "3. Compile a dynamically loaded library with an import library", "doc_compile_lib.html#doc_compile_lib_2_3", null ],
        [ "4. Load the dynamically loaded library manually", "doc_compile_lib.html#doc_compile_lib_2_4", null ]
      ] ],
      [ "Considerations for specific platforms", "doc_compile_lib.html#doc_compile_platforms", [
        [ "Windows 64bit", "doc_compile_lib.html#doc_compile_win64", null ],
        [ "Microsoft Visual C++", "doc_compile_lib.html#doc_compile_msvc_sdk", null ],
        [ "GNUC based compilers", "doc_compile_lib.html#doc_compile_gnuc", null ],
        [ "Pocket PC with ARM CPU", "doc_compile_lib.html#doc_compile_pocketpc", null ],
        [ "Marmalade", "doc_compile_lib.html#doc_compile_marmalade", null ]
      ] ],
      [ "Size of the library", "doc_compile_lib.html#doc_compile_size", null ]
    ] ],
    [ "Your first script", "doc_hello_world.html", [
      [ "Helper functions", "doc_hello_world.html#doc_hello_world_1", null ]
    ] ],
    [ "Good practices", "doc_good_practice.html", [
      [ "Always check return values for registrations", "doc_good_practice.html#doc_checkretval", null ],
      [ "Use the message callback to receive detailed error messages", "doc_good_practice.html#doc_usemsgcallbck", null ],
      [ "Always verify return value after executing script function", "doc_good_practice.html#doc_checkexceptions", null ]
    ] ]
];


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Custom string type

Almost all applications have some need to manipulate text strings in one way or another. However most applications have very different needs, and also different ways of representing their string types. For that reason, AngelScript doesn't come with its own built-in string type that the application would be forced to adapt to, instead AngelScript allows the application to register its own string type.

This article presents the options for customizing the script language to the application's needs with regards to strings. If you do not want, or do not need to have AngelScript use your own string type, then I suggest you use the standard add-on for std::string registration.

Registering the custom string type

To make the script language support strings, the string type must first be registered as type with the engine. The application is free to use any valid type name, not necessarily 'string', though it is probably the most commonly used name. The custom string type can also be either value type or a reference type at the preference of the application developer.

Once the string type is registered, the application must also provide a string factory to allow the scripts to use literal string constants. The string factory must implement the asIStringFactory interface, and be registered with the asIScriptEngine::RegisterStringFactory method.

The string factory must implement all 3 methods of the asIStringFactory interface. The GetStringConstant method receives the raw string data by the compiler and should return a pointer to the custom string object that represents that string. The ReleaseStringConstant is called when the engine no longer needs the string constant, e.g. when discarding a module. The GetRawStringData is called by the engine when the raw string data is needed, e.g. when saving bytecode or when requesting a copy of a string constant.

Although not necessary, the application should preferably implement caching of the string constants, so that if two calls to GetStringConstant with the same raw string data is received the string factory returns the address of the same string instance in both calls. This will reduce the amount of memory needed to store the string constants, especially when scripts use the same string constants in many places. Remember, when using caching, the ReleaseStringConstant must only free the string object when the last call for that same object is done.

See also

The standard string add-on

Unicode vs ASCII

Is your application using Unicode or plain ASCII for the text? If you use Unicode, then you'll want to encode the scripts in UTF-8, which the AngelScript compiler supports natively. By default AngelScript expects the scripts to have been encoded in UTF-8, but should you prefer ASCII you can turn this off by setting the engine property asEP_SCRIPT_SCANNER to 0 right after creating the engine.

// Set engine to use ASCII scanner for script code

engine->SetEngineProperty(asEP_SCRIPT_SCANNER, 0);

asEP_SCRIPT_SCANNER

@ asEP_SCRIPT_SCANNER

Select scanning method: 0 - ASCII, 1 - UTF8. Default: 1 (UTF8).

Definition: angelscript.h:176

If you do use Unicode, then you'll also want to choose the desired encoding for the string literals, either UTF-8 or UTF-16. By default the string literals in AngelScript are encoded with UTF-8, but if your application is better prepared for UTF-16 then you'll want to change this by setting the engine property asEP_STRING_ENCODING to 1 before compiling your scripts.

// Set engine to use UTF-16 encoding for string literals

engine->SetEngineProperty(asEP_STRING_ENCODING, 1);

asEP_STRING_ENCODING

@ asEP_STRING_ENCODING

Select string encoding for literals: 0 - UTF8/ASCII, 1 - UTF16. Default: 0 (UTF8)

Definition: angelscript.h:180

Observe that the string factory called by the engine to create new strings gives the size of the string data in bytes even for UTF-16 encoded strings, so you'll need to divide the size by two to get the number of characters in the string.

Multiline string literals

There is also a couple of options that affect the script language itself a bit. If you like the convenience of allowing string literals to span multiple lines of code, then you can turn this on by setting the engine property asEP_ALLOW_MULTILINE_STRINGS to true. Without this the compiler will give an error if it encounters a line break before the end of the string.

// Set engine to allow string literals with line breaks

engine->SetEngineProperty(asEP_ALLOW_MULTILINE_STRINGS, true);

asEP_ALLOW_MULTILINE_STRINGS

@ asEP_ALLOW_MULTILINE_STRINGS

Allow linebreaks in string constants. Default: false.

Definition: angelscript.h:166

Observe that the line ending encoding of the source file will not be modified by the script compiler, so depending on how the file has been saved, you may get strings using different line endings.

The heredoc strings are not affected by this setting, as they are designed to support multiline text sections.

Character literals

By default AngelScript doesn't have character literals as C and C++ does. A string literal can be written with double quotes or single quotes and still have the same meaning. This makes it convenient to embed scripts in XML files or C/C++ source files where double quotes would otherwise end the script code.

If you want to have single quoted literals mean a single character literal instead of a string, then you can do so by setting the engine property asEP_USE_CHARACTER_LITERALS to true. The compiler will then convert single quoted literals to an integer number representing the first character.

// Set engine to use character literals

engine->SetEngineProperty(asEP_USE_CHARACTER_LITERALS, true);

asEP_USE_CHARACTER_LITERALS

@ asEP_USE_CHARACTER_LITERALS

Interpret single quoted strings as character literals. Default: false.

Definition: angelscript.h:164

Observe that the asEP_SCRIPT_SCANNER property has great importance in this case, as an ASCII character can only represent values between 0 and 255, whereas a Unicode character can represent values between 0 and 1,114,111.

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Understanding AngelScript

In order to successfully use AngelScript it is important to understand some differences between AngelScript and C++. While the library has been written so that it can be embedded within the application with as little change to the application functions and classes as possible, there are some care that must be taken when passing objects between AngelScript and C++.

Versions

Script modules

Datatypes in AngelScript and C++

Object handles to the application

Memory management

Todo:

Add article on the calling conventions used by AngelScript

Todo:

Add article on sandboxing

Todo:

Add article explaining the type id

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


code:
var doc_understanding_as =
[
    [ "Versions", "doc_versions.html", [
      [ "History", "doc_versions.html#doc_versions_milestones", [
        [ "2003 - Birth and first public release", "doc_versions.html#doc_versions_2003", null ],
        [ "2005 - Version 2, sand box, object handles, script classes, and garbage collection", "doc_versions.html#doc_versions_2005", null ],
        [ "2006 - Script interface", "doc_versions.html#doc_versions_2006", null ],
        [ "2009 - Inheritance, template types, operator overloads, and JIT compilation", "doc_versions.html#doc_versions_2009", null ],
        [ "2010 - Function pointers", "doc_versions.html#doc_versions_2010", null ],
        [ "2011 - Automatic garbage collection and debugging", "doc_versions.html#doc_versions_2011", null ],
        [ "2012 - Namespaces and mixins", "doc_versions.html#doc_versions_2012", null ],
        [ "2013 - Improved template types, delegates, weak references, and initialization lists", "doc_versions.html#doc_versions_2013", null ],
        [ "2014 - Named arguments and auto", "doc_versions.html#doc_versions_2014", null ],
        [ "2015 - Anonymous functions", "doc_versions.html#doc_versions_2015", null ],
        [ "2016 - Child funcdefs", "doc_versions.html#doc_versions_2016", null ],
        [ "2017 - external keyword and anonymous initialization lists", "doc_versions.html#doc_versions_2017", null ],
        [ "2018 - Try-catch statements and explicit constructors", "doc_versions.html#doc_versions_2018", null ],
        [ "2019 - Explicit property keyword", "doc_versions.html#doc_versions_2019", null ],
        [ "2022 - Serialization of the context stack", "doc_versions.html#doc_versions_2022", null ]
      ] ]
    ] ],
    [ "Script modules", "doc_module.html", [
      [ "Single module versus multiple modules", "doc_module.html#doc_module_single_vs_multi", null ],
      [ "Exchanging information between modules", "doc_module.html#doc_module_exchange", null ]
    ] ],
    [ "Datatypes in AngelScript and C++", "doc_as_vs_cpp_types.html", [
      [ "Primitives", "doc_as_vs_cpp_types.html#doc_as_vs_cpp_types_1", null ],
      [ "Strings", "doc_as_vs_cpp_types.html#doc_as_vs_cpp_types_5", null ],
      [ "Arrays", "doc_as_vs_cpp_types.html#doc_as_vs_cpp_types_2", null ],
      [ "Object handles", "doc_as_vs_cpp_types.html#doc_as_vs_cpp_types_3", null ],
      [ "Script classes and interfaces", "doc_as_vs_cpp_types.html#doc_as_vc_cpp_types_5", null ],
      [ "Function pointers", "doc_as_vs_cpp_types.html#doc_as_vc_cpp_types_6", null ],
      [ "Parameter references", "doc_as_vs_cpp_types.html#doc_as_vs_cpp_types_4", null ]
    ] ],
    [ "Object handles to the application", "doc_obj_handle.html", [
      [ "Managing the reference counter in functions", "doc_obj_handle.html#doc_obj_handle_3", null ],
      [ "Auto handles can make it easier", "doc_obj_handle.html#doc_obj_handle_4", null ]
    ] ],
    [ "Memory management", "doc_memory.html", [
      [ "Overview of the memory management", "doc_memory.html#doc_memory_1", null ],
      [ "Reference counting algorithm", "doc_memory.html#doc_memory_2", null ],
      [ "Garbage collector algorithm", "doc_memory.html#doc_memory_3", null ],
      [ "Memory heap", "doc_memory.html#doc_memory_4", null ]
    ] ]
];


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Using script classes

When there are multiple objects controlled by the same script implementation it may be favourable to use script classes, rather than global script functions. Using script classes each instance can have it's own set of variables within the class, contrary to the global functions that needs to rely on global variables to store persistent information.

Of course, it would be possible to duplicate the script modules, so that there is one module for each object instance, but that would be impose a rather big overhead for the application. Script classes don't have that overhead, as all instances share the same module, and thus the same bytecode and function ids, etc.

Instantiating the script class

Before instantiating the script class you need to know which class to instantiate. Exactly how this is done depends on the application, but here are some suggestions.

If the application knows the name of the class, either hardcoded or from some configuration, the class type can easily be obtained by calling the module's GetTypeIdByDecl with the name of the class. The application can also choose to identify the class through some properties of the class, e.g. if the class implements a predefined interface. Then the application can enumerate the class types implemented in the script with GetObjectTypeByIndex and then examine the type through the asITypeInfo interface.

A third option, if you're using the script builder add-on, is to use the metadata to identify the class. If you choose this option, use the asIScriptModule to enumerate the declared types and then query the CScriptBuilder for their metadata.

Once the object type is known you create the instance by calling the class' factory function, passing it the necessary arguments, e.g. a pointer to the application object which the script class should be bound to. The factory function id is found by querying the asITypeInfo.

// Get the object type

asIScriptModule *module = engine->GetModule("MyModule");

asITypeInfo *type = module->GetTypeInfoByDecl("MyClass");

// Get the factory function from the object type

asIScriptFunction *factory = type->GetFactoryByDecl("MyClass @MyClass()");

// Prepare the context to call the factory function

ctx->Prepare(factory);

// Execute the call

ctx->Execute();

// Get the object that was created

asIScriptObject *obj = *(asIScriptObject**)ctx->GetAddressOfReturnValue();

// If you're going to store the object you must increase the reference,

// otherwise it will be destroyed when the context is reused or destroyed.

obj->AddRef();

asIScriptFunction

The interface for a script function description.

Definition: angelscript.h:4000

asIScriptModule

The interface to the script modules.

Definition: angelscript.h:2232

asIScriptModule::GetTypeInfoByDecl

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

Returns a type by declaration.

asIScriptObject

The interface for an instance of a script object.

Definition: angelscript.h:3590

asIScriptObject::AddRef

virtual int AddRef() const =0

Increase reference counter.

asITypeInfo

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

Definition: angelscript.h:3704

asITypeInfo::GetFactoryByDecl

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

Returns the factory function by the declaration.

The factory function is called as a regular global function and returns a handle to the newly instanciated class.

Calling a method on the script class

Calling the methods of the script classes are similar to calling global functions except that you obtain the function id from the asITypeInfo, and you must set the object pointer along with the rest of the function arguments.

// Obtain the function object that represents the class method

asIScriptFunction *func = type->GetMethodByDecl("void method()");

// Prepare the context for calling the method

ctx->Prepare(func);

// Set the object pointer

ctx->SetObject(obj);

// Execute the call

ctx->Execute();

asITypeInfo::GetMethodByDecl

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

Returns the method by declaration.

Receiving script classes

In order for the application to register a function that receives a script class it must first know the type. Of course, since the class is declared in the script it isn't possible to know the type before the script is compiled. Instead the application can register an interface with the engine. The function can then be registered to receive a handle to that interface.

// Register an interface

engine->RegisterInterface("IMyObj");

// You can also register methods with the interface if you wish to force the script class to implement them

engine->RegisterInterfaceMethod("IMyObj", "void RequiredMethod()");

// Register a function that receives a handle to the interface

engine->RegisterGlobalFunction("void ReceiveMyObj(IMyObj @obj)", asFUNCTION(ReceiveMyObj), asCALL_CDECL);

asCALL_CDECL

@ asCALL_CDECL

A cdecl function.

Definition: angelscript.h:230

asFUNCTION

#define asFUNCTION(f)

Returns an asSFuncPtr representing the function specified by the name.

Definition: angelscript.h:685

The function that receives the interface should be implemented to take a pointer to an asIScriptObject.

asIScriptObject *gObj = 0;

void ReceiveMyObj(asIScriptObject *obj)

{

  // Do something with the object

  if( obj )

  {

    if( doStore )

    {

      // If the object is stored, we shouldn't release the handle

      gObj = obj;

    }

    else

    {

      // If the object is not stored, we must release the handle before returning

      obj->Release();

    }

  }

}

asIScriptObject::Release

virtual int Release() const =0

Decrease reference counter.

If you don't want to use interfaces like this, then you may want to look into the variable argument type or the generic script handle add-on, which are ways that can be used to receive values and objects of which the type is not known beforehand.

Returning script classes

Returning a script class from a registered function involves much of the same as receiving them. In order to register the function either an interface needs to be used, or the generic script handle add-on can be used.

// The global variable is initialized elsewhere

asIScriptObject *gObj;

asIScriptObject *ReturnMyObj()

{

  if( gObj == 0 )

    return 0;

  // Increase the refcount to account for the returned handle

  gObj->AddRef();

  return gObj;

}

This function can be registered as following:

// Register an interface

engine->RegisterInterface("IMyObj");

// Register a function that returns a handle to the interface

engine->RegisterGlobalFunction("IMyObj @ReturnMyObj()", asFUNCTION(ReturnMyObj), asCALL_CDECL);

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


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

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

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

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

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

AngelScript

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

Loading...

Searching...

No Matches

Versions

The library's version number is composed of 3 numbers, and sometimes an additional letter. Examples:

1.10.1d

2.8.0a

2.30.2

The first number is the major version. This is updated whenever there is a major redesign, or a major milestone happens. When this number is changed backwards compatibility is not necessarily maintained by the library.

The second number is the application interface version. This is updated whenever there is a change in the interface, e.g. a new method is added or an existing method has its signature modified. Usually the change is incremental so that there is no need to modify the application code unless the new functions are wanted, but a recompilation is still necessary. Sometimes parts of the interface are deprecated, but whenever possible the deprecated parts can be turned back on through a compile time flag.

The third number is the minor version. This is updated when the back-end logic in the library is modified, e.g. adding or modifying a script language feature, but no interface change is done. No change in the application code should be required during an upgrade when only the minor version has changed.

The additional letter is used when the change is purely bug fixes. In this case the binary application interface should be untouched, so an application that loads the library as a shared object (dll) should be able to upgrade the library without recompiling the application.

History

The following is a bit of history for the library that shows how it has evolved since the beginning to the current date. The complete change list can be found on the AngelScript site and in the SDK.

2003 - Birth and first public release

The library was first conceived in early 2003, with the first working (internal) version available in March, 2003.

At the end of June, 2003 the library's first public release with version 1.0 was made.

2005 - Version 2, sand box, object handles, script classes, and garbage collection

In the beginning of 2005 I made the difficult decision to do a major change of direction. Version 1 had several flaws that I couldn't solve without a major redesign. The worst was that the script language wasn't properly sand-boxed, i.e. the script writer had to be careful when writing scripts in order to crash the application or cause worse problems. The script compiler didn't make any attempts to guarantee that a value passed by reference to a function actually stayed alive during the call, and the script was allowed to use and manipulate pointers to access memory directly.

Version 2.0 included the concept of object handles, @, and parameter references with direction keywords, i.e. in & out. Object handles are basically smart pointers that the compiler uses to guarantee the proper life time of objects, and the direction keywords for parameter references are used to tell the compiler what the reference will be used for. This in turn allows the compiler to take necessary actions to guarantee the lifetime of the value, e.g. to create a temporary object that will receive the output value, which will only be assigned to the final destination after the called function returns to the caller.

With the release of 2.2.0 in mid-2005 the script language got its first version of script classes, at the time called struct. Before this the script language didn't support defining any new types, and scripts could only implement global functions for interacting the built-in types as well as application registered types.

With the introduction of classes the need for the incremental garbage collector was also born, as the scripts could now create objects with circular relationships that the simple reference counting memory model couldn't handle by itself.

2006 - Script interface

In 2006, with the release of 2.7.0, the concept of interfaces was introduced in the script language. Allowing the application to register a script interface that the script class could implement made for an easier interaction between application and script.

2009 - Inheritance, template types, operator overloads, and JIT compilation

Only in 2009, with version 2.15.2, was class inheritance implemented, though only single inheritance, to avoid complicating both the library and script language. Multiple interfaces are still allowed to support polymorphism.

Still in 2009, with version 2.16.1, the the library added support for registering templated types, to allow the application to create its own custom container types. The built-in array type would eventually be completely replaced by this and a default array add-on is provided.

With version 2.16.3 the script classes were enhanced to allow implementing operator overloads, thus making the language even more flexible and powerful.

Version 2.17.0, released in August 2009, introduced an interface to support external JIT compilers. While the AngelScript library doesn't provide its own JIT compiler, a third party JIT compiler was soon created with quick adoption by the community.

2010 - Function pointers

Support for function pointers in the script language was added in 2010 with version 2.18.2. Now the application can allow scripts to setup its own callbacks.

2011 - Automatic garbage collection and debugging

With the release of version 2.21.0 in 2011 the script engine gained support for automatic garbage collection to simplify this task for the application developer. Of course, the application developers that prefer to have full control can still do it manually by turning off the automatic collection.

This release also saw the implementation of a first standard debugger add-on that can be used by applications to add support for stepping through the scripts and inspecting variables for proper run-time debugging.

2012 - Namespaces and mixins

Namespaces were added to the script language in 2012 with version 2.22.2.

Mixin classes were introduced with version 2.25.0 to provide better support for code re-use even without multiple inheritance.

2013 - Improved template types, delegates, weak references, and initialization lists

The template types that were first introduced in 2009 were enhanced with version 2.26.1 to support multiple subtypes in order to give greater flexibility for the application.

Support for delegates was added with version 2.26.3.

Version 2.27.0 included support for weak references, so that is possible to have greater control over which handles keep objects alive or not.

Support for registrable factory functions that takes initialization lists was added in 2.28.0. This allows the application to define the specific pattern that should be used for different types using a simple syntax.

2014 - Named arguments and auto

In version 2.29.0 the script language gained support for named arguments, and auto for automatically determining the type of variables based on the initialization expression.

2015 - Anonymous functions

Anonymous functions were first implemented in version 2.30.2.

2016 - Child funcdefs

Funcdefs can be declared as members of classes as of version 2.31.0.

2017 - external keyword and anonymous initialization lists

The external keyword was introduced in version 2.32.0 to explicitly include shared entities from a previously compiled module. This version also introduced anonymouus initialization lists for more compact scripts.

2018 - Try-catch statements and explicit constructors

In version 2.33.0 the language was improved to support try-catch statements, and for flagging constructors as explicit for better control over what type conversions can happen implicitly.

2019 - Explicit property keyword

With version 2.34.0 virtual property access must be explicitly flagged with the property keyword so that functions starting with get_ or set_ won't automatically be interpreted as virtual properties.

2022 - Serialization of the context stack

With version 2.36.0 the ability to serialize the context stack was implemented.

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


code:
/* The standard CSS for doxygen 1.9.6*/

html {
/* page base colors */
--page-background-color: white;
--page-foreground-color: black;
--page-link-color: #3D578C;
--page-visited-link-color: #4665A2;

/* index */
--index-odd-item-bg-color: #F8F9FC;
--index-even-item-bg-color: white;
--index-header-color: black;
--index-separator-color: #A0A0A0;

/* header */
--header-background-color: #F9FAFC;
--header-separator-color: #C4CFE5;
--header-gradient-image: url('nav_h.png');
--group-header-separator-color: #879ECB;
--group-header-color: #354C7B;
--inherit-header-color: gray;

--footer-foreground-color: #2A3D61;
--footer-logo-width: 104px;
--citation-label-color: #334975;
--glow-color: cyan;

--title-background-color: white;
--title-separator-color: #5373B4;
--directory-separator-color: #9CAFD4;
--separator-color: #4A6AAA;

--blockquote-background-color: #F7F8FB;
--blockquote-border-color: #9CAFD4;

--scrollbar-thumb-color: #9CAFD4;
--scrollbar-background-color: #F9FAFC;

--icon-background-color: #728DC1;
--icon-foreground-color: white;
--icon-doc-image: url('doc.png');

/* brief member declaration list */
--memdecl-background-color: #F9FAFC;
--memdecl-separator-color: #DEE4F0;
--memdecl-foreground-color: #555;
--memdecl-template-color: #4665A2;

/* detailed member list */
--memdef-border-color: #A8B8D9;
--memdef-title-background-color: #E2E8F2;
--memdef-title-gradient-image: url('nav_f.png');
--memdef-proto-background-color: #DFE5F1;
--memdef-proto-text-color: #253555;
--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
--memdef-doc-background-color: white;
--memdef-param-name-color: #602020;
--memdef-template-color: #4665A2;

/* tables */
--table-cell-border-color: #2D4068;
--table-header-background-color: #374F7F;
--table-header-foreground-color: #FFFFFF;

/* labels */
--label-background-color: #728DC1;
--label-left-top-border-color: #5373B4;
--label-right-bottom-border-color: #C4CFE5;
--label-foreground-color: white;

/** navigation bar/tree/menu */
--nav-background-color: #F9FAFC;
--nav-foreground-color: #364D7C;
--nav-gradient-image: url('tab_b.png');
--nav-gradient-hover-image: url('tab_h.png');
--nav-gradient-active-image: url('tab_a.png');
--nav-gradient-active-image-parent: url("../tab_a.png");
--nav-separator-image: url('tab_s.png');
--nav-breadcrumb-image: url('bc_s.png');
--nav-breadcrumb-border-color: #C2CDE4;
--nav-splitbar-image: url('splitbar.png');
--nav-font-size-level1: 13px;
--nav-font-size-level2: 10px;
--nav-font-size-level3: 9px;
--nav-text-normal-color: #283A5D;
--nav-text-hover-color: white;
--nav-text-active-color: white;
--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
--nav-menu-button-color: #364D7C;
--nav-menu-background-color: white;
--nav-menu-foreground-color: #555555;
--nav-menu-toggle-color: rgba(255, 255, 255, 0.5);
--nav-arrow-color: #9CAFD4;
--nav-arrow-selected-color: #9CAFD4;

/* table of contents */
--toc-background-color: #F4F6FA;
--toc-border-color: #D8DFEE;
--toc-header-color: #4665A2;

/** search field */
--search-background-color: white;
--search-foreground-color: #909090;
--search-magnification-image: url('mag.svg');
--search-magnification-select-image: url('mag_sel.svg');
--search-active-color: black;
--search-filter-background-color: #F9FAFC;
--search-filter-foreground-color: black;
--search-filter-border-color: #90A5CE;
--search-filter-highlight-text-color: white;
--search-filter-highlight-bg-color: #3D578C;
--search-results-foreground-color: #425E97;
--search-results-background-color: #EEF1F7;
--search-results-border-color: black;
--search-box-shadow: inset 0.5px 0.5px 3px 0px #555;

/** code fragments */
--code-keyword-color: #008000;
--code-type-keyword-color: #604020;
--code-flow-keyword-color: #E08000;
--code-comment-color: #800000;
--code-preprocessor-color: #806020;
--code-string-literal-color: #002080;
--code-char-literal-color: #008080;
--code-vhdl-digit-color: #FF00FF;
--code-vhdl-char-color: #000000;
--code-vhdl-keyword-color: #700070;
--code-vhdl-logic-color: #FF0000;
--code-link-color: #4665A2;
--code-external-link-color: #4665A2;
--fragment-foreground-color: black;
--fragment-background-color: #FBFCFD;
--fragment-border-color: #C4CFE5;
--fragment-lineno-border-color: #00FF00;
--fragment-lineno-background-color: #E8E8E8;
--fragment-lineno-foreground-color: black;
--fragment-lineno-link-fg-color: #4665A2;
--fragment-lineno-link-bg-color: #D8D8D8;
--fragment-lineno-link-hover-fg-color: #4665A2;
--fragment-lineno-link-hover-bg-color: #C8C8C8;
--tooltip-foreground-color: black;
--tooltip-background-color: white;
--tooltip-border-color: gray;
--tooltip-doc-color: grey;
--tooltip-declaration-color: #006318;
--tooltip-link-color: #4665A2;
--tooltip-shadow: 1px 1px 7px gray;

/** font-family */
--font-family-normal: Roboto,sans-serif;
--font-family-monospace: monospace,fixed;
--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
--font-family-title: Tahoma,Arial,sans-serif;
--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
--font-family-search: Arial,Verdana,sans-serif;
--font-family-icon: Arial,Helvetica;
--font-family-tooltip: Roboto,sans-serif;

}

@media (prefers-color-scheme: dark) {
  html:not(.dark-mode) {
    color-scheme: dark;

/* page base colors */
--page-background-color: black;
--page-foreground-color: #C9D1D9;
--page-link-color: #90A5CE;
--page-visited-link-color: #A3B4D7;

/* index */
--index-odd-item-bg-color: #0B101A;
--index-even-item-bg-color: black;
--index-header-color: #C4CFE5;
--index-separator-color: #334975;

/* header */
--header-background-color: #070B11;
--header-separator-color: #141C2E;
--header-gradient-image: url('nav_hd.png');
--group-header-separator-color: #283A5D;
--group-header-color: #90A5CE;
--inherit-header-color: #A0A0A0;

--footer-foreground-color: #5B7AB7;
--footer-logo-width: 60px;
--citation-label-color: #90A5CE;
--glow-color: cyan;

--title-background-color: #090D16;
--title-separator-color: #354C79;
--directory-separator-color: #283A5D;
--separator-color: #283A5D;

--blockquote-background-color: #101826;
--blockquote-border-color: #283A5D;

--scrollbar-thumb-color: #283A5D;
--scrollbar-background-color: #070B11;

--icon-background-color: #334975;
--icon-foreground-color: #C4CFE5;
--icon-doc-image: url('docd.png');

/* brief member declaration list */
--memdecl-background-color: #0B101A;
--memdecl-separator-color: #2C3F65;
--memdecl-foreground-color: #BBB;
--memdecl-template-color: #7C95C6;

/* detailed member list */
--memdef-border-color: #233250;
--memdef-title-background-color: #1B2840;
--memdef-title-gradient-image: url('nav_fd.png');
--memdef-proto-background-color: #19243A;
--memdef-proto-text-color: #9DB0D4;
--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);
--memdef-doc-background-color: black;
--memdef-param-name-color: #D28757;
--memdef-template-color: #7C95C6;

/* tables */
--table-cell-border-color: #283A5D;
--table-header-background-color: #283A5D;
--table-header-foreground-color: #C4CFE5;

/* labels */
--label-background-color: #354C7B;
--label-left-top-border-color: #4665A2;
--label-right-bottom-border-color: #283A5D;
--label-foreground-color: #CCCCCC;

/** navigation bar/tree/menu */
--nav-background-color: #101826;
--nav-foreground-color: #364D7C;
--nav-gradient-image: url('tab_bd.png');
--nav-gradient-hover-image: url('tab_hd.png');
--nav-gradient-active-image: url('tab_ad.png');
--nav-gradient-active-image-parent: url("../tab_ad.png");
--nav-separator-image: url('tab_sd.png');
--nav-breadcrumb-image: url('bc_sd.png');
--nav-breadcrumb-border-color: #2A3D61;
--nav-splitbar-image: url('splitbard.png');
--nav-font-size-level1: 13px;
--nav-font-size-level2: 10px;
--nav-font-size-level3: 9px;
--nav-text-normal-color: #B6C4DF;
--nav-text-hover-color: #DCE2EF;
--nav-text-active-color: #DCE2EF;
--nav-text-normal-shadow: 0px 1px 1px black;
--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
--nav-menu-button-color: #B6C4DF;
--nav-menu-background-color: #05070C;
--nav-menu-foreground-color: #BBBBBB;
--nav-menu-toggle-color: rgba(255, 255, 255, 0.2);
--nav-arrow-color: #334975;
--nav-arrow-selected-color: #90A5CE;

/* table of contents */
--toc-background-color: #151E30;
--toc-border-color: #202E4A;
--toc-header-color: #A3B4D7;

/** search field */
--search-background-color: black;
--search-foreground-color: #C5C5C5;
--search-magnification-image: url('mag_d.svg');
--search-magnification-select-image: url('mag_seld.svg');
--search-active-color: #C5C5C5;
--search-filter-background-color: #101826;
--search-filter-foreground-color: #90A5CE;
--search-filter-border-color: #7C95C6;
--search-filter-highlight-text-color: #BCC9E2;
--search-filter-highlight-bg-color: #283A5D;
--search-results-background-color: #101826;
--search-results-foreground-color: #90A5CE;
--search-results-border-color: #7C95C6;
--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C;

/** code fragments */
--code-keyword-color: #CC99CD;
--code-type-keyword-color: #AB99CD;
--code-flow-keyword-color: #E08000;
--code-comment-color: #717790;
--code-preprocessor-color: #65CABE;
--code-string-literal-color: #7EC699;
--code-char-literal-color: #00E0F0;
--code-vhdl-digit-color: #FF00FF;
--code-vhdl-char-color: #000000;
--code-vhdl-keyword-color: #700070;
--code-vhdl-logic-color: #FF0000;
--code-link-color: #79C0FF;
--code-external-link-color: #79C0FF;
--fragment-foreground-color: #C9D1D9;
--fragment-background-color: black;
--fragment-border-color: #30363D;
--fragment-lineno-border-color: #30363D;
--fragment-lineno-background-color: black;
--fragment-lineno-foreground-color: #6E7681;
--fragment-lineno-link-fg-color: #6E7681;
--fragment-lineno-link-bg-color: #303030;
--fragment-lineno-link-hover-fg-color: #8E96A1;
--fragment-lineno-link-hover-bg-color: #505050;
--tooltip-foreground-color: #C9D1D9;
--tooltip-background-color: #202020;
--tooltip-border-color: #C9D1D9;
--tooltip-doc-color: #D9E1E9;
--tooltip-declaration-color: #20C348;
--tooltip-link-color: #79C0FF;
--tooltip-shadow: none;

/** font-family */
--font-family-normal: Roboto,sans-serif;
--font-family-monospace: monospace,fixed;
--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
--font-family-title: Tahoma,Arial,sans-serif;
--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
--font-family-search: Arial,Verdana,sans-serif;
--font-family-icon: Arial,Helvetica;
--font-family-tooltip: Roboto,sans-serif;

}}
body {
    background-color: var(--page-background-color);
    color: var(--page-foreground-color);
}

body, table, div, p, dl {
	font-weight: 400;
	font-size: 14px;
	font-family: var(--font-family-normal);
	line-height: 22px;
}

/* @group Heading Levels */

.title {
	font-weight: 400;
	font-size: 14px;
	font-family: var(--font-family-normal);
	line-height: 28px;
	font-size: 150%;
	font-weight: bold;
	margin: 10px 2px;
}

h1.groupheader {
	font-size: 150%;
}

h2.groupheader {
	border-bottom: 1px solid var(--group-header-separator-color);
	color: var(--group-header-color);
	font-size: 150%;
	font-weight: normal;
	margin-top: 1.75em;
	padding-top: 8px;
	padding-bottom: 4px;
	width: 100%;
}

h3.groupheader {
	font-size: 100%;
}

h1, h2, h3, h4, h5, h6 {
	-webkit-transition: text-shadow 0.5s linear;
	-moz-transition: text-shadow 0.5s linear;
	-ms-transition: text-shadow 0.5s linear;
	-o-transition: text-shadow 0.5s linear;
	transition: text-shadow 0.5s linear;
	margin-right: 15px;
}

h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
	text-shadow: 0 0 15px var(--glow-color);
}

dt {
	font-weight: bold;
}

p.startli, p.startdd {
	margin-top: 2px;
}

th p.starttd, th p.intertd, th p.endtd {
        font-size: 100%;
        font-weight: 700;
}

p.starttd {
	margin-top: 0px;
}

p.endli {
	margin-bottom: 0px;
}

p.enddd {
	margin-bottom: 4px;
}

p.endtd {
	margin-bottom: 2px;
}

p.interli {
}

p.interdd {
}

p.intertd {
}

/* @end */

caption {
	font-weight: bold;
}

span.legend {
	font-size: 70%;
	text-align: center;
}

h3.version {
	font-size: 90%;
	text-align: center;
}

div.navtab {
	padding-right: 15px;
	text-align: right;
	line-height: 110%;
}

div.navtab table {
	border-spacing: 0;
}

td.navtab {
	padding-right: 6px;
	padding-left: 6px;
}

td.navtabHL {
	background-image: var(--nav-gradient-active-image);
	background-repeat:repeat-x;
	padding-right: 6px;
	padding-left: 6px;
}

td.navtabHL a, td.navtabHL a:visited {
	color: var(--nav-text-hover-color);
	text-shadow: var(--nav-text-hover-shadow);
}

a.navtab {
	font-weight: bold;
}

div.qindex{
	text-align: center;
	width: 100%;
	line-height: 140%;
	font-size: 130%;
	color: var(--index-separator-color);
}

dt.alphachar{
	font-size: 180%;
	font-weight: bold;
}

.alphachar a{
	color: var(--index-header-color);
}

.alphachar a:hover, .alphachar a:visited{
	text-decoration: none;
}

.classindex dl {
	padding: 25px;
	column-count:1
}

.classindex dd {
	display:inline-block;
	margin-left: 50px;
	width: 90%;
	line-height: 1.15em;
}

.classindex dl.even {
	background-color: var(--index-even-item-bg-color);
}

.classindex dl.odd {
	background-color: var(--index-odd-item-bg-color);
}

@media(min-width: 1120px) {
	.classindex dl {
		column-count:2
	}
}

@media(min-width: 1320px) {
	.classindex dl {
		column-count:3
	}
}

/* @group Link Styling */

a {
	color: var(--page-link-color);
	font-weight: normal;
	text-decoration: none;
}

.contents a:visited {
	color: var(--page-visited-link-color);
}

a:hover {
	text-decoration: underline;
}

a.el {
	font-weight: bold;
}

a.elRef {
}

a.code, a.code:visited, a.line, a.line:visited {
	color: var(--code-link-color);
}

a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
	color: var(--code-external-link-color);
}

a.code.hl_class { /* style for links to class names in code snippets */ }
a.code.hl_struct { /* style for links to struct names in code snippets */ }
a.code.hl_union { /* style for links to union names in code snippets */ }
a.code.hl_interface { /* style for links to interface names in code snippets */ }
a.code.hl_protocol { /* style for links to protocol names in code snippets */ }
a.code.hl_category { /* style for links to category names in code snippets */ }
a.code.hl_exception { /* style for links to exception names in code snippets */ }
a.code.hl_service { /* style for links to service names in code snippets */ }
a.code.hl_singleton { /* style for links to singleton names in code snippets */ }
a.code.hl_concept { /* style for links to concept names in code snippets */ }
a.code.hl_namespace { /* style for links to namespace names in code snippets */ }
a.code.hl_package { /* style for links to package names in code snippets */ }
a.code.hl_define { /* style for links to macro names in code snippets */ }
a.code.hl_function { /* style for links to function names in code snippets */ }
a.code.hl_variable { /* style for links to variable names in code snippets */ }
a.code.hl_typedef { /* style for links to typedef names in code snippets */ }
a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ }
a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ }
a.code.hl_signal { /* style for links to Qt signal names in code snippets */ }
a.code.hl_slot { /* style for links to Qt slot names in code snippets */ }
a.code.hl_friend { /* style for links to friend names in code snippets */ }
a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ }
a.code.hl_property { /* style for links to property names in code snippets */ }
a.code.hl_event { /* style for links to event names in code snippets */ }
a.code.hl_sequence { /* style for links to sequence names in code snippets */ }
a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ }

/* @end */

dl.el {
	margin-left: -1cm;
}

ul {
  overflow: visible;
}

ul.multicol {
        -moz-column-gap: 1em;
        -webkit-column-gap: 1em;
        column-gap: 1em;
        -moz-column-count: 3;
        -webkit-column-count: 3;
        column-count: 3;
        list-style-type: none;
}

#side-nav ul {
  overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */
}

#main-nav ul {
  overflow: visible; /* reset ul rule for the navigation bar drop down lists */
}

.fragment {
  text-align: left;
  direction: ltr;
  overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/
  overflow-y: hidden;
}

pre.fragment {
        border: 1px solid var(--fragment-border-color);
        background-color: var(--fragment-background-color);
	color: var(--fragment-foreground-color);
        padding: 4px 6px;
        margin: 4px 8px 4px 2px;
        overflow: auto;
        word-wrap: break-word;
        font-size:  9pt;
        line-height: 125%;
        font-family: var(--font-family-monospace);
        font-size: 105%;
}

div.fragment {
	padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/
	margin: 4px 8px 4px 2px;
	color: var(--fragment-foreground-color);
	background-color: var(--fragment-background-color);
	border: 1px solid var(--fragment-border-color);
}

div.line {
	font-family: var(--font-family-monospace);
        font-size: 13px;
	min-height: 13px;
	line-height: 1.0;
	text-wrap: unrestricted;
	white-space: -moz-pre-wrap; /* Moz */
	white-space: -pre-wrap;     /* Opera 4-6 */
	white-space: -o-pre-wrap;   /* Opera 7 */
	white-space: pre-wrap;      /* CSS3  */
	word-wrap: break-word;      /* IE 5.5+ */
	text-indent: -53px;
	padding-left: 53px;
	padding-bottom: 0px;
	margin: 0px;
	-webkit-transition-property: background-color, box-shadow;
	-webkit-transition-duration: 0.5s;
	-moz-transition-property: background-color, box-shadow;
	-moz-transition-duration: 0.5s;
	-ms-transition-property: background-color, box-shadow;
	-ms-transition-duration: 0.5s;
	-o-transition-property: background-color, box-shadow;
	-o-transition-duration: 0.5s;
	transition-property: background-color, box-shadow;
	transition-duration: 0.5s;
}

div.line:after {
    content:"\000A";
    white-space: pre;
}

div.line.glow {
	background-color: var(--glow-color);
	box-shadow: 0 0 10px var(--glow-color);
}

span.lineno {
	padding-right: 4px;
        margin-right: 9px;
	text-align: right;
	border-right: 2px solid var(--fragment-lineno-border-color);
	color: var(--fragment-lineno-foreground-color);
	background-color: var(--fragment-lineno-background-color);
        white-space: pre;
}
span.lineno a, span.lineno a:visited {
	color: var(--fragment-lineno-link-fg-color);
	background-color: var(--fragment-lineno-link-bg-color);
}

span.lineno a:hover {
	color: var(--fragment-lineno-link-hover-fg-color);
	background-color: var(--fragment-lineno-link-hover-bg-color);
}

.lineno {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

div.classindex ul {
        list-style: none;
        padding-left: 0;
}

div.classindex span.ai {
        display: inline-block;
}

div.groupHeader {
	margin-left: 16px;
	margin-top: 12px;
	font-weight: bold;
}

div.groupText {
	margin-left: 16px;
	font-style: italic;
}

body {
	color: var(--page-foreground-color);
        margin: 0;
}

div.contents {
	margin-top: 10px;
	margin-left: 12px;
	margin-right: 8px;
}

p.formulaDsp {
	text-align: center;
}

img.dark-mode-visible {
	display: none;
}
img.light-mode-visible {
	display: none;
}

img.formulaDsp {

}

img.formulaInl, img.inline {
	vertical-align: middle;
}

div.center {
	text-align: center;
        margin-top: 0px;
        margin-bottom: 0px;
        padding: 0px;
}

div.center img {
	border: 0px;
}

address.footer {
	text-align: right;
	padding-right: 12px;
}

img.footer {
	border: 0px;
	vertical-align: middle;
	width: var(--footer-logo-width);
}

.compoundTemplParams {
	color: var(--memdecl-template-color);
	font-size: 80%;
	line-height: 120%;
}

/* @group Code Colorization */

span.keyword {
	color: var(--code-keyword-color);
}

span.keywordtype {
	color: var(--code-type-keyword-color);
}

span.keywordflow {
	color: var(--code-flow-keyword-color);
}

span.comment {
	color: var(--code-comment-color);
}

span.preprocessor {
	color: var(--code-preprocessor-color);
}

span.stringliteral {
	color: var(--code-string-literal-color);
}

span.charliteral {
	color: var(--code-char-literal-color);
}

span.vhdldigit {
	color: var(--code-vhdl-digit-color);
}

span.vhdlchar {
	color: var(--code-vhdl-char-color);
}

span.vhdlkeyword {
	color: var(--code-vhdl-keyword-color);
}

span.vhdllogic {
	color: var(--code-vhdl-logic-color);
}

blockquote {
        background-color: var(--blockquote-background-color);
        border-left: 2px solid var(--blockquote-border-color);
        margin: 0 24px 0 4px;
        padding: 0 12px 0 16px;
}

/* @end */

td.tiny {
	font-size: 75%;
}

.dirtab {
	padding: 4px;
	border-collapse: collapse;
	border: 1px solid var(--table-cell-border-color);
}

th.dirtab {
	background-color: var(--table-header-background-color);
	color: var(--table-header-foreground-color);
	font-weight: bold;
}

hr {
	height: 0px;
	border: none;
	border-top: 1px solid var(--separator-color);
}

hr.footer {
	height: 1px;
}

/* @group Member Descriptions */

table.memberdecls {
	border-spacing: 0px;
	padding: 0px;
}

.memberdecls td, .fieldtable tr {
	-webkit-transition-property: background-color, box-shadow;
	-webkit-transition-duration: 0.5s;
	-moz-transition-property: background-color, box-shadow;
	-moz-transition-duration: 0.5s;
	-ms-transition-property: background-color, box-shadow;
	-ms-transition-duration: 0.5s;
	-o-transition-property: background-color, box-shadow;
	-o-transition-duration: 0.5s;
	transition-property: background-color, box-shadow;
	transition-duration: 0.5s;
}

.memberdecls td.glow, .fieldtable tr.glow {
	background-color: var(--glow-color);
	box-shadow: 0 0 15px var(--glow-color);
}

.mdescLeft, .mdescRight,
.memItemLeft, .memItemRight,
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
	background-color: var(--memdecl-background-color);
	border: none;
	margin: 4px;
	padding: 1px 0 0 8px;
}

.mdescLeft, .mdescRight {
	padding: 0px 8px 4px 8px;
	color: var(--memdecl-foreground-color);
}

.memSeparator {
        border-bottom: 1px solid var(--memdecl-separator-color);
        line-height: 1px;
        margin: 0px;
        padding: 0px;
}

.memItemLeft, .memTemplItemLeft {
        white-space: nowrap;
}

.memItemRight, .memTemplItemRight {
	width: 100%;
}

.memTemplParams {
	color: var(--memdecl-template-color);
        white-space: nowrap;
	font-size: 80%;
}

/* @end */

/* @group Member Details */

/* Styles for detailed member documentation */

.memtitle {
	padding: 8px;
	border-top: 1px solid var(--memdef-border-color);
	border-left: 1px solid var(--memdef-border-color);
	border-right: 1px solid var(--memdef-border-color);
	border-top-right-radius: 4px;
	border-top-left-radius: 4px;
	margin-bottom: -1px;
	background-image: var(--memdef-title-gradient-image);
	background-repeat: repeat-x;
	background-color: var(--memdef-title-background-color);
	line-height: 1.25;
	font-weight: 300;
	float:left;
}

.permalink
{
        font-size: 65%;
        display: inline-block;
        vertical-align: middle;
}

.memtemplate {
	font-size: 80%;
	color: var(--memdef-template-color);
	font-weight: normal;
	margin-left: 9px;
}

.mempage {
	width: 100%;
}

.memitem {
	padding: 0;
	margin-bottom: 10px;
	margin-right: 5px;
        -webkit-transition: box-shadow 0.5s linear;
        -moz-transition: box-shadow 0.5s linear;
        -ms-transition: box-shadow 0.5s linear;
        -o-transition: box-shadow 0.5s linear;
        transition: box-shadow 0.5s linear;
        display: table !important;
        width: 100%;
}

.memitem.glow {
         box-shadow: 0 0 15px var(--glow-color);
}

.memname {
        font-weight: 400;
        margin-left: 6px;
}

.memname td {
	vertical-align: bottom;
}

.memproto, dl.reflist dt {
        border-top: 1px solid var(--memdef-border-color);
        border-left: 1px solid var(--memdef-border-color);
        border-right: 1px solid var(--memdef-border-color);
        padding: 6px 0px 6px 0px;
        color: var(--memdef-proto-text-color);
        font-weight: bold;
        text-shadow: var(--memdef-proto-text-shadow);
        background-color: var(--memdef-proto-background-color);
        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
        border-top-right-radius: 4px;
}

.overload {
        font-family: var(--font-family-monospace);
	font-size: 65%;
}

.memdoc, dl.reflist dd {
        border-bottom: 1px solid var(--memdef-border-color);
        border-left: 1px solid var(--memdef-border-color);
        border-right: 1px solid var(--memdef-border-color);
        padding: 6px 10px 2px 10px;
        border-top-width: 0;
        background-image:url('nav_g.png');
        background-repeat:repeat-x;
        background-color: var(--memdef-doc-background-color);
        /* opera specific markup */
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
        /* firefox specific markup */
        -moz-border-radius-bottomleft: 4px;
        -moz-border-radius-bottomright: 4px;
        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
        /* webkit specific markup */
        -webkit-border-bottom-left-radius: 4px;
        -webkit-border-bottom-right-radius: 4px;
        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}

dl.reflist dt {
        padding: 5px;
}

dl.reflist dd {
        margin: 0px 0px 10px 0px;
        padding: 5px;
}

.paramkey {
	text-align: right;
}

.paramtype {
	white-space: nowrap;
}

.paramname {
	color: var(--memdef-param-name-color);
	white-space: nowrap;
}
.paramname em {
	font-style: normal;
}
.paramname code {
        line-height: 14px;
}

.params, .retval, .exception, .tparams {
        margin-left: 0px;
        padding-left: 0px;
}

.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
        font-weight: bold;
        vertical-align: top;
}

.params .paramtype, .tparams .paramtype {
        font-style: italic;
        vertical-align: top;
}

.params .paramdir, .tparams .paramdir {
        font-family: var(--font-family-monospace);
        vertical-align: top;
}

table.mlabels {
	border-spacing: 0px;
}

td.mlabels-left {
	width: 100%;
	padding: 0px;
}

td.mlabels-right {
	vertical-align: bottom;
	padding: 0px;
	white-space: nowrap;
}

span.mlabels {
        margin-left: 8px;
}

span.mlabel {
        background-color: var(--label-background-color);
        border-top:1px solid var(--label-left-top-border-color);
        border-left:1px solid var(--label-left-top-border-color);
        border-right:1px solid var(--label-right-bottom-border-color);
        border-bottom:1px solid var(--label-right-bottom-border-color);
	text-shadow: none;
	color: var(--label-foreground-color);
	margin-right: 4px;
	padding: 2px 3px;
	border-radius: 3px;
	font-size: 7pt;
	white-space: nowrap;
	vertical-align: middle;
}

/* @end */

/* these are for tree view inside a (index) page */

div.directory {
        margin: 10px 0px;
        border-top: 1px solid var(--directory-separator-color);
        border-bottom: 1px solid var(--directory-separator-color);
        width: 100%;
}

.directory table {
        border-collapse:collapse;
}

.directory td {
        margin: 0px;
        padding: 0px;
	vertical-align: top;
}

.directory td.entry {
        white-space: nowrap;
        padding-right: 6px;
	padding-top: 3px;
}

.directory td.entry a {
        outline:none;
}

.directory td.entry a img {
        border: none;
}

.directory td.desc {
        width: 100%;
        padding-left: 6px;
	padding-right: 6px;
	padding-top: 3px;
	border-left: 1px solid rgba(0,0,0,0.05);
}

.directory tr.odd {
	padding-left: 6px;
	background-color: var(--index-odd-item-bg-color);
}

.directory tr.even {
	padding-left: 6px;
	background-color: var(--index-even-item-bg-color);
}

.directory img {
	vertical-align: -30%;
}

.directory .levels {
        white-space: nowrap;
        width: 100%;
        text-align: right;
        font-size: 9pt;
}

.directory .levels span {
        cursor: pointer;
        padding-left: 2px;
        padding-right: 2px;
	color: var(--page-link-color);
}

.arrow {
    color: var(--nav-arrow-color);
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    font-size: 80%;
    display: inline-block;
    width: 16px;
    height: 22px;
}

.icon {
    font-family: var(--font-family-icon);
    line-height: normal;
    font-weight: bold;
    font-size: 12px;
    height: 14px;
    width: 16px;
    display: inline-block;
    background-color: var(--icon-background-color);
    color: var(--icon-foreground-color);
    text-align: center;
    border-radius: 4px;
    margin-left: 2px;
    margin-right: 2px;
}

.icona {
    width: 24px;
    height: 22px;
    display: inline-block;
}

.iconfopen {
    width: 24px;
    height: 18px;
    margin-bottom: 4px;
    background-image:url('folderopen.png');
    background-position: 0px -4px;
    background-repeat: repeat-y;
    vertical-align:top;
    display: inline-block;
}

.iconfclosed {
    width: 24px;
    height: 18px;
    margin-bottom: 4px;
    background-image:url('folderclosed.png');
    background-position: 0px -4px;
    background-repeat: repeat-y;
    vertical-align:top;
    display: inline-block;
}

.icondoc {
    width: 24px;
    height: 18px;
    margin-bottom: 4px;
    background-image:var(--icon-doc-image);
    background-position: 0px -4px;
    background-repeat: repeat-y;
    vertical-align:top;
    display: inline-block;
}

/* @end */

div.dynheader {
        margin-top: 8px;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

address {
	font-style: normal;
	color: var(--footer-foreground-color);
}

table.doxtable caption {
	caption-side: top;
}

table.doxtable {
	border-collapse:collapse;
        margin-top: 4px;
        margin-bottom: 4px;
}

table.doxtable td, table.doxtable th {
	border: 1px solid var(--table-cell-border-color);
	padding: 3px 7px 2px;
}

table.doxtable th {
	background-color: var(--table-header-background-color);
	color: var(--table-header-foreground-color);
	font-size: 110%;
	padding-bottom: 4px;
	padding-top: 5px;
}

table.fieldtable {
        margin-bottom: 10px;
        border: 1px solid var(--memdef-border-color);
        border-spacing: 0px;
        border-radius: 4px;
        box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
}

.fieldtable td, .fieldtable th {
        padding: 3px 7px 2px;
}

.fieldtable td.fieldtype, .fieldtable td.fieldname {
        white-space: nowrap;
        border-right: 1px solid var(--memdef-border-color);
        border-bottom: 1px solid var(--memdef-border-color);
        vertical-align: top;
}

.fieldtable td.fieldname {
        padding-top: 3px;
}

.fieldtable td.fielddoc {
        border-bottom: 1px solid var(--memdef-border-color);
}

.fieldtable td.fielddoc p:first-child {
        margin-top: 0px;
}

.fieldtable td.fielddoc p:last-child {
        margin-bottom: 2px;
}

.fieldtable tr:last-child td {
        border-bottom: none;
}

.fieldtable th {
        background-image: var(--memdef-title-gradient-image);
        background-repeat:repeat-x;
        background-color: var(--memdef-title-background-color);
        font-size: 90%;
        color: var(--memdef-proto-text-color);
        padding-bottom: 4px;
        padding-top: 5px;
        text-align:left;
        font-weight: 400;
        border-top-left-radius: 4px;
        border-top-right-radius: 4px;
        border-bottom: 1px solid var(--memdef-border-color);
}

.tabsearch {
	top: 0px;
	left: 10px;
	height: 36px;
	background-image: var(--nav-gradient-image);
	z-index: 101;
	overflow: hidden;
	font-size: 13px;
}

.navpath ul
{
	font-size: 11px;
	background-image: var(--nav-gradient-image);
	background-repeat:repeat-x;
	background-position: 0 -5px;
	height:30px;
	line-height:30px;
	color:var(--nav-text-normal-color);
	border:solid 1px var(--nav-breadcrumb-border-color);
	overflow:hidden;
	margin:0px;
	padding:0px;
}

.navpath li
{
	list-style-type:none;
	float:left;
	padding-left:10px;
	padding-right:15px;
	background-image:var(--nav-breadcrumb-image);
	background-repeat:no-repeat;
	background-position:right;
	color: var(--nav-foreground-color);
}

.navpath li.navelem a
{
	height:32px;
	display:block;
	text-decoration: none;
	outline: none;
	color: var(--nav-text-normal-color);
	font-family: var(--font-family-nav);
	text-shadow: var(--nav-text-normal-shadow);
	text-decoration: none;
}

.navpath li.navelem a:hover
{
	color: var(--nav-text-hover-color);
	text-shadow: var(--nav-text-hover-shadow);
}

.navpath li.footer
{
        list-style-type:none;
        float:right;
        padding-left:10px;
        padding-right:15px;
        background-image:none;
        background-repeat:no-repeat;
        background-position:right;
        color: var(--footer-foreground-color);
        font-size: 8pt;
}

div.summary
{
	float: right;
	font-size: 8pt;
	padding-right: 5px;
	width: 50%;
	text-align: right;
}

div.summary a
{
	white-space: nowrap;
}

table.classindex
{
        margin: 10px;
        white-space: nowrap;
        margin-left: 3%;
        margin-right: 3%;
        width: 94%;
        border: 0;
        border-spacing: 0;
        padding: 0;
}

div.ingroups
{
	font-size: 8pt;
	width: 50%;
	text-align: left;
}

div.ingroups a
{
	white-space: nowrap;
}

div.header
{
        background-image: var(--header-gradient-image);
        background-repeat:repeat-x;
	background-color: var(--header-background-color);
	margin:  0px;
	border-bottom: 1px solid var(--header-separator-color);
}

div.headertitle
{
	padding: 5px 5px 5px 10px;
}

.PageDocRTL-title div.headertitle {
  text-align: right;
  direction: rtl;
}

dl {
        padding: 0 0 0 0;
}

/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */
dl.section {
	margin-left: 0px;
	padding-left: 0px;
}

dl.note {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #D0C000;
}

dl.warning, dl.attention {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #FF0000;
}

dl.pre, dl.post, dl.invariant {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #00D000;
}

dl.deprecated {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #505050;
}

dl.todo {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #00C0E0;
}

dl.test {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #3030E0;
}

dl.bug {
  margin-left: -7px;
  padding-left: 3px;
  border-left: 4px solid;
  border-color: #C08050;
}

dl.section dd {
	margin-bottom: 6px;
}

#projectrow
{
	height: 56px;
}

#projectlogo
{
	text-align: center;
	vertical-align: bottom;
	border-collapse: separate;
}

#projectlogo img
{
	border: 0px none;
}

#projectalign
{
        vertical-align: middle;
        padding-left: 0.5em;
}

#projectname
{
	font-size: 200%;
	font-family: var(--font-family-title);
	margin: 0px;
	padding: 2px 0px;
}

#projectbrief
{
	font-size: 90%;
        font-family: var(--font-family-title);
	margin: 0px;
	padding: 0px;
}

#projectnumber
{
	font-size: 50%;
	font-family: 50% var(--font-family-title);
	margin: 0px;
	padding: 0px;
}

#titlearea
{
	padding: 0px;
	margin: 0px;
	width: 100%;
	border-bottom: 1px solid var(--title-separator-color);
	background-color: var(--title-background-color);
}

.image
{
        text-align: center;
}

.dotgraph
{
        text-align: center;
}

.mscgraph
{
        text-align: center;
}

.plantumlgraph
{
        text-align: center;
}

.diagraph
{
        text-align: center;
}

.caption
{
	font-weight: bold;
}

dl.citelist {
        margin-bottom:50px;
}

dl.citelist dt {
        color:var(--citation-label-color);
        float:left;
        font-weight:bold;
        margin-right:10px;
        padding:5px;
        text-align:right;
        width:52px;
}

dl.citelist dd {
        margin:2px 0 2px 72px;
        padding:5px 0;
}

div.toc {
        padding: 14px 25px;
        background-color: var(--toc-background-color);
        border: 1px solid var(--toc-border-color);
        border-radius: 7px 7px 7px 7px;
        float: right;
        height: auto;
        margin: 0 8px 10px 10px;
        width: 200px;
}

div.toc li {
        background: url("bdwn.png") no-repeat scroll 0 5px transparent;
        font: 10px/1.2 var(--font-family-toc);
        margin-top: 5px;
        padding-left: 10px;
        padding-top: 2px;
}

div.toc h3 {
        font: bold 12px/1.2 var(--font-family-toc);
	color: var(--toc-header-color);
        border-bottom: 0 none;
        margin: 0;
}

div.toc ul {
        list-style: none outside none;
        border: medium none;
        padding: 0px;
}

div.toc li.level1 {
        margin-left: 0px;
}

div.toc li.level2 {
        margin-left: 15px;
}

div.toc li.level3 {
        margin-left: 30px;
}

div.toc li.level4 {
        margin-left: 45px;
}

span.emoji {
        /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html
         * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort;
         */
}

span.obfuscator {
  display: none;
}

.inherit_header {
        font-weight: bold;
        color: var(--inherit-header-color);
        cursor: pointer;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.inherit_header td {
        padding: 6px 0px 2px 5px;
}

.inherit {
        display: none;
}

tr.heading h2 {
        margin-top: 12px;
        margin-bottom: 4px;
}

/* tooltip related style info */

.ttc {
        position: absolute;
        display: none;
}

#powerTip {
	cursor: default;
	/*white-space: nowrap;*/
        color: var(--tooltip-foreground-color);
	background-color: var(--tooltip-background-color);
	border: 1px solid var(--tooltip-border-color);
	border-radius: 4px 4px 4px 4px;
	box-shadow: var(--tooltip-shadow);
	display: none;
	font-size: smaller;
	max-width: 80%;
	opacity: 0.9;
	padding: 1ex 1em 1em;
	position: absolute;
	z-index: 2147483647;
}

#powerTip div.ttdoc {
        color: var(--tooltip-doc-color);
	font-style: italic;
}

#powerTip div.ttname a {
        font-weight: bold;
}

#powerTip a {
	color: var(--tooltip-link-color);
}

#powerTip div.ttname {
        font-weight: bold;
}

#powerTip div.ttdeci {
        color: var(--tooltip-declaration-color);
}

#powerTip div {
        margin: 0px;
        padding: 0px;
        font-size: 12px;
       	font-family: var(--font-family-tooltip);
	line-height: 16px;
}

#powerTip:before, #powerTip:after {
	content: "";
	position: absolute;
	margin: 0px;
}

#powerTip.n:after,  #powerTip.n:before,
#powerTip.s:after,  #powerTip.s:before,
#powerTip.w:after,  #powerTip.w:before,
#powerTip.e:after,  #powerTip.e:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.nw:after, #powerTip.nw:before,
#powerTip.sw:after, #powerTip.sw:before {
	border: solid transparent;
	content: " ";
	height: 0;
	width: 0;
	position: absolute;
}

#powerTip.n:after,  #powerTip.s:after,
#powerTip.w:after,  #powerTip.e:after,
#powerTip.nw:after, #powerTip.ne:after,
#powerTip.sw:after, #powerTip.se:after {
	border-color: rgba(255, 255, 255, 0);
}

#powerTip.n:before,  #powerTip.s:before,
#powerTip.w:before,  #powerTip.e:before,
#powerTip.nw:before, #powerTip.ne:before,
#powerTip.sw:before, #powerTip.se:before {
	border-color: rgba(128, 128, 128, 0);
}

#powerTip.n:after,  #powerTip.n:before,
#powerTip.ne:after, #powerTip.ne:before,
#powerTip.nw:after, #powerTip.nw:before {
	top: 100%;
}

#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
	border-top-color: var(--tooltip-background-color);
	border-width: 10px;
	margin: 0px -10px;
}
#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before {
	border-top-color: var(--tooltip-border-color);
	border-width: 11px;
	margin: 0px -11px;
}
#powerTip.n:after, #powerTip.n:before {
	left: 50%;
}

#powerTip.nw:after, #powerTip.nw:before {
	right: 14px;
}

#powerTip.ne:after, #powerTip.ne:before {
	left: 14px;
}

#powerTip.s:after,  #powerTip.s:before,
#powerTip.se:after, #powerTip.se:before,
#powerTip.sw:after, #powerTip.sw:before {
	bottom: 100%;
}

#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
	border-bottom-color: var(--tooltip-background-color);
	border-width: 10px;
	margin: 0px -10px;
}

#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
	border-bottom-color: var(--tooltip-border-color);
	border-width: 11px;
	margin: 0px -11px;
}

#powerTip.s:after, #powerTip.s:before {
	left: 50%;
}

#powerTip.sw:after, #powerTip.sw:before {
	right: 14px;
}

#powerTip.se:after, #powerTip.se:before {
	left: 14px;
}

#powerTip.e:after, #powerTip.e:before {
	left: 100%;
}
#powerTip.e:after {
	border-left-color: var(--tooltip-border-color);
	border-width: 10px;
	top: 50%;
	margin-top: -10px;
}
#powerTip.e:before {
	border-left-color: var(--tooltip-border-color);
	border-width: 11px;
	top: 50%;
	margin-top: -11px;
}

#powerTip.w:after, #powerTip.w:before {
	right: 100%;
}
#powerTip.w:after {
	border-right-color: var(--tooltip-border-color);
	border-width: 10px;
	top: 50%;
	margin-top: -10px;
}
#powerTip.w:before {
	border-right-color: var(--tooltip-border-color);
	border-width: 11px;
	top: 50%;
	margin-top: -11px;
}

@media print
{
  #top { display: none; }
  #side-nav { display: none; }
  #nav-path { display: none; }
  body { overflow:visible; }
  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
  .summary { display: none; }
  .memitem { page-break-inside: avoid; }
  #doc-content
  {
    margin-left:0 !important;
    height:auto !important;
    width:auto !important;
    overflow:inherit;
    display:inline;
  }
}

/* @group Markdown */

table.markdownTable {
	border-collapse:collapse;
        margin-top: 4px;
        margin-bottom: 4px;
}

table.markdownTable td, table.markdownTable th {
	border: 1px solid var(--table-cell-border-color);
	padding: 3px 7px 2px;
}

table.markdownTable tr {
}

th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
	background-color: var(--table-header-background-color);
	color: var(--table-header-foreground-color);
	font-size: 110%;
	padding-bottom: 4px;
	padding-top: 5px;
}

th.markdownTableHeadLeft, td.markdownTableBodyLeft {
	text-align: left
}

th.markdownTableHeadRight, td.markdownTableBodyRight {
	text-align: right
}

th.markdownTableHeadCenter, td.markdownTableBodyCenter {
	text-align: center
}

tt, code, kbd, samp
{
  display: inline-block;
}
/* @end */

u {
	text-decoration: underline;
}

details>summary {
  list-style-type: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details>summary::before {
    content: "\25ba";
    padding-right:4px;
    font-size: 80%;
}

details[open]>summary::before {
    content: "\25bc";
    padding-right:4px;
    font-size: 80%;
}

body {
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color);
}

::-webkit-scrollbar {
        background-color: var(--scrollbar-background-color);
        height: 12px;
        width: 12px;
}
::-webkit-scrollbar-thumb {
        border-radius: 6px;
        box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color);
        border: solid 2px transparent;
}
::-webkit-scrollbar-corner {
        background-color: var(--scrollbar-background-color);
}