angelscript.h File Reference

The API definition for AngelScript. More...


Classes

struct  asSFuncPtr
 Represents a function or method pointer. More...
struct  asSMessageInfo
 Represents a compiler message. More...
class  asIScriptEngine
 The engine interface. More...
class  asIScriptContext
 The interface to the virtual machine. More...
class  asIScriptGeneric
 The interface for the generic calling convention. More...
class  asIScriptStruct
 The interface for a script class or interface. More...
class  asIScriptArray
 The interface for a script array object. More...
class  asIObjectType
 The interface for an object type. More...
class  asIScriptFunction
 The interface for a script function description. More...
class  asIBinaryStream
 A binary stream interface. More...

Defines

#define ANGELSCRIPT_VERSION   21301
 The library version.
#define asFUNCTION(f)   asFunctionPtr(f)
 Returns an asSFuncPtr representing the function specified by the name.
#define asFUNCTIONPR(f, p, r)   asFunctionPtr((void (*)())((r (*)p)(f)))
 Returns an asSFuncPtr representing the function specified by the name, parameter list, and return type.
#define asMETHOD(c, m)   asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m))
 Returns an asSFuncPtr representing the class method specified by class and method name.
#define asMETHODPR(c, m, p, r)   asSMethodPtr<sizeof(void (c::*)())>::Convert((r (c::*)p)(&c::m))
 Returns an asSFuncPtr representing the class method specified by class, method name, parameter list, return type.
#define AS_API
 A define that specifies how the function should be imported.

Typedefs

typedef unsigned char asBYTE
 8 bit unsigned integer
typedef unsigned short asWORD
 16 bit unsigned integer
typedef unsigned int asUINT
 32 bit unsigned integer
typedef size_t asPWORD
 Unsigned integer with the size of a pointer.
typedef unsigned long asDWORD
 32 bit unsigned integer
typedef unsigned __int64 asQWORD
 64 bit unsigned integer
typedef __int64 asINT64
 64 bit integer
typedef void *(* asALLOCFUNC_t )(size_t)
 The function signature for the custom memory allocation function.
typedef void(* asFREEFUNC_t )(void *)
 The function signature for the custom memory deallocation function.

Enumerations

enum  asEEngineProp {
  asEP_ALLOW_UNSAFE_REFERENCES = 1,
  asEP_OPTIMIZE_BYTECODE = 2,
  asEP_COPY_SCRIPT_SECTIONS = 3,
  asEP_MAX_STACK_SIZE = 4,
  asEP_USE_CHARACTER_LITERALS = 5,
  asEP_ALLOW_MULTILINE_STRINGS = 6
}
 Engine properties. More...
enum  asECallConvTypes {
  asCALL_CDECL = 0,
  asCALL_STDCALL = 1,
  asCALL_THISCALL = 2,
  asCALL_CDECL_OBJLAST = 3,
  asCALL_CDECL_OBJFIRST = 4,
  asCALL_GENERIC = 5
}
 Calling conventions. More...
enum  asEObjTypeFlags {
  asOBJ_REF = 0x01,
  asOBJ_VALUE = 0x02,
  asOBJ_GC = 0x04,
  asOBJ_POD = 0x08,
  asOBJ_NOHANDLE = 0x10,
  asOBJ_SCOPED = 0x20,
  asOBJ_APP_CLASS = 0x100,
  asOBJ_APP_CLASS_CONSTRUCTOR = 0x200,
  asOBJ_APP_CLASS_DESTRUCTOR = 0x400,
  asOBJ_APP_CLASS_ASSIGNMENT = 0x800 ,
  asOBJ_APP_PRIMITIVE = 0x1000,
  asOBJ_APP_FLOAT = 0x2000
}
 Object type flags. More...
