text: The engine interface. More...
  The engine is the central object. It is where the application registers the application interface that the scripts should be able to use, and it is where the application can request modules to build scripts and contexts to execute them.
  The engine instance is created with a call to asCreateScriptEngine.
  It is allowed to have multiple instances of script engines, but there is rarely a need for it. Even if the application needs to expose different interfaces to different types of scripts this can usually be accomplished through the use of configuration groups and access profiles.
  Call this method when storing an additional reference to the object. Remember that the first reference that is received from asCreateScriptEngine is already accounted for.
  This calls the add ref method of the object to increase the reference count.
  This calls the assignment operator to copy the object from one to the other.
  This only works for objects.
  Starts a new dynamic configuration group. This group can be setup so that it is only visible to specific modules, and it can also be removed when it is no longer used.
  Call this method to remove the message callback.
  This method creates a context that will be used to execute the script functions. The context interface created will have its reference counter already increased.
  This method is used to create an object based on it's type. The method will call the object type's default factory. If the object type doesn't have a default factory the call will fail and no object will be created.
  Created objects will have their reference counter set to 1 so the application needs to release the pointer when it will no longer use it.
  If the type is a registered value type, then the memory for the object will be allocated using the default memory routine. To destroy and and deallocate the object it is best to use ReleaseScriptObject.
  The method only works for objects, for primitive types and object handles the method doesn't do anything and returns a null pointer.
  This method is used to create a copy of an existing object.
  This only works for objects, for primitive types and object handles the method doesn't do anything and returns a null pointer.
  This method can only be used to create instances of script classes.
  The returned object will only be initialized so far that there are no invalid pointers or references. The constructor of the script class will not be invoked.
  If the script class has any registered types as members, the default constructor for those members will be executed.
  This method is meant for objects that will be initialized manually by the application, e.g. when restoring a serialized object.
  Discards a module and frees its memory. Any pointers that the application holds to this module will be invalid after this call.
  Ends the current configuration group. Once finished a config group cannot be changed, but it can be removed when it is no longer used.
  This method will free script objects that can no longer be reached. When the engine is released the garbage collector will automatically do a full cycle to release all objects still alive. If the engine is long living it is important to call this method every once in a while to free up memory allocated by the scripts. If a script does a lot of allocations before returning it may be necessary to implement a line callback function that calls the garbage collector during execution of the script.
  It is not necessary to do a full cycle with every call. This makes it possible to spread out the garbage collection time over a large period, thus not impacting the responsiveness of the application.
  When processing the EnumReferences call the called object should call GCEnumCallback for each of the references it holds to other objects.
  Calling this method lets you determine the current value of the engine properties.
  This function does not increase the reference count of the return function definition.
  This does not increment the reference count of the returned function interface.
  This does not increment the reference count of the returned function interface.
  This method can be used to query the number of objects that the garbage collector is keeping track of. If the number is very large then it is probably time to call the GarbageCollect method so that some of the objects ca be freed.
  Use this method to get access to the module interface, which will let you build new scripts, and enumerate functions and types in existing modules.
  If asGM_ALWAYS_CREATE is informed as the flag the previous module with the same name will be discarded, thus any pointers that the engine holds to it will be invalid after the call. increment the reference count of the returned object type.
  This method can be used to return the size of any built-in primitive type, and also for script declared or application registered enums.
  Translates a type declaration into a type id. The returned type id is valid for as long as the type is valid, so you can safely store it for later use to avoid potential overhead only able to return the type id that are not specific for a script module, i.e. built-in types and application registered types. Type ids for script declared types should be obtained through the script module's GetTypeIdByDecl.
  As long as the weak ref flag is not set, the owning object is still alive. Once the weak ref flag is set, the object is dead and should no longer be accessed. Check if the flag is set with the asILockableSharedBool::Get method.
  This method doesn't increase the reference to the returned shared boolean.
  This method should be called when a new garbage collected object is created. The GC will then store a reference to the object so that it can automatically detect whether the object is involved in any circular references that should be released.
  This function is useful for those applications that want to tokenize strings into tokens that the script language uses, e.g. IDEs providing syntax highlighting, or intellisense. It can also be used to parse the meta data strings that may be declared for script entities.
  This method is used to cast an object pointer to a different type. While both the new and old pointers are expected to refer to the same object instance, the address of the pointers are not necessarily the same.
  If the cast is successful the newPtr will be set to the new pointer, and the reference counter will be incremented. If the cast is not successful, the newPtr will be set to null, and the reference count left unchanged.
  This method registers an enum type in the engine. The enum values should then be registered with RegisterEnumValue.
  This method registers an enum value for a previously registered enum type.
  Funcdefs are used to define the signature of function pointers. If the application is going to receive function pointers from scripts, it is necessary to first register the funcdef before registering the function or property that will be used to receive it.
  This method registers system functions that the scripts may use to communicate with the host application.
  Use this method to register a global property that the scripts will be able to access as global variables. The property may optionally be registered as const, if the scripts shouldn't be allowed to modify it.
  When registering the property, the application must pass the address to the actual value. The application must also make sure that this address remains valid throughout the life time of this registration, i.e. until the engine is released or the dynamic configuration group is removed.
  This registers an interface that script classes can implement. By doing this the application can register functions and methods that receives an asIScriptObject and still be sure that the class implements certain methods needed by the application.
  This registers a method that the class that implements the script interface must have.
  Use this method to register behaviour functions that will be called by the virtual machine to perform certain operations, such as memory management, math operations, comparisons, etc.
  The declaration must form a valid function signature, but the give function name will not be used or stored in the application so there is no need to provide a meaningful function name.
  Use this method to register a member method for the type. The method that is registered may be an actual class method, or a global function that takes the object pointer as either the first or last parameter. Or it may be a global function implemented with the generic calling convention.
  Use this method to register a member property of a class. The property must be local to the object, i.e. not a global variable or a static member. The easiest way to get the offset of the property is to use the asOFFSET macro.
  Use this method to register new types that should be available to the scripts. Reference types, which have their memory managed by the application, should be registered with asOBJ_REF. Value types, which have their memory managed by the engine, should be registered with asOBJ_VALUE.
  Use this function to register a string factory that will be called when the virtual machine finds a string constant in an expression. The string factory function will receive two parameters, the length of the string constant in bytes and a pointer to the character data. The factory should return a value to a previously registered type that will represent the string. Example:
  The example assumes that the std::string type has been registered as the string type, with RegisterObjectType.
  This method registers an alias for a data type.
  Currently typedefs can only be registered for built-in primitive types.
  Call this method when you will no longer use the references that you own.
  If you know that the engine is supposed to be shut down, then it is recommended to call the ShutDownAndRelease method instead.
  This calls the release method of the object to release the reference.
  If the type is a value type, the method will destroy the object and deallocate the memory using the default memory routine.
  Remove the configuration group. If something in the configuration group is currently in use, the function will return with an error code. Examples of uses are compiled modules that have function calls to functions in the group and global variables of types registered in the group.
  This method will invoke the registered request context callback and return an available context in an unprepared state.
  Contexts obtained through this method shouldn't be released, instead they should be returned to the origin with a call to ReturnContext.
  This method can be used by the application to implement a context pool, or to perform custom configuration on the contexts that the engine uses internally.
  This can for example be used to debug calls to initialize global variables when building modules, or to detect script exceptions that may occur in script class destructors when called from the garbage collector.
  Call this method to set the default namespace for which the following calls should assume. This applies to registration of the application interface and also to the functions that searches for registered entities.
  Nested namespaces can be informed by separating them with the scope token, i.e. ::
  With this method you can change the way the script engine works in some regards.
  This method is used to set the JIT compiler. The engine will automatically invoke the JIT compiler when it is set after compiling scripts or loading pre-compiled byte code.
  This method sets the callback routine that will receive compiler messages. The callback routine can be either a class method, e.g:
  or a global function, e.g:
  It is recommended to register the message callback routine right after creating the engine, as some of the registration functions can provide useful information to better explain errors.
  The function given with this call will be invoked when a script object instance is destroyed if any user data has been registered with the type.
  The function is called from within the script object destructor, so the callback should not be used for anything but cleaning up the user data itself.
  This method allows the application to associate a value, e.g. a pointer, with the engine instance.
  The type values 1000 through 1999 are reserved for use by the official add-ons.
  Optionally, a callback function can be registered to clean up the user data when the engine is destroyed.
  Call this method when you know it is time to shut down the engine. This will automatically discard all the script modules and run a complete garbage collection cycle.
  Calling this method rather than the ordinary Release method will avoid potential memory leaks if for example there are objects in the modules or garbage collector that indirectly holds a reference to the engine.
  This method can be used by the application to write messages to the same message callback that the script compiler uses. This is useful for example if a preprocessor is used.