enum  asEBehaviours {
  asBEHAVE_CONSTRUCT,
  asBEHAVE_DESTRUCT,
  asBEHAVE_FACTORY,
  asBEHAVE_ADDREF,
  asBEHAVE_RELEASE,
  asBEHAVE_VALUE_CAST,
  asBEHAVE_INDEX,
  asBEHAVE_NEGATE ,
  asBEHAVE_ASSIGNMENT = asBEHAVE_FIRST_ASSIGN,
  asBEHAVE_ADD_ASSIGN,
  asBEHAVE_SUB_ASSIGN,
  asBEHAVE_MUL_ASSIGN,
  asBEHAVE_DIV_ASSIGN,
  asBEHAVE_MOD_ASSIGN,
  asBEHAVE_OR_ASSIGN,
  asBEHAVE_AND_ASSIGN,
  asBEHAVE_XOR_ASSIGN,
  asBEHAVE_SLL_ASSIGN,
  asBEHAVE_SRL_ASSIGN,
  asBEHAVE_SRA_ASSIGN ,
  asBEHAVE_ADD = asBEHAVE_FIRST_DUAL,
  asBEHAVE_SUBTRACT,
  asBEHAVE_MULTIPLY,
  asBEHAVE_DIVIDE,
  asBEHAVE_MODULO,
  asBEHAVE_EQUAL,
  asBEHAVE_NOTEQUAL,
  asBEHAVE_LESSTHAN,
  asBEHAVE_GREATERTHAN,
  asBEHAVE_LEQUAL,
  asBEHAVE_GEQUAL,
  asBEHAVE_LOGIC_OR,
  asBEHAVE_LOGIC_AND,
  asBEHAVE_BIT_OR,
  asBEHAVE_BIT_AND,
  asBEHAVE_BIT_XOR,
  asBEHAVE_BIT_SLL,
  asBEHAVE_BIT_SRL,
  asBEHAVE_BIT_SRA ,
  asBEHAVE_REF_CAST,
  asBEHAVE_IMPLICIT_REF_CAST ,
  asBEHAVE_GETREFCOUNT = asBEHAVE_FIRST_GC,
  asBEHAVE_SETGCFLAG,
  asBEHAVE_GETGCFLAG,
  asBEHAVE_ENUMREFS,
  asBEHAVE_RELEASEREFS
}
 Behaviours. More...
enum  asERetCodes {
  asSUCCESS = 0,
  asERROR = -1,
  asCONTEXT_ACTIVE = -2,
  asCONTEXT_NOT_FINISHED = -3,
  asCONTEXT_NOT_PREPARED = -4,
  asINVALID_ARG = -5,
  asNO_FUNCTION = -6,
  asNOT_SUPPORTED = -7,
  asINVALID_NAME = -8,
  asNAME_TAKEN = -9,
  asINVALID_DECLARATION = -10,
  asINVALID_OBJECT = -11,
  asINVALID_TYPE = -12,
  asALREADY_REGISTERED = -13,
  asMULTIPLE_FUNCTIONS = -14,
  asNO_MODULE = -15,
  asNO_GLOBAL_VAR = -16,
  asINVALID_CONFIGURATION = -17,
  asINVALID_INTERFACE = -18,
  asCANT_BIND_ALL_FUNCTIONS = -19,
  asLOWER_ARRAY_DIMENSION_NOT_REGISTERED = -20,
  asWRONG_CONFIG_GROUP = -21,
  asCONFIG_GROUP_IS_IN_USE = -22,
  asILLEGAL_BEHAVIOUR_FOR_TYPE = -23,
  asWRONG_CALLING_CONV = -24,
  asMODULE_IS_IN_USE = -25
}
 Return codes. More...
enum  asEContextState {
  asEXECUTION_FINISHED = 0,
  asEXECUTION_SUSPENDED = 1,
  asEXECUTION_ABORTED = 2,
  asEXECUTION_EXCEPTION = 3,
  asEXECUTION_PREPARED = 4,
  asEXECUTION_UNINITIALIZED = 5,
  asEXECUTION_ACTIVE = 6,
  asEXECUTION_ERROR = 7
}
 Context states. More...
enum  asEExecStrFlags {
  asEXECSTRING_ONLY_PREPARE = 1,
  asEXECSTRING_USE_MY_CONTEXT = 2
}
 ExecuteString flags. More...
enum  asEMsgType {
  asMSGTYPE_ERROR = 0,
  asMSGTYPE_WARNING = 1,
  asMSGTYPE_INFORMATION = 2
}
 Compiler message types. More...

Functions

AS_API asIScriptEngineasCreateScriptEngine (asDWORD version)
 Creates the script engine.
AS_API const char * asGetLibraryVersion ()
 Returns the version of the compiled library.
AS_API const char * asGetLibraryOptions ()
 Returns the options used to compile the library.
AS_API asIScriptContextasGetActiveContext ()
 Returns the currently active context.
AS_API int asThreadCleanup ()
 Cleans up memory allocated for the current thread.
AS_API int asSetGlobalMemoryFunctions (asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc)
 Set the memory management functions that AngelScript should use.
AS_API int asResetGlobalMemoryFunctions ()
 Remove previously registered memory management functions.


Detailed Description

This header file describes the complete application programming interface for AngelScript.

Generated on Sun Aug 17 17:11:12 2008 for AngelScript by  doxygen 1.5.6