52#ifdef AS_USE_NAMESPACE
53 #define BEGIN_AS_NAMESPACE namespace AngelScript {
54 #define END_AS_NAMESPACE }
55 #define AS_NAMESPACE_QUALIFIER AngelScript::
57 #define BEGIN_AS_NAMESPACE
58 #define END_AS_NAMESPACE
59 #define AS_NAMESPACE_QUALIFIER ::
67#define ANGELSCRIPT_VERSION 23800
68#define ANGELSCRIPT_VERSION_STRING "2.38.0 WIP"
128#if (defined(_MSC_VER) && _MSC_VER <= 1200) || defined(__S3E__) || (defined(_MSC_VER) && defined(__clang__))
142#if !defined(_MSC_VER) && (defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_CC) || defined(__psp2__))
653#if defined(__LP64__) || defined(__amd64__) || defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) || defined(_M_ARM64)
659typedef void (*asFUNCTION_t)();
663typedef void *(*asALLOCFUNC_t)(size_t);
699#if !defined(_MSC_VER) || _MSC_VER >= 1700
700 #if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
701 #if !(defined(__GNUC__) && defined(__cplusplus) && __cplusplus < 201103L)
702 #if !defined(__SUNPRO_CC)
704 #define AS_CAN_USE_CPP11 1
716#define asOFFSET(s,m) ((int)(size_t)(&reinterpret_cast<s*>(100000)->m)-100000)
719#define asFUNCTION(f) asFunctionPtr(f)
721#if (defined(_MSC_VER) && _MSC_VER <= 1200) || (defined(__BORLANDC__) && __BORLANDC__ < 0x590)
726#define asFUNCTIONPR(f,p,r) asFunctionPtr((void (*)())((r (*)p)(f)))
728#define asFUNCTIONPR(f,p,r) asFunctionPtr(reinterpret_cast<void (*)()>(static_cast<r (*)p>(f)))
731#ifndef AS_NO_CLASS_METHODS
733class asCUnknownClass;
734typedef void (asCUnknownClass::*asMETHOD_t)();
741 for(
size_t n = 0; n <
sizeof(ptr.dummy); n++ )
746 void CopyMethodPtr(
const void *mthdPtr,
size_t size)
748 for(
size_t n = 0; n < size; n++ )
749 ptr.dummy[n] =
reinterpret_cast<const char *
>(mthdPtr)[n];
758 struct {asMETHOD_t mthd;
char dummy[25-
sizeof(asMETHOD_t)];} m;
759 struct {asFUNCTION_t func;
char dummy[25-
sizeof(asFUNCTION_t)];} f;
764#if defined(__BORLANDC__)
768 #if __BORLANDC__ < 0x590
772 #define AS_METHOD_AMBIGUITY_CAST(t) (t)
775 T _implicit_cast (T val)
777 #define AS_METHOD_AMBIGUITY_CAST(t) AS_NAMESPACE_QUALIFIER _implicit_cast<t >
780 #define AS_METHOD_AMBIGUITY_CAST(t) static_cast<t >
784#define asMETHOD(c,m) asSMethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m))
786#define asMETHODPR(c,m,p,r) asSMethodPtr<sizeof(void (c::*)())>::Convert(AS_METHOD_AMBIGUITY_CAST(r (c::*)p)(&c::m))
794 for(
size_t n = 0; n <
sizeof(ptr.dummy); n++ )
802 struct {asFUNCTION_t func;
char dummy[25-
sizeof(asFUNCTION_t)];} f;
836#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
837 #if defined(ANGELSCRIPT_EXPORT)
838 #define AS_API __declspec(dllexport)
839 #elif defined(ANGELSCRIPT_DLL_LIBRARY_IMPORT)
840 #define AS_API __declspec(dllimport)
844#elif defined(__GNUC__)
845 #if defined(ANGELSCRIPT_EXPORT)
846 #define AS_API __attribute__((visibility ("default")))
854#ifndef ANGELSCRIPT_DLL_MANUAL_IMPORT
1026#ifdef AS_CAN_USE_CPP11
1030#include <type_traits>
1053#if defined(_MSC_VER) || defined(_LIBCPP_TYPE_TRAITS) || (__GNUC__ >= 5) || (defined(__clang__) && !defined(CLANG_PRE_STANDARD))
1056 bool hasConstructor = std::is_default_constructible<T>::value && !std::is_trivially_default_constructible<T>::value;
1057 bool hasDestructor = std::is_destructible<T>::value && !std::is_trivially_destructible<T>::value;
1058 bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::is_trivially_copy_assignable<T>::value;
1059 bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::is_trivially_copy_constructible<T>::value;
1060#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) || (defined(__clang__) && defined(CLANG_PRE_STANDARD))
1062 bool hasConstructor = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
1063 bool hasDestructor = std::is_destructible<T>::value && !std::is_trivially_destructible<T>::value;
1064 bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::has_trivial_copy_assign<T>::value;
1065 bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::has_trivial_copy_constructor<T>::value;
1072 bool hasConstructor = std::is_default_constructible<T>::value && !std::has_trivial_default_constructor<T>::value;
1073 bool hasDestructor = std::is_destructible<T>::value && !std::has_trivial_destructor<T>::value;
1074 bool hasAssignmentOperator = std::is_copy_assignable<T>::value && !std::has_trivial_copy_assign<T>::value;
1075 bool hasCopyConstructor = std::is_copy_constructible<T>::value && !std::has_trivial_copy_constructor<T>::value;
1077 bool isFloat = std::is_floating_point<T>::value;
1078 bool isPrimitive = std::is_integral<T>::value || std::is_pointer<T>::value || std::is_enum<T>::value;
1079 bool isClass = std::is_class<T>::value;
1080 bool isArray = std::is_array<T>::value;
1090 if( hasConstructor )
1094 if( hasAssignmentOperator )
1096 if( hasCopyConstructor )
1345 virtual int GetGlobalPropertyByIndex(
asUINT index,
const char **name,
const char **nameSpace = 0,
int *typeId = 0,
bool *isConst = 0,
const char **configGroup = 0,
void **pointer = 0,
asDWORD *accessMask = 0)
const = 0;
1416 virtual int RegisterObjectProperty(
const char *obj,
const char *declaration,
int byteOffset,
int compositeOffset = 0,
bool isCompositeIndirect =
false) = 0;
1448 virtual int RegisterObjectMethod(
const char *obj,
const char *declaration,
const asSFuncPtr &funcPointer,
asDWORD callConv,
void *auxiliary = 0,
int compositeOffset = 0,
bool isCompositeIndirect =
false) = 0;
2342 virtual int AddScriptSection(
const char *name,
const char *code,
size_t codeLength = 0,
int lineOffset = 0) = 0;
2539 virtual int GetGlobalVar(
asUINT index,
const char **name,
const char **nameSpace = 0,
int *typeId = 0,
bool *isConst = 0)
const = 0;
3308 virtual void *
GetAddressOfVar(
asUINT varIndex,
asUINT stackLevel = 0,
bool dontDereference =
false,
bool returnAddressOfUnitializedObjects =
false) = 0;
3985 virtual int GetProperty(
asUINT index,
const char **name,
int *typeId = 0,
bool *isPrivate = 0,
bool *isProtected = 0,
int *offset = 0,
bool *isReference = 0,
asDWORD *accessMask = 0,
int *compositeOffset = 0,
bool *isCompositeIndirect = 0,
bool *isConst = 0)
const = 0;
4171 virtual const char *
GetDeclaration(
bool includeObjectName =
true,
bool includeNamespace =
false,
bool includeParamNames =
false)
const = 0;
4213 virtual int GetParam(
asUINT index,
int *typeId,
asDWORD *flags = 0,
const char **name = 0,
const char **defaultArg = 0)
const = 0;
4278 virtual int GetVar(
asUINT index,
const char **name,
int *typeId = 0)
const = 0;
4298 virtual int GetDeclaredAt(
const char** scriptSection,
int* row,
int* col)
const = 0;
4401 virtual void Set(
bool val) = 0;
4434 p.ptr.f.func =
reinterpret_cast<asFUNCTION_t
>(size_t(func));
4438 p.ptr.f.func =
reinterpret_cast<asFUNCTION_t
>(func);
4446inline asSFuncPtr asFunctionPtr<asGENFUNC_t>(asGENFUNC_t func)
4450 p.ptr.f.func =
reinterpret_cast<asFUNCTION_t
>(func);
4454#ifndef AS_NO_CLASS_METHODS
4459class asCSimpleDummy {};
4460typedef void (asCSimpleDummy::*asSIMPLEMETHOD_t)();
4461const int SINGLE_PTR_SIZE =
sizeof(asSIMPLEMETHOD_t);
4468 static asSFuncPtr Convert(M Mthd)
4473 int ERROR_UnsupportedMethodPtr[N-100];
4482struct asSMethodPtr<SINGLE_PTR_SIZE>
4485 static asSFuncPtr Convert(M Mthd)
4489 p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE);
4494#if defined(_MSC_VER) && !defined(__MWERKS__)
4498struct asSMethodPtr<SINGLE_PTR_SIZE+1*
sizeof(int)>
4505 p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+
sizeof(
int));
4511struct asSMethodPtr<SINGLE_PTR_SIZE+2*
sizeof(int)>
4521 p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+2*
sizeof(
int));
4526#if defined(_MSC_VER) && !defined(AS_64BIT_PTR)
4544 *(
reinterpret_cast<asDWORD*
>(&p)+3) = *(
reinterpret_cast<asDWORD*
>(&p)+2);
4552struct asSMethodPtr<SINGLE_PTR_SIZE+3*
sizeof(int)>
4559 p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+3*
sizeof(
int));
4565struct asSMethodPtr<SINGLE_PTR_SIZE+4*
sizeof(int)>
4575 p.CopyMethodPtr(&Mthd, SINGLE_PTR_SIZE+4*
sizeof(
int));
5100 asBC_MAXBYTECODE = 201,
5103 asBC_TryBlock = 250,
5208 #define asBCTYPE_PTR_ARG asBCTYPE_DW_ARG
5209 #define asBCTYPE_PTR_DW_ARG asBCTYPE_DW_DW_ARG
5210 #define asBCTYPE_wW_PTR_ARG asBCTYPE_wW_DW_ARG
5211 #define asBCTYPE_rW_PTR_ARG asBCTYPE_rW_DW_ARG
5213 #define AS_PTR_SIZE 1
5216 #define asBCTYPE_PTR_ARG asBCTYPE_QW_ARG
5217 #define asBCTYPE_PTR_DW_ARG asBCTYPE_QW_DW_ARG
5218 #define asBCTYPE_wW_PTR_ARG asBCTYPE_wW_QW_ARG
5219 #define asBCTYPE_rW_PTR_ARG asBCTYPE_rW_QW_ARG
5221 #define AS_PTR_SIZE 2
5225#define asBCINFO(b,t,s) {asBC_##b, asBCTYPE_##t, s, #b}
5226#define asBCINFO_DUMMY(b) {asBC_MAXBYTECODE, asBCTYPE_INFO, 0, "BC_" #b}
5231 asBCINFO(PopPtr, NO_ARG, -AS_PTR_SIZE),
5232 asBCINFO(PshGPtr, PTR_ARG, AS_PTR_SIZE),
5233 asBCINFO(PshC4, DW_ARG, 1),
5234 asBCINFO(PshV4, rW_ARG, 1),
5235 asBCINFO(PSF, rW_ARG, AS_PTR_SIZE),
5236 asBCINFO(SwapPtr, NO_ARG, 0),
5237 asBCINFO(NOT, rW_ARG, 0),
5238 asBCINFO(PshG4, PTR_ARG, 1),
5239 asBCINFO(LdGRdR4, wW_PTR_ARG, 0),
5240 asBCINFO(CALL, DW_ARG, 0xFFFF),
5241 asBCINFO(RET, W_ARG, 0xFFFF),
5242 asBCINFO(JMP, DW_ARG, 0),
5243 asBCINFO(JZ, DW_ARG, 0),
5244 asBCINFO(JNZ, DW_ARG, 0),
5245 asBCINFO(JS, DW_ARG, 0),
5246 asBCINFO(JNS, DW_ARG, 0),
5247 asBCINFO(JP, DW_ARG, 0),
5248 asBCINFO(JNP, DW_ARG, 0),
5249 asBCINFO(TZ, NO_ARG, 0),
5250 asBCINFO(TNZ, NO_ARG, 0),
5251 asBCINFO(TS, NO_ARG, 0),
5252 asBCINFO(TNS, NO_ARG, 0),
5253 asBCINFO(TP, NO_ARG, 0),
5254 asBCINFO(TNP, NO_ARG, 0),
5255 asBCINFO(NEGi, rW_ARG, 0),
5256 asBCINFO(NEGf, rW_ARG, 0),
5257 asBCINFO(NEGd, rW_ARG, 0),
5258 asBCINFO(INCi16, NO_ARG, 0),
5259 asBCINFO(INCi8, NO_ARG, 0),
5260 asBCINFO(DECi16, NO_ARG, 0),
5261 asBCINFO(DECi8, NO_ARG, 0),
5262 asBCINFO(INCi, NO_ARG, 0),
5263 asBCINFO(DECi, NO_ARG, 0),
5264 asBCINFO(INCf, NO_ARG, 0),
5265 asBCINFO(DECf, NO_ARG, 0),
5266 asBCINFO(INCd, NO_ARG, 0),
5267 asBCINFO(DECd, NO_ARG, 0),
5268 asBCINFO(IncVi, rW_ARG, 0),
5269 asBCINFO(DecVi, rW_ARG, 0),
5270 asBCINFO(BNOT, rW_ARG, 0),
5271 asBCINFO(BAND, wW_rW_rW_ARG, 0),
5272 asBCINFO(BOR, wW_rW_rW_ARG, 0),
5273 asBCINFO(BXOR, wW_rW_rW_ARG, 0),
5274 asBCINFO(BSLL, wW_rW_rW_ARG, 0),
5275 asBCINFO(BSRL, wW_rW_rW_ARG, 0),
5276 asBCINFO(BSRA, wW_rW_rW_ARG, 0),
5277 asBCINFO(COPY, W_DW_ARG, -AS_PTR_SIZE),
5278 asBCINFO(PshC8, QW_ARG, 2),
5279 asBCINFO(PshVPtr, rW_ARG, AS_PTR_SIZE),
5280 asBCINFO(RDSPtr, NO_ARG, 0),
5281 asBCINFO(CMPd, rW_rW_ARG, 0),
5282 asBCINFO(CMPu, rW_rW_ARG, 0),
5283 asBCINFO(CMPf, rW_rW_ARG, 0),
5284 asBCINFO(CMPi, rW_rW_ARG, 0),
5285 asBCINFO(CMPIi, rW_DW_ARG, 0),
5286 asBCINFO(CMPIf, rW_DW_ARG, 0),
5287 asBCINFO(CMPIu, rW_DW_ARG, 0),
5288 asBCINFO(JMPP, rW_ARG, 0),
5289 asBCINFO(PopRPtr, NO_ARG, -AS_PTR_SIZE),
5290 asBCINFO(PshRPtr, NO_ARG, AS_PTR_SIZE),
5291 asBCINFO(STR, W_ARG, 1+AS_PTR_SIZE),
5292 asBCINFO(CALLSYS, DW_ARG, 0xFFFF),
5293 asBCINFO(CALLBND, DW_ARG, 0xFFFF),
5294 asBCINFO(SUSPEND, NO_ARG, 0),
5295 asBCINFO(ALLOC, PTR_DW_ARG, 0xFFFF),
5296 asBCINFO(FREE, wW_PTR_ARG, 0),
5297 asBCINFO(LOADOBJ, rW_ARG, 0),
5298 asBCINFO(STOREOBJ, wW_ARG, 0),
5299 asBCINFO(GETOBJ, W_ARG, 0),
5300 asBCINFO(REFCPY, PTR_ARG, -AS_PTR_SIZE),
5301 asBCINFO(CHKREF, NO_ARG, 0),
5302 asBCINFO(GETOBJREF, W_ARG, 0),
5303 asBCINFO(GETREF, W_ARG, 0),
5304 asBCINFO(PshNull, NO_ARG, AS_PTR_SIZE),
5305 asBCINFO(ClrVPtr, wW_ARG, 0),
5306 asBCINFO(OBJTYPE, PTR_ARG, AS_PTR_SIZE),
5307 asBCINFO(TYPEID, DW_ARG, 1),
5308 asBCINFO(SetV4, wW_DW_ARG, 0),
5309 asBCINFO(SetV8, wW_QW_ARG, 0),
5310 asBCINFO(ADDSi, W_DW_ARG, 0),
5311 asBCINFO(CpyVtoV4, wW_rW_ARG, 0),
5312 asBCINFO(CpyVtoV8, wW_rW_ARG, 0),
5313 asBCINFO(CpyVtoR4, rW_ARG, 0),
5314 asBCINFO(CpyVtoR8, rW_ARG, 0),
5315 asBCINFO(CpyVtoG4, rW_PTR_ARG, 0),
5316 asBCINFO(CpyRtoV4, wW_ARG, 0),
5317 asBCINFO(CpyRtoV8, wW_ARG, 0),
5318 asBCINFO(CpyGtoV4, wW_PTR_ARG, 0),
5319 asBCINFO(WRTV1, rW_ARG, 0),
5320 asBCINFO(WRTV2, rW_ARG, 0),
5321 asBCINFO(WRTV4, rW_ARG, 0),
5322 asBCINFO(WRTV8, rW_ARG, 0),
5323 asBCINFO(RDR1, wW_ARG, 0),
5324 asBCINFO(RDR2, wW_ARG, 0),
5325 asBCINFO(RDR4, wW_ARG, 0),
5326 asBCINFO(RDR8, wW_ARG, 0),
5327 asBCINFO(LDG, PTR_ARG, 0),
5328 asBCINFO(LDV, rW_ARG, 0),
5329 asBCINFO(PGA, PTR_ARG, AS_PTR_SIZE),
5330 asBCINFO(CmpPtr, rW_rW_ARG, 0),
5331 asBCINFO(VAR, rW_ARG, AS_PTR_SIZE),
5332 asBCINFO(iTOf, rW_ARG, 0),
5333 asBCINFO(fTOi, rW_ARG, 0),
5334 asBCINFO(uTOf, rW_ARG, 0),
5335 asBCINFO(fTOu, rW_ARG, 0),
5336 asBCINFO(sbTOi, rW_ARG, 0),
5337 asBCINFO(swTOi, rW_ARG, 0),
5338 asBCINFO(ubTOi, rW_ARG, 0),
5339 asBCINFO(uwTOi, rW_ARG, 0),
5340 asBCINFO(dTOi, wW_rW_ARG, 0),
5341 asBCINFO(dTOu, wW_rW_ARG, 0),
5342 asBCINFO(dTOf, wW_rW_ARG, 0),
5343 asBCINFO(iTOd, wW_rW_ARG, 0),
5344 asBCINFO(uTOd, wW_rW_ARG, 0),
5345 asBCINFO(fTOd, wW_rW_ARG, 0),
5346 asBCINFO(ADDi, wW_rW_rW_ARG, 0),
5347 asBCINFO(SUBi, wW_rW_rW_ARG, 0),
5348 asBCINFO(MULi, wW_rW_rW_ARG, 0),
5349 asBCINFO(DIVi, wW_rW_rW_ARG, 0),
5350 asBCINFO(MODi, wW_rW_rW_ARG, 0),
5351 asBCINFO(ADDf, wW_rW_rW_ARG, 0),
5352 asBCINFO(SUBf, wW_rW_rW_ARG, 0),
5353 asBCINFO(MULf, wW_rW_rW_ARG, 0),
5354 asBCINFO(DIVf, wW_rW_rW_ARG, 0),
5355 asBCINFO(MODf, wW_rW_rW_ARG, 0),
5356 asBCINFO(ADDd, wW_rW_rW_ARG, 0),
5357 asBCINFO(SUBd, wW_rW_rW_ARG, 0),
5358 asBCINFO(MULd, wW_rW_rW_ARG, 0),
5359 asBCINFO(DIVd, wW_rW_rW_ARG, 0),
5360 asBCINFO(MODd, wW_rW_rW_ARG, 0),
5361 asBCINFO(ADDIi, wW_rW_DW_ARG, 0),
5362 asBCINFO(SUBIi, wW_rW_DW_ARG, 0),
5363 asBCINFO(MULIi, wW_rW_DW_ARG, 0),
5364 asBCINFO(ADDIf, wW_rW_DW_ARG, 0),
5365 asBCINFO(SUBIf, wW_rW_DW_ARG, 0),
5366 asBCINFO(MULIf, wW_rW_DW_ARG, 0),
5367 asBCINFO(SetG4, PTR_DW_ARG, 0),
5368 asBCINFO(ChkRefS, NO_ARG, 0),
5369 asBCINFO(ChkNullV, rW_ARG, 0),
5370 asBCINFO(CALLINTF, DW_ARG, 0xFFFF),
5371 asBCINFO(iTOb, rW_ARG, 0),
5372 asBCINFO(iTOw, rW_ARG, 0),
5373 asBCINFO(SetV1, wW_DW_ARG, 0),
5374 asBCINFO(SetV2, wW_DW_ARG, 0),
5375 asBCINFO(Cast, DW_ARG, -AS_PTR_SIZE),
5376 asBCINFO(i64TOi, wW_rW_ARG, 0),
5377 asBCINFO(uTOi64, wW_rW_ARG, 0),
5378 asBCINFO(iTOi64, wW_rW_ARG, 0),
5379 asBCINFO(fTOi64, wW_rW_ARG, 0),
5380 asBCINFO(dTOi64, rW_ARG, 0),
5381 asBCINFO(fTOu64, wW_rW_ARG, 0),
5382 asBCINFO(dTOu64, rW_ARG, 0),
5383 asBCINFO(i64TOf, wW_rW_ARG, 0),
5384 asBCINFO(u64TOf, wW_rW_ARG, 0),
5385 asBCINFO(i64TOd, rW_ARG, 0),
5386 asBCINFO(u64TOd, rW_ARG, 0),
5387 asBCINFO(NEGi64, rW_ARG, 0),
5388 asBCINFO(INCi64, NO_ARG, 0),
5389 asBCINFO(DECi64, NO_ARG, 0),
5390 asBCINFO(BNOT64, rW_ARG, 0),
5391 asBCINFO(ADDi64, wW_rW_rW_ARG, 0),
5392 asBCINFO(SUBi64, wW_rW_rW_ARG, 0),
5393 asBCINFO(MULi64, wW_rW_rW_ARG, 0),
5394 asBCINFO(DIVi64, wW_rW_rW_ARG, 0),
5395 asBCINFO(MODi64, wW_rW_rW_ARG, 0),
5396 asBCINFO(BAND64, wW_rW_rW_ARG, 0),
5397 asBCINFO(BOR64, wW_rW_rW_ARG, 0),
5398 asBCINFO(BXOR64, wW_rW_rW_ARG, 0),
5399 asBCINFO(BSLL64, wW_rW_rW_ARG, 0),
5400 asBCINFO(BSRL64, wW_rW_rW_ARG, 0),
5401 asBCINFO(BSRA64, wW_rW_rW_ARG, 0),
5402 asBCINFO(CMPi64, rW_rW_ARG, 0),
5403 asBCINFO(CMPu64, rW_rW_ARG, 0),
5404 asBCINFO(ChkNullS, W_ARG, 0),
5405 asBCINFO(ClrHi, NO_ARG, 0),
5406 asBCINFO(JitEntry, PTR_ARG, 0),
5407 asBCINFO(CallPtr, rW_ARG, 0xFFFF),
5408 asBCINFO(FuncPtr, PTR_ARG, AS_PTR_SIZE),
5409 asBCINFO(LoadThisR, W_DW_ARG, 0),
5410 asBCINFO(PshV8, rW_ARG, 2),
5411 asBCINFO(DIVu, wW_rW_rW_ARG, 0),
5412 asBCINFO(MODu, wW_rW_rW_ARG, 0),
5413 asBCINFO(DIVu64, wW_rW_rW_ARG, 0),
5414 asBCINFO(MODu64, wW_rW_rW_ARG, 0),
5415 asBCINFO(LoadRObjR, rW_W_DW_ARG, 0),
5416 asBCINFO(LoadVObjR, rW_W_DW_ARG, 0),
5417 asBCINFO(RefCpyV, wW_PTR_ARG, 0),
5418 asBCINFO(JLowZ, DW_ARG, 0),
5419 asBCINFO(JLowNZ, DW_ARG, 0),
5420 asBCINFO(AllocMem, wW_DW_ARG, 0),
5421 asBCINFO(SetListSize, rW_DW_DW_ARG, 0),
5422 asBCINFO(PshListElmnt, rW_DW_ARG, AS_PTR_SIZE),
5423 asBCINFO(SetListType, rW_DW_DW_ARG, 0),
5424 asBCINFO(POWi, wW_rW_rW_ARG, 0),
5425 asBCINFO(POWu, wW_rW_rW_ARG, 0),
5426 asBCINFO(POWf, wW_rW_rW_ARG, 0),
5427 asBCINFO(POWd, wW_rW_rW_ARG, 0),
5428 asBCINFO(POWdi, wW_rW_rW_ARG, 0),
5429 asBCINFO(POWi64, wW_rW_rW_ARG, 0),
5430 asBCINFO(POWu64, wW_rW_rW_ARG, 0),
5431 asBCINFO(Thiscall1, DW_ARG, -AS_PTR_SIZE-1),
5433 asBCINFO_DUMMY(201),
5434 asBCINFO_DUMMY(202),
5435 asBCINFO_DUMMY(203),
5436 asBCINFO_DUMMY(204),
5437 asBCINFO_DUMMY(205),
5438 asBCINFO_DUMMY(206),
5439 asBCINFO_DUMMY(207),
5440 asBCINFO_DUMMY(208),
5441 asBCINFO_DUMMY(209),
5442 asBCINFO_DUMMY(210),
5443 asBCINFO_DUMMY(211),
5444 asBCINFO_DUMMY(212),
5445 asBCINFO_DUMMY(213),
5446 asBCINFO_DUMMY(214),
5447 asBCINFO_DUMMY(215),
5448 asBCINFO_DUMMY(216),
5449 asBCINFO_DUMMY(217),
5450 asBCINFO_DUMMY(218),
5451 asBCINFO_DUMMY(219),
5452 asBCINFO_DUMMY(220),
5453 asBCINFO_DUMMY(221),
5454 asBCINFO_DUMMY(222),
5455 asBCINFO_DUMMY(223),
5456 asBCINFO_DUMMY(224),
5457 asBCINFO_DUMMY(225),
5458 asBCINFO_DUMMY(226),
5459 asBCINFO_DUMMY(227),
5460 asBCINFO_DUMMY(228),
5461 asBCINFO_DUMMY(229),
5462 asBCINFO_DUMMY(230),
5463 asBCINFO_DUMMY(231),
5464 asBCINFO_DUMMY(232),
5465 asBCINFO_DUMMY(233),
5466 asBCINFO_DUMMY(234),
5467 asBCINFO_DUMMY(235),
5468 asBCINFO_DUMMY(236),
5469 asBCINFO_DUMMY(237),
5470 asBCINFO_DUMMY(238),
5471 asBCINFO_DUMMY(239),
5472 asBCINFO_DUMMY(240),
5473 asBCINFO_DUMMY(241),
5474 asBCINFO_DUMMY(242),
5475 asBCINFO_DUMMY(243),
5476 asBCINFO_DUMMY(244),
5477 asBCINFO_DUMMY(245),
5478 asBCINFO_DUMMY(246),
5479 asBCINFO_DUMMY(247),
5480 asBCINFO_DUMMY(248),
5481 asBCINFO_DUMMY(249),
5483 asBCINFO(TryBlock, DW_ARG, 0),
5484 asBCINFO(VarDecl, W_ARG, 0),
5485 asBCINFO(Block, INFO, 0),
5486 asBCINFO(ObjInfo, rW_DW_ARG, 0),
5487 asBCINFO(LINE, INFO, 0),
5488 asBCINFO(LABEL, INFO, 0)
5493#define asBC_DWORDARG(x) (*(((asDWORD*)x)+1))
5495#define asBC_INTARG(x) (*(int*)(((asDWORD*)x)+1))
5497#define asBC_QWORDARG(x) (*(asQWORD*)(((asDWORD*)x)+1))
5499#define asBC_FLOATARG(x) (*(float*)(((asDWORD*)x)+1))
5501#define asBC_PTRARG(x) (*(asPWORD*)(((asDWORD*)x)+1))
5503#define asBC_WORDARG0(x) (*(((asWORD*)x)+1))
5505#define asBC_WORDARG1(x) (*(((asWORD*)x)+2))
5507#define asBC_SWORDARG0(x) (*(((short*)x)+1))
5509#define asBC_SWORDARG1(x) (*(((short*)x)+2))
5511#define asBC_SWORDARG2(x) (*(((short*)x)+3))
asETokenClass
Token classes.
@ asTC_UNKNOWN
Unknown token.
@ asTC_VALUE
Literal value token.
@ asTC_WHITESPACE
White space token.
@ asTC_KEYWORD
Keyword token.
@ asTC_COMMENT
Comment token.
@ asTC_IDENTIFIER
Identifier token.
signed short asINT16
16 bit signed integer
asEBCType
Describes the structure of a bytecode instruction.
@ asBCTYPE_QW_DW_ARG
Instruction + QWORD arg + DWORD arg.
@ asBCTYPE_wW_W_ARG
Instruction + WORD arg (dest var) + WORD arg.
@ asBCTYPE_rW_W_DW_ARG
Instruction + WORD arg(source var) + WORD arg + DWORD arg.
@ asBCTYPE_W_ARG
Instruction + WORD arg.
@ asBCTYPE_W_DW_ARG
Instruction + WORD arg + DWORD arg.
@ asBCTYPE_wW_ARG
Instruction + WORD arg (dest var)
@ asBCTYPE_rW_rW_ARG
Instruction + WORD arg (source var) + WORD arg (source var)
@ asBCTYPE_NO_ARG
Instruction + no args.
@ asBCTYPE_wW_rW_rW_ARG
Instruction + WORD arg (dest var) + WORD arg (source var) + WORD arg (source var)
@ asBCTYPE_rW_ARG
Instruction + WORD arg (source var)
@ asBCTYPE_wW_rW_ARG
Instruction + WORD arg (dest var) + WORD arg (source var)
@ asBCTYPE_QW_ARG
Instruction + QWORD arg.
@ asBCTYPE_rW_DW_ARG
Instruction + WORD arg (source var) + DWORD arg.
@ asBCTYPE_wW_rW_DW_ARG
Instruction + WORD arg (dest var) + WORD arg (source var) + DWORD arg.
@ asBCTYPE_rW_QW_ARG
Instruction + WORD arg (source var) + QWORD arg.
@ asBCTYPE_DW_DW_ARG
Instruction + DWORD arg + DWORD arg.
@ asBCTYPE_wW_DW_ARG
Instruction + WORD arg (dest var) + DWORD arg.
@ asBCTYPE_DW_ARG
Instruction + DWORD arg.
@ asBCTYPE_wW_QW_ARG
Instruction + WORD arg (dest var) + QWORD arg.
@ asBCTYPE_rW_DW_DW_ARG
Instruction + WORD arg(source var) + DWORD arg + DWORD arg.
asEFuncType
Function types.
@ asFUNC_DELEGATE
A function delegate.
@ asFUNC_TEMPLATE
A template function.
@ asFUNC_FUNCDEF
A function definition.
@ asFUNC_IMPORTED
An imported function.
@ asFUNC_SYSTEM
An application registered function.
@ asFUNC_INTERFACE
An interface method.
@ asFUNC_SCRIPT
A script implemented function.
@ asFUNC_VIRTUAL
A virtual method for script classes.
unsigned __int64 asQWORD
64 bit unsigned integer
unsigned int asUINT
32 bit unsigned integer
asECompileFlags
Flags for compilation.
@ asCOMP_ADD_TO_MODULE
The compiled function should be added to the scope of the module.
asETypeModifiers
Type modifiers.
@ asTM_INREF
Input reference.
@ asTM_OUTREF
Output reference.
@ asTM_NONE
No modification.
@ asTM_INOUTREF
In/out reference.
asECallConvTypes
Calling conventions.
@ asCALL_STDCALL
A stdcall function.
@ asCALL_THISCALL_OBJLAST
A thiscall class method registered as a functor object.
@ asCALL_THISCALL_OBJFIRST
A thiscall class method registered as a functor object.
@ asCALL_CDECL
A cdecl function.
@ asCALL_GENERIC
A function using the generic calling convention.
@ asCALL_CDECL_OBJFIRST
A cdecl function that takes the object pointer as the first parameter.
@ asCALL_THISCALL_ASGLOBAL
A thiscall class method registered as a global function.
@ asCALL_CDECL_OBJLAST
A cdecl function that takes the object pointer as the last parameter.
@ asCALL_THISCALL
A thiscall class method.
void(* asRETURNCONTEXTFUNC_t)(asIScriptEngine *, asIScriptContext *, void *)
The function signature for the return context callback.
unsigned short asWORD
16 bit unsigned integer
@ asEP_SCRIPT_SCANNER
Select scanning method: 0 - ASCII, 1 - UTF8. Default: 1 (UTF8).
@ asEP_FOREACH_SUPPORT
Enable foreach support. Default: true.
@ asEP_ALWAYS_IMPL_DEFAULT_COPY
Determine if the default copy behaviour is provided automatically by compiler. 0 - as per language sp...
@ asEP_MAX_STACK_SIZE
Maximum stack size in bytes for script contexts. Default: 0 (no limit).
@ asEP_BOOL_CONVERSION_MODE
Determine how boolean conversion are done. 0 - only use opImplConv for registered value type,...
@ asEP_ALLOW_MULTILINE_STRINGS
Allow linebreaks in string constants. Default: false.
@ asEP_NO_DEBUG_OUTPUT
Don't write debug output when library is compiled with AS_DEBUG. Default: false.
@ asEP_IGNORE_DUPLICATE_SHARED_INTF
Ignore multiple declarations of shared interface. Default: false.
@ asEP_MAX_CALL_STACK_SIZE
Maximum call stack size for script contexts. Default: 0 (no limit)
@ asEP_EXPAND_DEF_ARRAY_TO_TMPL
Format default array in template form in messages and declarations. Default: false.
@ asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE
Disallow value assignment for reference types to avoid ambiguity. Default: false.
@ asEP_GENERIC_CALL_MODE
Define how generic calling convention treats handles: 0 - ignore auto handles, 1 - treat them the sam...
@ asEP_OPTIMIZE_BYTECODE
Optimize byte code. Default: true.
@ asEP_ALLOW_UNICODE_IDENTIFIERS
When true, the compiler will not give an error if identifiers contain characters with byte value abov...
@ asEP_INIT_STACK_SIZE
Initial stack size in bytes for script contexts. Default: 4096.
@ asEP_ALWAYS_IMPL_DEFAULT_CONSTRUCT
Determine if the default constructor is provided automatically by compiler. 0 - as per language spec,...
@ asEP_USE_CHARACTER_LITERALS
Interpret single quoted strings as character literals. Default: false.
@ asEP_BUILD_WITHOUT_LINE_CUES
Remove SUSPEND instructions between each statement. Default: false.
@ asEP_ALLOW_IMPLICIT_HANDLE_TYPES
Allow script to declare implicit handle types. Default: false.
@ asEP_INCLUDE_JIT_INSTRUCTIONS
When set extra bytecode instructions needed for JIT compiled funcions will be included....
@ asEP_MEMBER_INIT_MODE
Determine how class members with init expressions are handled. 0 - pre 2.38.0, members with init expr...
@ asEP_ALLOW_UNSAFE_REFERENCES
Allow unsafe references. Default: false.
@ asEP_REQUIRE_ENUM_SCOPE
When set the enum values must be prefixed with the enum type. Default: false.
@ asEP_HEREDOC_TRIM_MODE
Define how heredoc strings will be trimmed by the compiler: 0 - never trim, 1 - trim if multiple line...
@ asEP_AUTO_GARBAGE_COLLECT
Enable or disable automatic garbage collection. Default: true.
@ asEP_ALTER_SYNTAX_NAMED_ARGS
Change the script syntax for named arguments: 0 - no change, 1 - accept '=' but warn,...
@ asEP_PRIVATE_PROP_AS_PROTECTED
When true, private properties behave like protected properties. Default: false.
@ asEP_INIT_CALL_STACK_SIZE
Initial call stack size for script contexts. Default: 10.
@ asEP_MAX_NESTED_CALLS
Define the maximum number of nested calls the script engine will allow. Default: 100.
@ asEP_STRING_ENCODING
Select string encoding for literals: 0 - UTF8/ASCII, 1 - UTF16. Default: 0 (UTF8)
@ asEP_DISALLOW_GLOBAL_VARS
Disallow the use of global variables in the script. Default: false.
@ asEP_DISALLOW_EMPTY_LIST_ELEMENTS
When true, the initialization lists may not contain empty elements. Default: false.
@ asEP_COPY_SCRIPT_SECTIONS
Copy script section memory. Default: true.
@ asEP_ALWAYS_IMPL_DEFAULT_COPY_CONSTRUCT
Determine if the default copy constructor is provided automatically by compiler. 0 - as per language ...
@ asEP_DISABLE_SCRIPT_CLASS_GC
Disable GC for classes compiled from scripts. Default: false.
@ asEP_INIT_GLOBAL_VARS_AFTER_BUILD
Initialize global variables after a build. Default: true.
@ asEP_PROPERTY_ACCESSOR_MODE
Enable or disable property accessors: 0 - no accessors, 1 - app registered accessors only,...
@ asEP_COMPILER_WARNINGS
Set how warnings should be treated: 0 - dismiss, 1 - emit, 2 - treat as error. Default: 1.
@ asEP_DISABLE_INTEGER_DIVISION
When true, the / and /= operators will perform floating-point division (i.e. 1/2 = 0....
@ asEP_JIT_INTERFACE_VERSION
Set the JIT interface version used. 1 - JIT compiler uses asJITCompiler, 2 - JIT compiler uses asJITC...
void(* asCLEANMODULEFUNC_t)(asIScriptModule *)
The function signature for the module cleanup callback function.
#define AS_API
A define that specifies how the function should be imported.
void(* asCLEANFUNCTIONFUNC_t)(asIScriptFunction *)
The function signature for the function cleanup callback function.
@ asNAME_TAKEN
The name is already taken.
@ asINVALID_ARG
Invalid argument.
@ asWRONG_CALLING_CONV
The specified calling convention doesn't match the function/method pointer.
@ asCANT_BIND_ALL_FUNCTIONS
All imported functions couldn't be bound.
@ asINVALID_TYPE
Invalid type.
@ asNO_MODULE
The module was not found.
@ asINIT_GLOBAL_VARS_FAILED
The initialization of global variables failed.
@ asILLEGAL_BEHAVIOUR_FOR_TYPE
Illegal behaviour for the type.
@ asINVALID_CONFIGURATION
Invalid configuration.
@ asALREADY_REGISTERED
Already registered.
@ asCONTEXT_NOT_PREPARED
The context is not prepared.
@ asINVALID_NAME
Invalid name.
@ asINVALID_INTERFACE
Invalid interface.
@ asNOT_SUPPORTED
Not supported.
@ asOUT_OF_MEMORY
It wasn't possible to allocate the needed memory.
@ asNO_GLOBAL_VAR
The global variable was not found.
@ asCONTEXT_ACTIVE
The context is active.
@ asINVALID_OBJECT
Invalid object.
@ asCONTEXT_NOT_FINISHED
The context is not finished.
@ asLOWER_ARRAY_DIMENSION_NOT_REGISTERED
The array sub type has not been registered yet.
@ asINVALID_DECLARATION
Invalid declaration.
@ asBUILD_IN_PROGRESS
A build is currently in progress.
@ asMULTIPLE_FUNCTIONS
Multiple matching functions.
@ asWRONG_CONFIG_GROUP
Wrong configuration group.
@ asNO_FUNCTION
The function was not found.
@ asCONFIG_GROUP_IS_IN_USE
The configuration group is in use.
@ asMODULE_IS_IN_USE
The module is referred to by live objects or from the application.
void(* asCLEANCONTEXTFUNC_t)(asIScriptContext *)
The function signature for the context cleanup callback function.
@ asBEHAVE_LIST_CONSTRUCT
Constructor used exclusively for initialization lists.
@ asBEHAVE_DESTRUCT
Destructor.
@ asBEHAVE_ENUMREFS
(GC) Enumerate held references
@ asBEHAVE_FACTORY
Factory.
@ asBEHAVE_RELEASEREFS
(GC) Release all references
@ asBEHAVE_RELEASE
Release.
@ asBEHAVE_GET_WEAKREF_FLAG
Obtain weak ref flag.
@ asBEHAVE_TEMPLATE_CALLBACK
Callback for validating template instances.
@ asBEHAVE_CONSTRUCT
Constructor.
@ asBEHAVE_SETGCFLAG
(GC) Set GC flag
@ asBEHAVE_GETGCFLAG
(GC) Get GC flag
@ asBEHAVE_LIST_FACTORY
Factory used exclusively for initialization lists.
@ asBEHAVE_GETREFCOUNT
(GC) Get reference count
asEContextState
Context states.
@ asEXECUTION_UNINITIALIZED
The context is not initialized.
@ asEXECUTION_ACTIVE
The context is currently executing a function call.
@ asEXECUTION_FINISHED
The context has successfully completed the execution.
@ asEXECUTION_ABORTED
The execution was aborted by the application.
@ asEXECUTION_DESERIALIZATION
The context is currently in deserialization mode.
@ asEXECUTION_SUSPENDED
The execution is suspended and can be resumed.
@ asEXECUTION_ERROR
The context has encountered an error and must be reinitialized.
@ asEXECUTION_EXCEPTION
The execution was terminated by an unhandled script exception.
@ asEXECUTION_PREPARED
The context has been prepared for a new execution.
__int64 asINT64
64 bit integer
asEMsgType
Compiler message types.
@ asMSGTYPE_WARNING
The message is a warning.
@ asMSGTYPE_ERROR
The message is an error.
@ asMSGTYPE_INFORMATION
The message is informational only.
signed int asINT32
32 bit signed integer
uintptr_t asPWORD
Unsigned integer with the size of a pointer.
#define ANGELSCRIPT_VERSION
Version 2.38.0.
asEObjTypeFlags
Object type flags.
@ asOBJ_ENUM
The type is an enum.
@ asOBJ_APP_CLASS
The C++ type is a class type. Only valid for value types.
@ asOBJ_APP_CLASS_ALLFLOATS
The C++ class can be treated as if all its members are floats or doubles.
@ asOBJ_APP_CLASS_CDAK
The C++ type is a class with a constructor, destructor, assignment operator, and copy constructor.
@ asOBJ_APP_CLASS_UNION
The C++ class contains unions. Only valid for value types.
@ asOBJ_APP_CLASS_DESTRUCTOR
The C++ class has an explicit destructor. Only valid for value types.
@ asOBJ_APP_CLASS_ALIGN8
The C++ class contains types that may require 8byte alignment. Only valid for value types.
@ asOBJ_APP_CLASS_CDK
The C++ type is a class with a constructor, destructor, and copy constructor.
@ asOBJ_APP_CLASS_D
The C++ type is a class with a destructor.
@ asOBJ_APP_CLASS_DA
The C++ type is a class with a destructor and assignment operator.
@ asOBJ_APP_CLASS_C
The C++ type is a class with a constructor.
@ asOBJ_APP_CLASS_DAK
The C++ type is a class with a destructor, assignment operator, and copy constructor.
@ asOBJ_APP_CLASS_MORE_CONSTRUCTORS
The C++ class has additional constructors beyond the default and copy constructors.
@ asOBJ_APP_PRIMITIVE
The C++ type is a primitive type. Only valid for value types.
@ asOBJ_APP_CLASS_K
The C++ type is a class with a copy constructor.
@ asOBJ_FUNCDEF
The type is a script funcdef.
@ asOBJ_APP_CLASS_ALLINTS
The C++ class can be treated as if all its members are integers.
@ asOBJ_APP_CLASS_CK
The C++ type is a class with a constructor and copy constructor.
@ asOBJ_MASK_VALID_FLAGS
This mask shows which flags are value for RegisterObjectType.
@ asOBJ_APP_CLASS_ASSIGNMENT
The C++ class has an explicit assignment operator. Only valid for value types.
@ asOBJ_NOINHERIT
The object type is marked as final and cannot be inherited.
@ asOBJ_APP_CLASS_AK
The C++ type is a class with an assignment operator and copy constructor.
@ asOBJ_ABSTRACT
The class is abstract, i.e. cannot be instantiated.
@ asOBJ_APP_FLOAT
The C++ type is a float or double. Only valid for value types.
@ asOBJ_APP_ARRAY
The C++ type is a static array. Only valid for value types.
@ asOBJ_POD
A plain-old-data type. Only valid for value types.
@ asOBJ_TEMPLATE_SUBTYPE
Internal type. Do no use.
@ asOBJ_APP_CLASS_CA
The C++ type is a class with a constructor and assignment operator.
@ asOBJ_SHARED
Type object type is shared between modules.
@ asOBJ_APP_CLASS_COPY_CONSTRUCTOR
The C++ class has an explicit copy constructor. Only valid for value types.
@ asOBJ_REF
A reference type.
@ asOBJ_APP_CLASS_CAK
The C++ type is a class with a constructor, assignment operator, and copy constructor.
@ asOBJ_VALUE
A value type.
@ asOBJ_LIST_PATTERN
Internal type. Do not use.
@ asOBJ_SCRIPT_OBJECT
The object is a script class or an interface.
@ asOBJ_SCOPED
The life time of objects of this type are controlled by the scope of the variable....
@ asOBJ_APP_CLASS_DK
The C++ type is a class with a destructor and copy constructor.
@ asOBJ_APP_ALIGN16
Reserved for future use.
@ asOBJ_GC
A garbage collected type. Only valid for reference types.
@ asOBJ_NOCOUNT
The type doesn't use reference counting. Only valid for reference types.
@ asOBJ_TYPEDEF
The type is a typedef.
@ asOBJ_ASHANDLE
The value type should be treated as a handle.
@ asOBJ_APP_CLASS_CDA
The C++ type is a class with a constructor, destructor, and assignment operator.
@ asOBJ_TEMPLATE
A template type.
@ asOBJ_IMPLICIT_HANDLE
The object is declared for implicit handle. Only valid for reference types.
@ asOBJ_APP_CLASS_CD
The C++ type is a class with a constructor and destructor.
@ asOBJ_APP_CLASS_A
The C++ type is a class with an assignment operator.
@ asOBJ_NOHANDLE
This reference type doesn't allow handles to be held. Only valid for reference types.
@ asOBJ_APP_CLASS_CONSTRUCTOR
The C++ class has an explicit constructor. Only valid for value types.
const int asBCTypeSize[21]
Lookup table for determining the size of each type of bytecode instruction.
void(* asCLEANENGINEFUNC_t)(asIScriptEngine *)
The function signature for the engine cleanup callback function.
asEBCInstr
The bytecode instructions used by the VM.
@ asBC_TS
If the value register is less than 0 set it to 1.
@ asBC_DIVd
Divide the values of two double variables and store in a third variable.
@ asBC_NEGi
Negate the 32bit integer value in the variable.
@ asBC_ADDSi
Add a value to the top pointer on the stack, thus updating the address itself.
@ asBC_RDR1
Copy a BYTE from address held in the value register to a variable. Clear the top bytes in the variabl...
@ asBC_dTOi64
Convert the double value in the variable to a 64bit integer.
@ asBC_REFCPY
Pop destination handle reference. Perform a handle assignment, while updating the reference count for...
@ asBC_BAND
Perform a bitwise and of two 32bit values and store the result in a third variable.
@ asBC_LOADOBJ
Copy the object pointer from a variable to the object register. Clear the variable.
@ asBC_dTOu64
Convert the double value in the variable to a 64bit unsigned integer.
@ asBC_BXOR
Perform a bitwise exclusive or of two 32bit values and store the result in a third variable.
@ asBC_CHKREF
Throw an exception if the pointer on the top of the stack is null.
@ asBC_PshGPtr
Pushes a pointer from a global variable onto the stack.
@ asBC_OBJTYPE
Push the pointer argument onto the stack. The pointer is a pointer to an object type structure.
@ asBC_DecVi
Decrement the 32bit integer value in the variable.
@ asBC_DECf
Decrement the float value that is stored at the address pointed to by the reference in the value regi...
@ asBC_ADDIi
Add a 32bit integer variable with a constant value and store the result in another variable.
@ asBC_ClrHi
Clear the upper bytes of the value register so that only the value in the lowest byte is kept.
@ asBC_JLowNZ
Jump if low byte of value register is not 0.
@ asBC_NOT
Perform a boolean not on the value in a variable.
@ asBC_SUBi64
Perform a subtraction with two 64bit integer variables and store the result in a third variable.
@ asBC_ADDIf
Add a float variable with a constant value and store the result in another variable.
@ asBC_INCi8
Increment the 8bit integer value that is stored at the address pointed to by the reference in the val...
@ asBC_CMPf
Compare two float variables and store the result in the value register.
@ asBC_PshVPtr
Push a pointer from the variable on the stack.
@ asBC_SUSPEND
Call line callback function if set. Suspend execution if requested.
@ asBC_POWd
Computes the power of for two double values.
@ asBC_CmpPtr
Compare two pointers.
@ asBC_POWi
Computes the power of for two int values.
@ asBC_PSF
Push the address of the stack frame onto the stack.
@ asBC_FREE
Pop the address of the object variable from the stack. If ref type, call the release method,...
@ asBC_uwTOi
Expand the low word as an unsigned value to a full 32bit integer in the variable.
@ asBC_MODu
Calculate the modulo of values of two 32bit unsigned integer variables and store in a third variable.
@ asBC_LoadVObjR
Load address of member of value object into register.
@ asBC_i64TOf
Convert the 64bit integer value in one variable to a float in another variable.
@ asBC_CALLBND
Jump to an imported script function, indexed by the argument.
@ asBC_JS
If the value register is less than 0 jump to a relative position in this function.
@ asBC_POWu64
Computes the power of for two uint64 values.
@ asBC_CpyVtoR8
Copy a QWORD from a variable into the value register.
@ asBC_Thiscall1
Call registered function with single 32bit integer argument. Suspend further execution if requested.
@ asBC_RDSPtr
Pop top address, read a pointer from it, and push the pointer onto the stack.
@ asBC_JNZ
If the value register is not 0 jump to a relative position in this function.
@ asBC_BNOT64
Perform a bitwise complement on the 64bit value in the variable.
@ asBC_DIVi
Divide the values of two 32bit integer variables and store in a third variable.
@ asBC_CpyRtoV4
Copy a DWORD from the value register into a variable.
@ asBC_DECi64
Decrement the 64bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_MULIf
Multiply a float variable with a constant value and store the result in another variable.
@ asBC_LdGRdR4
Perform the actions of asBC_LDG followed by asBC_RDR4.
@ asBC_CMPu
Compare two unsigned 32bit integer variables and store the result in the value register.
@ asBC_CMPIf
Compare float variable with constant and store the result in value register.
@ asBC_JMPP
Jump to relative position in the function where the offset is stored in a variable.
@ asBC_CMPIi
Compare 32bit integer variable with constant and store the result in value register.
@ asBC_CallPtr
Call a function stored in a local function pointer.
@ asBC_RDR8
Copy a QWORD from address held in the value register to a variable.
@ asBC_MULi64
Perform a multiplication with two 64bit integer variables and store the result in a third variable.
@ asBC_CpyRtoV8
Copy a QWORD from the value register into a variable.
@ asBC_MODi64
Perform the modulo operation with two 64bit integer variables and store the result in a third variabl...
@ asBC_NEGi64
Negate the 64bit integer value in the variable.
@ asBC_PshRPtr
Push a pointer from the value register onto the stack.
@ asBC_CALL
Jump to a script function, indexed by the argument.
@ asBC_SUBd
Subtract the values of two double variables and store in a third variable.
@ asBC_MULd
Multiply the values of two double variables and store in a third variable.
@ asBC_BSRA64
Perform a arithmetical right shift of a 64bit value and store the result in a third variable.
@ asBC_ADDi
Add the values of two 32bit integer variables and store in a third variable.
@ asBC_BOR
Perform a bitwise or of two 32bit values and store the result in a third variable.
@ asBC_BSRL
Perform a logical right shift of a 32bit value and store the result in a third variable.
@ asBC_POWu
Computes the power of for two uint values.
@ asBC_INCi16
Increment the 16bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_INCd
Increment the double value that is stored at the address pointed to by the reference in the value reg...
@ asBC_DECd
Decrement the double value that is stored at the address pointed to by the reference in the value reg...
@ asBC_JZ
If the value register is 0 jump to a relative position in this function.
@ asBC_DIVu
Divide the values of two 32bit unsigned integer variables and store in a third variable.
@ asBC_CpyVtoG4
Copy a DWORD from a local variable to a global variable.
@ asBC_CpyGtoV4
Copy a DWORD from a global variable to a local variable.
@ asBC_Cast
Pop an object handle to a script class from the stack. Perform a dynamic cast on it and store the res...
@ asBC_fTOi
Convert the float value to a 32bit integer in the variable.
@ asBC_LDV
Load the address of a local variable into the value register.
@ asBC_PshC4
Push the 32bit value in the argument onto the stack.
@ asBC_POWdi
Computes the power of where base is a double and exponent is an int value.
@ asBC_LoadRObjR
Load address of member of reference object into register.
@ asBC_PopRPtr
Pop a pointer from the stack and store it in the value register.
@ asBC_BOR64
Perform a bitwise or of two 64bit values and store the result in a third variable.
@ asBC_AllocMem
Allocates memory for an initialization list buffer.
@ asBC_u64TOd
Convert the 32bit unsigned integer value in the variable to a double.
@ asBC_PopPtr
Removes a pointer from the stack.
@ asBC_INCi64
Increment the 64bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_TNS
If the value register is greater than or equal to 0 set it to 1.
@ asBC_INCi
Increment the 32bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_JitEntry
If a JIT function is available and the argument is not 0 then call the JIT function.
@ asBC_BSLL
Perform a logical left shift of a 32bit value and store the result in a third variable.
@ asBC_JMP
Unconditional jump to a relative position in this function.
@ asBC_GETREF
Replace a variable index on the stack with the address of the variable.
@ asBC_GETOBJREF
Replace a variable index on the stack with the object handle stored in that variable.
@ asBC_TP
If the value register is greater than 0 set it to 1.
@ asBC_uTOf
Convert the unsigned 32bit integer value to a float in the variable.
@ asBC_SetV2
Same as SetV4.
@ asBC_PshG4
Push the 32bit value from a global variable onto the stack.
@ asBC_JNS
If the value register is greater than or equal to 0 jump to a relative position in this function.
@ asBC_POWi64
Computes the power of for two int64 values.
@ asBC_SetListType
Sets the type of the next element in the list buffer.
@ asBC_NEGf
Negate the float value in the variable.
@ asBC_i64TOd
Convert the 32bit integer value in the variable to a double.
@ asBC_LDG
Load the address of a global variable into the value register.
@ asBC_ChkNullV
Throw an exception if the variable is null.
@ asBC_SUBIf
Subtract a float variable with a constant value and store the result in another variable.
@ asBC_dTOf
Convert the double value in one variable to a float in another variable.
@ asBC_SetG4
Set the value of global variable to a 32bit word.
@ asBC_LoadThisR
Load the address to a property of the local object into the stack. PshV4 0, ADDSi x,...
@ asBC_RefCpyV
Copies a handle to a variable.
@ asBC_ClrVPtr
Clear pointer in a variable.
@ asBC_SetListSize
Sets a repeat count in the list buffer.
@ asBC_DIVu64
Divide the values of two 64bit unsigned integer variables and store in a third variable.
@ asBC_fTOd
Convert the float value in one variable to a double in another variable.
@ asBC_TYPEID
Push the type id onto the stack. Equivalent to PshC4.
@ asBC_iTOf
Convert the 32bit integer value to a float in the variable.
@ asBC_NEGd
Negate the double value in the variable.
@ asBC_PshNull
Push a null pointer on the stack.
@ asBC_MULi
Multiply the values of two 32bit integer variables and store in a third variable.
@ asBC_WRTV1
Copy a BYTE from a variable to the address held in the value register.
@ asBC_SetV4
Initialize the variable with a DWORD.
@ asBC_PshListElmnt
Pushes the address of an element in the list buffer on the stack.
@ asBC_ubTOi
Expand the low byte as an unsigned value to a full 32bit integer in the variable.
@ asBC_JLowZ
Jump if low byte of value register is 0.
@ asBC_fTOu
Convert the float value to an unsigned 32bit integer in the variable.
@ asBC_DECi16
Decrement the 16bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_DIVi64
Perform a division with two 64bit integer variables and store the result in a third variable.
@ asBC_COPY
Pop the destination and source addresses from the stack. Perform a bitwise copy of the referred objec...
@ asBC_CMPi64
Compare two 64bit integer variables and store the result in the value register.
@ asBC_RDR2
Copy a WORD from address held in the value register to a variable. Clear the top word in the variable...
@ asBC_iTOi64
Convert the 32bit integer value in one variable to a 64bit integer in another variable.
@ asBC_TNP
If the value register is less than or equal to 0 set it to 1.
@ asBC_MODu64
Calculate the modulo of values of two 64bit unsigned integer variables and store in a third variable.
@ asBC_STOREOBJ
Copy the object pointer from the object register to the variable. Clear the object register.
@ asBC_swTOi
Expand the low word as a signed value to a full 32bit integer in the variable.
@ asBC_GETOBJ
Move object pointer from variable onto stack location.
@ asBC_ADDi64
Perform an addition with two 64bit integer variables and store the result in a third variable.
@ asBC_ADDf
Add the values of two float variables and store in a third variable.
@ asBC_dTOu
Convert the double value in one variable to a 32bit unsigned integer in another variable.
@ asBC_MULf
Multiply the values of two float variables and store in a third variable.
@ asBC_FuncPtr
Push a function pointer on the stack.
@ asBC_SUBIi
Subtract a 32bit integer variable with a constant value and store the result in another variable.
@ asBC_PshV4
Push the 32bit value from a variable onto the stack.
@ asBC_uTOd
Convert the 32bit unsigned integer value in one variable to a double in another variable.
@ asBC_BSRL64
Perform a logical right shift of a 64bit value and store the result in a third variable.
@ asBC_MODd
Calculate the modulo of values of two double variables and store in a third variable.
@ asBC_ALLOC
Allocate the memory for the object. If the type is a script object then jump to the constructor,...
@ asBC_CALLSYS
Call registered function. Suspend further execution if requested.
@ asBC_SwapPtr
Swap the top two pointers on the stack.
@ asBC_JP
If the value register is greater than 0 jump to a relative position in this function.
@ asBC_TNZ
If the value register is not 0 set it to 1.
@ asBC_RDR4
Copy a DWORD from address held in the value register to a variable.
@ asBC_CpyVtoV4
Copy a DWORD from one variable to another.
@ asBC_WRTV8
Copy a QWORD from a variable to the address held in the value register.
@ asBC_PshC8
Push a 64bit value on the stack.
@ asBC_BNOT
Perform a bitwise complement on the 32bit value in the variable.
@ asBC_SUBf
Subtract the values of two float variables and store in a third variable.
@ asBC_fTOi64
Convert the float value in one variable to a 64bit integer in another variable.
@ asBC_iTOw
Convert a 32bit integer in a variable to a word, clearing the top word.
@ asBC_DIVf
Divide the values of two float variables and store in a third variable.
@ asBC_ChkRefS
Throw an exception if the address stored on the stack points to a null pointer.
@ asBC_u64TOf
Convert the 64bit unsigned integer value in one variable to a float in another variable.
@ asBC_ADDd
Add the values of two double variables and store in a third variable.
@ asBC_CMPIu
Compare unsigned 32bit integer variable with constant and store the result in value register.
@ asBC_CMPd
Compare two double variables and store the result in the value register.
@ asBC_DECi
Decrement the 32bit integer value that is stored at the address pointed to by the reference in the va...
@ asBC_iTOd
Convert the 32bit integer value in one variable to a double in another variable.
@ asBC_VAR
Push the index of the variable on the stack, with the size of a pointer.
@ asBC_PGA
Push the address of a global variable on the stack.
@ asBC_SetV8
Initialize the variable with a QWORD.
@ asBC_RET
Return to the instruction after the last executed call.
@ asBC_PshV8
Push the 64bit value from a variable onto the stack.
@ asBC_BXOR64
Perform a bitwise exclusive or of two 64bit values and store the result in a third variable.
@ asBC_JNP
If the value register is less than or equal to 0 jump to a relative position in this function.
@ asBC_MODf
Calculate the modulo of values of two float variables and store in a third variable.
@ asBC_fTOu64
Convert the float value in one variable to a 64bit unsigned integer in another variable.
@ asBC_i64TOi
Convert the 64bit integer value in one variable to a 32bit integer in another variable.
@ asBC_BSRA
Perform a arithmetical right shift of a 32bit value and store the result in a third variable.
@ asBC_MODi
Calculate the modulo of values of two 32bit integer variables and store in a third variable.
@ asBC_iTOb
Convert a 32bit integer in a variable to a byte, clearing the top bytes.
@ asBC_DECi8
Increment the 8bit integer value that is stored at the address pointed to by the reference in the val...
@ asBC_WRTV4
Copy a DWORD from a variable to the address held in the value register.
@ asBC_CALLINTF
Jump to an interface method, indexed by the argument.
@ asBC_POWf
Computes the power of for two float values.
@ asBC_INCf
Increment the float value that is stored at the address pointed to by the reference in the value regi...
@ asBC_SUBi
Subtract the values of two 32bit integer variables and store in a third variable.
@ asBC_CpyVtoV8
Copy a QWORD from one variable to another.
@ asBC_BSLL64
Perform a logical left shift of a 64bit value and store the result in a third variable.
@ asBC_BAND64
Perform a bitwise and of two 64bit values and store the result in a third variable.
@ asBC_MULIi
Multiply a 32bit integer variable with a constant value and store the result in another variable.
@ asBC_SetV1
Same as SetV4.
@ asBC_WRTV2
Copy a WORD from a variable to the address held in the value register.
@ asBC_CMPu64
Compare two unsigned 64bit integer variables and store the result in the value register.
@ asBC_uTOi64
Convert the 32bit unsigned integer value in one variable to a 64bit integer in another variable.
@ asBC_CpyVtoR4
Copy a DWORD from a variable into the value register.
@ asBC_CMPi
Compare two 32bit integer variables and store the result in the value register.
@ asBC_ChkNullS
Check if a pointer on the stack is null, and if it is throw an exception. The argument is relative to...
@ asBC_IncVi
Increment the 32bit integer value in the variable.
@ asBC_TZ
If the value register is 0 set it to 1.
@ asBC_dTOi
Convert the double value in one variable to a 32bit integer in another variable.
@ asBC_sbTOi
Expand the low byte as a signed value to a full 32bit integer in the variable.
void(* asCLEANSCRIPTOBJECTFUNC_t)(asIScriptObject *)
The function signature for the script object cleanup callback function.
unsigned long asDWORD
32 bit unsigned integer
void *(* asALLOCFUNC_t)(size_t)
The function signature for the custom memory allocation function.
asEGCFlags
Garbage collector flags.
@ asGC_FULL_CYCLE
Execute a full cycle.
@ asGC_ONE_STEP
Execute only one step.
@ asGC_DETECT_GARBAGE
Detect garbage with circular references.
@ asGC_DESTROY_GARBAGE
Destroy known garbage.
const asSBCInfo asBCInfo[256]
Information on each bytecode instruction.
void(* asCLEANTYPEINFOFUNC_t)(asITypeInfo *)
The function signature for the type info cleanup callback function.
void(* asCIRCULARREFFUNC_t)(asITypeInfo *, const void *, void *)
The function signature for the callback used when detecting a circular reference in garbage.
signed char asINT8
8 bit signed integer
void(* asFREEFUNC_t)(void *)
The function signature for the custom memory deallocation function.
asEGMFlags
Flags for GetModule.
@ asGM_ALWAYS_CREATE
Always create a new module, discarding the existing one.
@ asGM_ONLY_IF_EXISTS
Don't return any module if it is not found.
@ asGM_CREATE_IF_NOT_EXISTS
Create the module if it doesn't exist.
asETypeIdFlags
Type id flags.
@ asTYPEID_MASK_OBJECT
If any of these bits are set, then the type is an object.
@ asTYPEID_SCRIPTOBJECT
The bit that shows if the type is a script class.
@ asTYPEID_UINT8
The type id for uint8.
@ asTYPEID_APPOBJECT
The bit that shows if the type is an application registered type.
@ asTYPEID_INT16
The type id for int16.
@ asTYPEID_FLOAT
The type id for float.
@ asTYPEID_BOOL
The type id for bool.
@ asTYPEID_OBJHANDLE
The bit that shows if the type is a handle.
@ asTYPEID_INT8
The type id for int8.
@ asTYPEID_MASK_SEQNBR
The mask for the type id sequence number.
@ asTYPEID_DOUBLE
The type id for double.
@ asTYPEID_HANDLETOCONST
The bit that shows if the type is a handle to a const.
@ asTYPEID_INT64
The type id for int64.
@ asTYPEID_TEMPLATE
The bit that shows if the type is a template type.
@ asTYPEID_INT32
The type id for int.
@ asTYPEID_UINT32
The type id for uint.
@ asTYPEID_VOID
The type id for void.
@ asTYPEID_UINT16
The type id for uint16.
@ asTYPEID_UINT64
The type id for uint64.
asIScriptContext *(* asREQUESTCONTEXTFUNC_t)(asIScriptEngine *, void *)
The function signature for the request context callback.
unsigned char asBYTE
8 bit unsigned integer
void(* asJITFunction)(asSVMRegisters *registers, asPWORD jitArg)
The function signature of a JIT compiled function.
A binary stream interface.
virtual int Write(const void *ptr, asUINT size)=0
Write size bytes to the stream from the memory pointed to by ptr.
virtual int Read(void *ptr, asUINT size)=0
Read size bytes from the stream into the memory pointed to by ptr.
An abstract interface for the JIT compiler.
The interface that AS use to interact with the JIT compiler for version 1.
virtual int CompileFunction(asIScriptFunction *function, asJITFunction *output)=0
Called by AngelScript to begin the compilation.
virtual void ReleaseJITFunction(asJITFunction func)=0
Called by AngelScript when the JIT function is released.
The interface that AS use to interact with the JIT compiler for version 2.
virtual void NewFunction(asIScriptFunction *scriptFunc)=0
Called by AngelScript when a new function is compiled.
virtual void CleanFunction(asIScriptFunction *scriptFunc, asJITFunction jitFunc)=0
Called by AngelScript when the JIT function must be cleaned up.
A lockable shared boolean.
virtual int AddRef() const =0
Adds a reference to the shared boolean.
virtual int Release() const =0
Releases a reference to the shared boolean.
virtual void Unlock() const =0
Unlocks the shared boolean.
virtual void Set(bool val)=0
Sets the value of the shared boolean.
virtual bool Get() const =0
Get the value of the shared boolean.
virtual void Lock() const =0
Locks the shared boolean.
The interface to the virtual machine.
virtual int GetArgOnStack(asUINT stackLevel, asUINT arg, int *typeId, asUINT *flags, void **address)=0
Get the argument pushed on the stack for serialization and deserialization.
virtual int SetLineCallback(const asSFuncPtr &callback, void *obj, int callConv)=0
Sets a line callback function. The function will be called for each executed script statement.
virtual int SetArgObject(asUINT arg, void *obj)=0
Sets the object argument value.
virtual const char * GetExceptionString()=0
Returns the exception string text.
virtual int SetObject(void *obj)=0
Sets the object for a class method call.
virtual int SetArgDWord(asUINT arg, asDWORD value)=0
Sets a 32-bit integer argument value.
virtual asEContextState GetState() const =0
Returns the state of the context.
virtual const char * GetVarName(asUINT varIndex, asUINT stackLevel=0)=0
Returns the name of local variable at the specified callstack level.
virtual int Release() const =0
Decrease reference counter.
virtual void * GetAddressOfVar(asUINT varIndex, asUINT stackLevel=0, bool dontDereference=false, bool returnAddressOfUnitializedObjects=false)=0
Returns a pointer to a local variable at the specified callstack level.
virtual void * GetThisPointer(asUINT stackLevel=0)=0
Returns a pointer to the object, if a class method is being executed.
virtual asQWORD GetReturnQWord()=0
Returns the 64-bit return value.
virtual int GetExceptionLineNumber(int *column=0, const char **sectionName=0)=0
Returns the line number where the exception occurred.
virtual void * GetAddressOfArg(asUINT arg)=0
Returns a pointer to the argument for assignment.
virtual asIScriptFunction * GetFunction(asUINT stackLevel=0)=0
Returns the function at the specified callstack level.
virtual int Abort()=0
Aborts the execution.
virtual void ClearLineCallback()=0
Removes the registered callback.
virtual bool IsNested(asUINT *nestCount=0) const =0
Returns true if the context has any nested calls.
virtual void * GetReturnObject()=0
Return a pointer to the returned object.
virtual int GetVarCount(asUINT stackLevel=0)=0
Returns the number of local variables at the specified callstack level.
virtual int GetThisTypeId(asUINT stackLevel=0)=0
Returns the type id of the object, if a class method is being executed.
virtual int Prepare(asIScriptFunction *func)=0
Prepares the context for execution of the function.
virtual asDWORD GetReturnDWord()=0
Returns the 32-bit return value.
virtual bool IsVarInScope(asUINT varIndex, asUINT stackLevel=0)=0
Informs whether the variable is in scope at the current program position.
virtual float GetReturnFloat()=0
Returns the float return value.
virtual int PushFunction(asIScriptFunction *func, void *object)=0
Push a function call onto the context stack for deserialization.
virtual asBYTE GetReturnByte()=0
Returns the 8-bit return value.
virtual void * GetAddressOfReturnValue()=0
Returns the address of the returned value.
virtual int SetExceptionCallback(const asSFuncPtr &callback, void *obj, int callConv)=0
Sets an exception callback function. The function will be called if a script exception occurs.
virtual asIScriptEngine * GetEngine() const =0
Returns a pointer to the engine.
virtual void * SetUserData(void *data, asPWORD type=0)=0
Register the memory address of some user data.
virtual asIScriptFunction * GetExceptionFunction()=0
Returns the function where the exception occurred.
virtual bool WillExceptionBeCaught()=0
Determine if the current exception will be caught by the script.
virtual asWORD GetReturnWord()=0
Returns the 16-bit return value.
virtual int PopState()=0
Restores the state to resume previous script execution.
virtual int AddRef() const =0
Increase reference counter.
virtual int GetVar(asUINT varIndex, asUINT stackLevel, const char **name, int *typeId=0, asETypeModifiers *typeModifiers=0, bool *isVarOnHeap=0, int *stackOffset=0)=0
Returns information on a local variable at the specified callstack level.
virtual int SetArgVarType(asUINT arg, void *ptr, int typeId)=0
Sets the variable argument value and type.
virtual const char * GetVarDeclaration(asUINT varIndex, asUINT stackLevel=0, bool includeNamespace=false)=0
Returns the declaration of a local variable at the specified callstack level.
virtual int StartDeserialization()=0
Start a deserialization of a context.
virtual int SetException(const char *info, bool allowCatch=true)=0
Sets an exception, which aborts the execution.
virtual int SetArgFloat(asUINT arg, float value)=0
Sets a float argument value.
virtual void * GetUserData(asPWORD type=0) const =0
Returns the address of the previously registered user data.
virtual int GetStateRegisters(asUINT stackLevel, asIScriptFunction **callingSystemFunction, asIScriptFunction **initialFunction, asDWORD *origStackPointer, asDWORD *argumentsSize, asQWORD *valueRegister, void **objectRegister, asITypeInfo **objectTypeRegister)=0
Get the state registers for serialization.
virtual int SetArgQWord(asUINT arg, asQWORD value)=0
Sets a 64-bit integer argument value.
virtual double GetReturnDouble()=0
Returns the double return value.
virtual int GetArgsOnStackCount(asUINT stackLevel)=0
Get the number of args pushed on the stack for serialization.
virtual int GetCallStateRegisters(asUINT stackLevel, asDWORD *stackFramePointer, asIScriptFunction **currentFunction, asDWORD *programPointer, asDWORD *stackPointer, asDWORD *stackIndex)=0
Get the call state registers for serialization.
virtual void * GetReturnAddress()=0
Returns the address for a reference or handle return type.
virtual int GetVarTypeId(asUINT varIndex, asUINT stackLevel=0)=0
Returns the type id of a local variable at the specified callstack level.
virtual int Execute()=0
Executes the prepared function.
virtual int SetStateRegisters(asUINT stackLevel, asIScriptFunction *callingSystemFunction, asIScriptFunction *initialFunction, asDWORD origStackPointer, asDWORD argumentsSize, asQWORD valueRegister, void *objectRegister, asITypeInfo *objectTypeRegister)=0
Set the state registers for deserialization.
virtual int SetCallStateRegisters(asUINT stackLevel, asDWORD stackFramePointer, asIScriptFunction *currentFunction, asDWORD programPointer, asDWORD stackPointer, asDWORD stackIndex)=0
Set the call state registers for deserialization.
virtual int SetArgAddress(asUINT arg, void *addr)=0
Sets the address of a reference or handle argument.
virtual asUINT GetCallstackSize() const =0
Returns the size of the callstack, i.e. the number of functions that have yet to complete.
virtual asIScriptFunction * GetSystemFunction()=0
Returns the registered function that is currently being called by the context.
virtual int SetArgByte(asUINT arg, asBYTE value)=0
Sets an 8-bit argument value.
virtual int SetArgWord(asUINT arg, asWORD value)=0
Sets a 16-bit argument value.
virtual void ClearExceptionCallback()=0
Removes the registered callback.
virtual int SetArgDouble(asUINT arg, double value)=0
Sets a double argument value.
virtual int Suspend()=0
Suspends the execution, which can then be resumed by calling Execute again.
virtual int PushState()=0
Backups the current state to prepare the context for a nested call.
virtual int GetLineNumber(asUINT stackLevel=0, int *column=0, const char **sectionName=0)=0
Returns the line number at the specified callstack level.
virtual int Unprepare()=0
Frees resources held by the context.
virtual int FinishDeserialization()=0
Finish a deserialization of a context.
virtual int RegisterFuncdef(const char *decl)=0
Registers a function definition.
virtual int GetGlobalPropertyIndexByName(const char *name) const =0
Returns the index of the property.
virtual int RegisterObjectProperty(const char *obj, const char *declaration, int byteOffset, int compositeOffset=0, bool isCompositeIndirect=false)=0
Registers a property for the object type.
virtual asUINT GetTypedefCount() const =0
Returns the number of registered typedefs.
virtual asITypeInfo * GetTypeInfoByDecl(const char *decl) const =0
Returns a type by declaration.
virtual asIScriptContext * RequestContext()=0
Request a context.
virtual void GetGCStatistics(asUINT *currentSize, asUINT *totalDestroyed=0, asUINT *totalDetected=0, asUINT *newObjects=0, asUINT *totalNewDestroyed=0) const =0
Obtain statistics from the garbage collector.
virtual int GarbageCollect(asDWORD flags=asGC_FULL_CYCLE, asUINT numIterations=1)=0
Perform garbage collection.
virtual asIScriptFunction * CreateDelegate(asIScriptFunction *func, void *obj)=0
Create a delegate for an object and method.
virtual void * CreateScriptObject(const asITypeInfo *type)=0
Creates an object defined by its type.
virtual int SetJITCompiler(asIJITCompilerAbstract *compiler)=0
Sets the JIT compiler.
virtual asITypeInfo * GetObjectTypeByIndex(asUINT index) const =0
Returns the object type interface by index.
virtual int SetEngineProperty(asEEngineProp property, asPWORD value)=0
Dynamically change some engine properties.
virtual asITypeInfo * GetTypedefByIndex(asUINT index) const =0
Returns a registered typedef.
virtual void ReturnContext(asIScriptContext *ctx)=0
Return a context when it won't be used anymore.
virtual int ShutDownAndRelease()=0
Shuts down the engine then decrease the reference counter.
virtual int RegisterGlobalFunction(const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0)=0
Registers a global function.
virtual int RefCastObject(void *obj, asITypeInfo *fromType, asITypeInfo *toType, void **newPtr, bool useOnlyImplicitCast=false)=0
Returns the handle on a successful reference cast to desired type.
virtual int GetObjectInGC(asUINT idx, asUINT *seqNbr=0, void **obj=0, asITypeInfo **type=0)=0
Gets an object in the garbage collector.
virtual int GetSizeOfPrimitiveType(int typeId) const =0
Returns the size of a primitive type.
virtual asITypeInfo * GetEnumByIndex(asUINT index) const =0
Returns the registered enum type.
virtual int RegisterInterfaceMethod(const char *intf, const char *declaration)=0
Registers a script interface method.
virtual asUINT GetModuleCount() const =0
Get the number of modules.
virtual void SetScriptObjectUserDataCleanupCallback(asCLEANSCRIPTOBJECTFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when a script object is destroyed.
virtual void * SetUserData(void *data, asPWORD type=0)=0
Register the memory address of some user data.
virtual asUINT GetFuncdefCount() const =0
Returns the number of registered function definitions.
virtual asUINT GetEnumCount() const =0
Returns the number of registered enum types.
virtual int EndConfigGroup()=0
Ends the configuration group.
virtual int RegisterEnumValue(const char *type, const char *name, int value)=0
Registers an enum value.
virtual int NotifyGarbageCollectorOfNewObject(void *obj, asITypeInfo *type)=0
Notify the garbage collector of a new object that needs to be managed.
virtual asPWORD GetEngineProperty(asEEngineProp property) const =0
Retrieve current engine property settings.
virtual asDWORD SetDefaultAccessMask(asDWORD defaultMask)=0
Sets the access mask that should be used for subsequent registered entities.
virtual int RegisterObjectType(const char *obj, int byteSize, asQWORD flags)=0
Registers a new object type.
virtual asETokenClass ParseToken(const char *string, size_t stringLength=0, asUINT *tokenLength=0) const =0
Returns the class and length of the first token in the string.
virtual void GCEnumCallback(void *reference)=0
Used by the garbage collector to enumerate all references held by an object.
virtual int SetDefaultNamespace(const char *nameSpace)=0
Sets the current default namespace for registrations and searches.
virtual void ForwardGCReleaseReferences(void *ref, asITypeInfo *type)=0
Used to forward GC callback to held value types that may contain references.
virtual void * CreateScriptObjectCopy(void *obj, const asITypeInfo *type)=0
Creates a copy of a script object.
virtual asIScriptModule * GetModule(const char *module, asEGMFlags flag=asGM_ONLY_IF_EXISTS)=0
Return an interface pointer to the module.
virtual int GetMessageCallback(asSFuncPtr *callback, void **obj, asDWORD *callConv)=0
Gets the current message callback.
virtual int SetTranslateAppExceptionCallback(const asSFuncPtr &callback, void *param, int callConv)=0
Register the exception translation callback.
virtual asUINT GetGlobalFunctionCount() const =0
Returns the number of registered functions.
virtual int SetMessageCallback(const asSFuncPtr &callback, void *obj, asDWORD callConv)=0
Sets a message callback that will receive compiler messages.
virtual void SetModuleUserDataCleanupCallback(asCLEANMODULEFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when the module is destroyed.
virtual asIScriptFunction * GetGlobalFunctionByIndex(asUINT index) const =0
Returns the registered function.
virtual void ReleaseScriptObject(void *obj, const asITypeInfo *type)=0
Release the object pointer.
virtual int GetLastFunctionId() const =0
Returns the highest id used for functions.
virtual asITypeInfo * GetFuncdefByIndex(asUINT index) const =0
Returns a registered function definition.
virtual asIScriptContext * CreateContext()=0
Creates a new script context.
virtual void SetEngineUserDataCleanupCallback(asCLEANENGINEFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when the engine is destroyed.
virtual int AssignScriptObject(void *dstObj, void *srcObj, const asITypeInfo *type)=0
Copy one script object to another.
virtual int GetGlobalPropertyIndexByDecl(const char *decl) const =0
Returns the index of the property.
virtual int WriteMessage(const char *section, int row, int col, asEMsgType type, const char *message)=0
Writes a message to the message callback.
virtual int GetGlobalPropertyByIndex(asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0, const char **configGroup=0, void **pointer=0, asDWORD *accessMask=0) const =0
Returns the detail on the registered global property.
virtual int RegisterObjectBehaviour(const char *obj, asEBehaviours behaviour, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0
Registers a behaviour for the object type.
virtual asIScriptModule * GetModuleByIndex(asUINT index) const =0
Get a module by index.
virtual const char * GetTypeDeclaration(int typeId, bool includeNamespace=false) const =0
Returns a type declaration.
virtual asIJITCompilerAbstract * GetJITCompiler() const =0
Returns the JIT compiler.
virtual int GetStringFactory(asDWORD *typeModifiers=0, asIStringFactory **factory=0) const =0
Returns the type id of the type that the string factory returns, and optionally the actual string fac...
virtual asUINT GetGlobalPropertyCount() const =0
Returns the number of registered global properties.
virtual int AddRef() const =0
Increase reference counter.
virtual void SetCircularRefDetectedCallback(asCIRCULARREFFUNC_t callback, void *param=0)=0
Set a callback for capturing more info on circular reference for debugging.
virtual int RegisterGlobalProperty(const char *declaration, void *pointer)=0
Registers a global property.
virtual int Release() const =0
Decrease reference counter.
virtual int RemoveConfigGroup(const char *groupName)=0
Removes a previously registered configuration group.
virtual void ForwardGCEnumReferences(void *ref, asITypeInfo *type)=0
Used to forward GC callback to held value types that may contain references.
virtual int RegisterEnum(const char *type)=0
Registers an enum type.
virtual asUINT GetObjectTypeCount() const =0
Returns the number of registered object types.
virtual int RegisterStringFactory(const char *datatype, asIStringFactory *factory)=0
Registers the string factory.
virtual int BeginConfigGroup(const char *groupName)=0
Starts a new dynamic configuration group.
virtual int RegisterDefaultArrayType(const char *type)=0
Registers the type that should be used as the default array.
virtual void SetContextUserDataCleanupCallback(asCLEANCONTEXTFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when a context is destroyed.
virtual void * GetUserData(asPWORD type=0) const =0
Returns the address of the previously registered user data.
virtual asIScriptFunction * GetGlobalFunctionByDecl(const char *declaration) const =0
Returns the registered function.
virtual int GetTypeIdByDecl(const char *decl) const =0
Returns a type id by declaration.
virtual int RegisterObjectMethod(const char *obj, const char *declaration, const asSFuncPtr &funcPointer, asDWORD callConv, void *auxiliary=0, int compositeOffset=0, bool isCompositeIndirect=false)=0
Registers a method for the object type.
virtual int ClearMessageCallback()=0
Clears the registered message callback routine.
virtual asITypeInfo * GetTypeInfoByName(const char *name) const =0
Returns the type interface by name.
virtual int RegisterTypedef(const char *type, const char *decl)=0
Registers a typedef.
virtual void AddRefScriptObject(void *obj, const asITypeInfo *type)=0
Increase the reference counter for the script object.
virtual void * CreateUninitializedScriptObject(const asITypeInfo *type)=0
Creates an uninitialized script object defined by its type.
virtual int RegisterInterface(const char *name)=0
Registers a script interface.
virtual asITypeInfo * GetTypeInfoById(int typeId) const =0
Returns the type interface for type.
virtual int SetContextCallbacks(asREQUESTCONTEXTFUNC_t requestCtx, asRETURNCONTEXTFUNC_t returnCtx, void *param=0)=0
Register context callbacks for pooling.
virtual void SetFunctionUserDataCleanupCallback(asCLEANFUNCTIONFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when a function is destroyed.
virtual int GetDefaultArrayTypeId() const =0
Returns the type id of the registered type.
virtual const char * GetDefaultNamespace() const =0
Returns the current default namespace.
virtual asILockableSharedBool * GetWeakRefFlagOfScriptObject(void *obj, const asITypeInfo *type) const =0
Returns the weak ref flag from the object.
virtual void SetTypeInfoUserDataCleanupCallback(asCLEANTYPEINFOFUNC_t callback, asPWORD type=0)=0
Set the function that should be called when a type info is destroyed.
virtual int DiscardModule(const char *module)=0
Discard a module.
virtual int GetStringFactoryReturnTypeId(asDWORD *flags=0) const =0
Returns the type id of the type that the string factory returns.
virtual asIScriptFunction * GetFunctionById(int funcId) const =0
Returns the function by its id.
The interface for a script function description.
virtual const char * GetVarDecl(asUINT index, bool includeNamespace=false) const =0
Returns the declaration of a local variable.
virtual asUINT GetSubTypeCount() const =0
Returns the number of template sub types.
virtual int AddRef() const =0
Increases the reference counter.
virtual int Release() const =0
Decrease reference counter.
virtual const char * GetScriptSectionName() const =0
Returns the name of the script section where the function was implemented.
virtual const char * GetModuleName() const =0
Returns the name of the module where the function was implemented.
virtual asIScriptEngine * GetEngine() const =0
Returns a pointer to the script engine.
virtual void * GetDelegateObject() const =0
Returns the object for the delegate.
virtual int GetReturnTypeId(asDWORD *flags=0) const =0
Returns the type id of the return type.
virtual int GetParam(asUINT index, int *typeId, asDWORD *flags=0, const char **name=0, const char **defaultArg=0) const =0
Returns the type id of the specified parameter.
virtual asITypeInfo * GetSubType(asUINT subTypeIndex=0) const =0
Returns the type info for a template sub type.
virtual bool IsProtected() const =0
Returns true if the class method is protected.
virtual int FindNextLineWithCode(int line) const =0
Returns the next line number with code.
virtual asIScriptFunction * GetDelegateFunction() const =0
Returns the function for the delegate.
virtual int GetSubTypeId(asUINT subTypeIndex=0) const =0
Returns the type id of a template sub type.
virtual int GetTypeId() const =0
Returns the type id representing a function pointer for this function.
virtual void * GetAuxiliary() const =0
Returns the auxiliary object registered with the function.
virtual bool IsOverride() const =0
Returns true if the method is meant to override a method in the base class.
virtual bool IsVariadic() const =0
Returns true if the function has variadic arguments.
virtual asDWORD GetAccessMask() const =0
Returns the access mast of the function.
virtual int SetJITFunction(asJITFunction jitFunc)=0
Link the script function with a JIT compiled function.
virtual asDWORD * GetByteCode(asUINT *length=0)=0
Returns the byte code buffer and length.
virtual bool IsCompatibleWithTypeId(int typeId) const =0
Checks if the given type id can represent this function.
virtual int GetDeclaredAt(const char **scriptSection, int *row, int *col) const =0
Returns the location in the script where the function was declared.
virtual int GetId() const =0
Returns the id of the function.
virtual asITypeInfo * GetObjectType() const =0
Returns the object type for class or interface method.
virtual bool IsPrivate() const =0
Returns true if the class method is private.
virtual bool IsShared() const =0
Returns true if the function is shared.
virtual asUINT GetParamCount() const =0
Returns the number of parameters for this function.
virtual asUINT GetVarCount() const =0
Returns the number of local variables in the function.
virtual asJITFunction GetJITFunction() const =0
Returns the linked JIT compiled function.
virtual bool IsReadOnly() const =0
Returns true if the class method is read-only.
virtual const char * GetObjectName() const =0
Returns the name of the object for class or interface methods.
virtual bool IsFinal() const =0
Returns true if the method is final.
virtual asEFuncType GetFuncType() const =0
Returns the type of the function.
virtual int GetVar(asUINT index, const char **name, int *typeId=0) const =0
Returns information about a local variable.
virtual const char * GetNamespace() const =0
Returns the namespace of the function.
virtual const char * GetConfigGroup() const =0
Returns the name of the config group in which the function was registered.
virtual const char * GetName() const =0
Returns the name of the function or method.
virtual bool IsProperty() const =0
Returns true if the function is declared as 'property'.
virtual void * SetUserData(void *userData, asPWORD type=0)=0
Register the memory address of some user data.
virtual void * GetUserData(asPWORD type=0) const =0
Returns the address of the previously registered user data.
virtual bool IsExplicit() const =0
Returns true if the function is declared as 'explicit'.
virtual asITypeInfo * GetDelegateObjectType() const =0
Returns the type of the delegated object.
virtual asIScriptModule * GetModule() const =0
Returns the module where the function is declared.
virtual const char * GetDeclaration(bool includeObjectName=true, bool includeNamespace=false, bool includeParamNames=false) const =0
Returns the function declaration.
The interface for the generic calling convention.
virtual asQWORD GetArgQWord(asUINT arg)=0
Returns the value of a 64-bit integer argument.
virtual asBYTE GetArgByte(asUINT arg)=0
Returns the value of an 8-bit argument.
virtual int SetReturnQWord(asQWORD val)=0
Sets the 64-bit integer return value.
virtual int GetArgTypeId(asUINT arg, asDWORD *flags=0) const =0
Returns the type id of the argument.
virtual int SetReturnDWord(asDWORD val)=0
Sets the 32-bit integer return value.
virtual int GetObjectTypeId() const =0
Returns the type id of the object if this is a class method.
virtual float GetArgFloat(asUINT arg)=0
Returns the value of a float argument.
virtual asIScriptEngine * GetEngine() const =0
Returns a pointer to the script engine.
virtual void * GetArgAddress(asUINT arg)=0
Returns the address held in a reference or handle argument.
virtual int SetReturnByte(asBYTE val)=0
Sets the 8-bit return value.
virtual int SetReturnDouble(double val)=0
Sets the double return value.
virtual int SetReturnObject(void *obj)=0
Sets the object return value.
virtual int SetReturnWord(asWORD val)=0
Sets the 16-bit return value.
virtual int GetReturnTypeId(asDWORD *flags=0) const =0
Gets the type id of the return value.
virtual asDWORD GetArgDWord(asUINT arg)=0
Returns the value of a 32-bit integer argument.
virtual int GetArgCount() const =0
Returns the number of arguments.
virtual void * GetAddressOfReturnLocation()=0
Gets the address to the memory where the return value should be placed.
virtual void * GetArgObject(asUINT arg)=0
Returns a pointer to the object in a object argument.
virtual int SetReturnFloat(float val)=0
Sets the float return value.
virtual double GetArgDouble(asUINT arg)=0
Returns the value of a double argument.
virtual asIScriptFunction * GetFunction() const =0
Returns the function that is being called.
virtual void * GetAuxiliary() const =0
Return the auxiliary registered with the function.
virtual void * GetAddressOfArg(asUINT arg)=0
Returns a pointer to the argument value.
virtual int SetReturnAddress(void *addr)=0
Sets the address return value when the return is a reference or handle.
virtual asWORD GetArgWord(asUINT arg)=0
Returns the value of a 16-bit argument.
virtual void * GetObject()=0
Returns the object pointer if this is a class method, or null if it not.
The interface to the script modules.
virtual int GetGlobalVarIndexByName(const char *name) const =0
Returns the global variable index by name.
virtual void Discard()=0
Discards the module.
virtual asUINT GetImportedFunctionCount() const =0
Returns the number of functions declared for import.
virtual int CompileFunction(const char *sectionName, const char *code, int lineOffset, asDWORD compileFlags, asIScriptFunction **outFunc)=0
Compile a single function.
virtual asITypeInfo * GetEnumByIndex(asUINT index) const =0
Returns the enum type.
virtual asUINT GetEnumCount() const =0
Returns the number of enum types declared in the module.
virtual void SetName(const char *name)=0
Sets the name of the module.
virtual int AddScriptSection(const char *name, const char *code, size_t codeLength=0, int lineOffset=0)=0
Add a script section for the next build.
virtual int CompileGlobalVar(const char *sectionName, const char *code, int lineOffset)=0
Compile a single global variable and add it to the scope of the module.
virtual asUINT GetFunctionCount() const =0
Returns the number of global functions in the module.
virtual int BindAllImportedFunctions()=0
Binds all imported functions in a module, by searching their equivalents in the declared source modul...
virtual asITypeInfo * GetTypeInfoByDecl(const char *decl) const =0
Returns a type by declaration.
virtual int UnbindImportedFunction(asUINT importIndex)=0
Unbinds an imported function.
virtual asITypeInfo * GetTypeInfoByName(const char *name) const =0
Returns the type interface by name.
virtual int RemoveFunction(asIScriptFunction *func)=0
Remove a single function from the scope of the module.
virtual asITypeInfo * GetObjectTypeByIndex(asUINT index) const =0
Returns the object type interface by index.
virtual int GetImportedFunctionIndexByDecl(const char *decl) const =0
Returns the imported function index by declaration.
virtual asDWORD SetAccessMask(asDWORD accessMask)=0
Sets the access mask that should be used during the compilation.
virtual int ResetGlobalVars(asIScriptContext *ctx=0)=0
Reset the global variables of the module.
virtual int GetTypeIdByDecl(const char *decl) const =0
Returns a type id by declaration.
virtual const char * GetGlobalVarDeclaration(asUINT index, bool includeNamespace=false) const =0
Returns the global variable declaration.
virtual asUINT GetGlobalVarCount() const =0
Returns the number of global variables in the module.
virtual int Build()=0
Build the previously added script sections.
virtual int LoadByteCode(asIBinaryStream *in, bool *wasDebugInfoStripped=0)=0
Load pre-compiled byte code from a binary stream.
virtual const char * GetImportedFunctionSourceModule(asUINT importIndex) const =0
Returns the declared imported function source module.
virtual asUINT GetObjectTypeCount() const =0
Returns the number of object types.
virtual int GetGlobalVar(asUINT index, const char **name, const char **nameSpace=0, int *typeId=0, bool *isConst=0) const =0
Returns the global variable properties.
virtual void * SetUserData(void *data, asPWORD type=0)=0
Register the memory address of some user data.
virtual asIScriptFunction * GetFunctionByIndex(asUINT index) const =0
Returns the function by index.
virtual const char * GetName() const =0
Gets the name of the module.
virtual void * GetAddressOfGlobalVar(asUINT index)=0
Returns the pointer to the global variable.
virtual asIScriptEngine * GetEngine() const =0
Returns a pointer to the engine.
virtual int RemoveGlobalVar(asUINT index)=0
Remove the global variable from the scope of the module.
virtual const char * GetImportedFunctionDeclaration(asUINT importIndex) const =0
Returns the imported function declaration.
virtual asIScriptFunction * GetFunctionByDecl(const char *decl) const =0
Returns the function by its declaration.
virtual int BindImportedFunction(asUINT importIndex, asIScriptFunction *func)=0
Binds an imported function to the function from another module.
virtual int UnbindAllImportedFunctions()=0
Unbinds all imported functions.
virtual int SetDefaultNamespace(const char *nameSpace)=0
Sets the default namespace that should be used in the following calls.
virtual int GetGlobalVarIndexByDecl(const char *decl) const =0
Returns the global variable index by declaration.
virtual int SaveByteCode(asIBinaryStream *out, bool stripDebugInfo=false) const =0
Save compiled byte code to a binary stream.
virtual asUINT GetTypedefCount() const =0
Returns the number of typedefs in the module.
virtual void * GetUserData(asPWORD type=0) const =0
Returns the address of the previously registered user data.
virtual asIScriptFunction * GetFunctionByName(const char *name) const =0
Returns the function by its name.
virtual asITypeInfo * GetTypedefByIndex(asUINT index) const =0
Returns the typedef.
virtual const char * GetDefaultNamespace() const =0
Returns the current default namespace.
The interface for an instance of a script object.
virtual int GetPropertyTypeId(asUINT prop) const =0
Returns the type id of the property referenced by prop.
virtual int GetTypeId() const =0
Returns the type id of the object.
virtual void * GetUserData(asPWORD type=0) const =0
Gets user data from the script object instance.
virtual int AddRef() const =0
Increase reference counter.
virtual int Release() const =0
Decrease reference counter.
virtual void * SetUserData(void *data, asPWORD type=0)=0
Sets user data on the script object instance.
virtual asITypeInfo * GetObjectType() const =0
Returns the object type interface for the object.
virtual const char * GetPropertyName(asUINT prop) const =0
Returns the name of the property referenced by prop.
virtual asIScriptEngine * GetEngine() const =0
Return the script engine.
virtual void * GetAddressOfProperty(asUINT prop)=0
Returns a pointer to the property referenced by prop.
virtual asUINT GetPropertyCount() const =0
Returns the number of properties that the object contains.
virtual int CopyFrom(const asIScriptObject *other)=0
Copies the content from another object of the same type.
virtual asILockableSharedBool * GetWeakRefFlag() const =0
Returns the weak ref flag for the object.
The interface for the string factory.
virtual const void * GetStringConstant(const char *data, asUINT length)=0
Called by engine to instantiate a string constant.
virtual int ReleaseStringConstant(const void *str)=0
Called by engine when the string constant is no longer used.
virtual int GetRawStringData(const void *str, char *data, asUINT *length) const =0
Called by engine to get the raw string data for serialization.
The interface for the thread manager.
The interface for describing types This interface is used to describe the types in the script engine.
virtual asUINT GetPropertyCount() const =0
Returns the number of properties that the object contains.
virtual const char * GetEnumValueByIndex(asUINT index, int *outValue) const =0
Returns the name and value of the enum value for the enum type.
virtual int GetTypeId() const =0
Returns the type id for the object type.
virtual asUINT GetSubTypeCount() const =0
Returns the number of template sub types.
virtual bool Implements(const asITypeInfo *objType) const =0
Returns true if the type implements the informed interface type.
virtual asIScriptFunction * GetMethodByIndex(asUINT index, bool getVirtual=true) const =0
Returns the method by index.
virtual asUINT GetFactoryCount() const =0
Returns the number of factory functions for the object type.
virtual asITypeInfo * GetChildFuncdef(asUINT index) const =0
Returns a child funcdef by index.
virtual asIScriptFunction * GetMethodByDecl(const char *decl, bool getVirtual=true) const =0
Returns the method by declaration.
virtual asIScriptFunction * GetFactoryByIndex(asUINT index) const =0
Returns the factory function by the index.
virtual asITypeInfo * GetSubType(asUINT subTypeIndex=0) const =0
Returns the template subtype, in case it is an object type.
virtual void * SetUserData(void *data, asPWORD type=0)=0
Register the memory address of some user data.
virtual asUINT GetInterfaceCount() const =0
Returns the number of interfaces implemented.
virtual bool DerivesFrom(const asITypeInfo *objType) const =0
Returns true if the type inherits directly or indirectly from the informed type.
virtual asUINT GetMethodCount() const =0
Returns the number of methods for the object type.
virtual int AddRef() const =0
Increases the reference counter.
virtual int Release() const =0
Decrease reference counter.
virtual asDWORD GetAccessMask() const =0
Returns the access mask for this type.
virtual asITypeInfo * GetParentType() const =0
Returns the parent type if this is a child type.
virtual asIScriptModule * GetModule() const =0
Returns the module where the type is declared.
virtual asIScriptFunction * GetFactoryByDecl(const char *decl) const =0
Returns the factory function by the declaration.
virtual const char * GetPropertyDeclaration(asUINT index, bool includeNamespace=false) const =0
Returns the declaration of the property.
virtual asITypeInfo * GetBaseType() const =0
Returns the object type that this type derives from.
virtual void * GetUserData(asPWORD type=0) const =0
Returns the address of the previously registered user data.
virtual int GetProperty(asUINT index, const char **name, int *typeId=0, bool *isPrivate=0, bool *isProtected=0, int *offset=0, bool *isReference=0, asDWORD *accessMask=0, int *compositeOffset=0, bool *isCompositeIndirect=0, bool *isConst=0) const =0
Returns the attributes of the property.
virtual int GetSubTypeId(asUINT subTypeIndex=0) const =0
Returns the type id of the template sub type.
virtual asUINT GetChildFuncdefCount() const =0
Returns the number of child funcdefs declared in the class.
virtual asIScriptFunction * GetBehaviourByIndex(asUINT index, asEBehaviours *outBehaviour) const =0
Returns the function and type of the behaviour.
virtual asIScriptFunction * GetMethodByName(const char *name, bool getVirtual=true) const =0
Returns the method by name.
virtual const char * GetName() const =0
Returns a temporary pointer to the name of the datatype.
virtual asQWORD GetFlags() const =0
Returns the type flags.
virtual asUINT GetEnumValueCount() const =0
Returns the number of values defined for the enum type.
virtual int GetTypedefTypeId() const =0
Returns the type id that the typedef represents.
virtual asITypeInfo * GetInterface(asUINT index) const =0
Returns a temporary pointer to the specified interface or null if none are found.
virtual asUINT GetBehaviourCount() const =0
Returns the number of behaviours.
virtual asUINT GetSize() const =0
Returns the size of the object type.
virtual const char * GetConfigGroup() const =0
Returns the config group in which the type was registered.
virtual asIScriptEngine * GetEngine() const =0
Returns a pointer to the script engine.
virtual asIScriptFunction * GetFuncdefSignature() const =0
Returns the function description for the funcdef type.
virtual const char * GetNamespace() const =0
Return the namespace of the type.
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 int asSetGlobalMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc)
Set the memory management functions that AngelScript should use.
AS_API void * asAllocMem(size_t size)
Allocate memory using the memory function registered with AngelScript.
AS_API int asResetGlobalMemoryFunctions()
Remove previously registered memory management functions.
AS_API void asFreeMem(void *mem)
Deallocates memory using the memory function registered with AngelScript.
AS_API void asUnprepareMultithread()
Frees resources prepared for multithreading.
AS_API void asAcquireExclusiveLock()
Acquire an exclusive lock.
AS_API int asAtomicDec(int &value)
Decrements the value by one and returns the result as a single atomic instruction.
AS_API void asReleaseSharedLock()
Release a shared lock.
AS_API int asThreadCleanup()
Cleans up memory allocated for the current thread.
AS_API asIThreadManager * asGetThreadManager()
Get the thread manager used by the application.
AS_API void asReleaseExclusiveLock()
Release an exclusive lock.
AS_API void asAcquireSharedLock()
Acquire a shared lock.
AS_API int asPrepareMultithread(asIThreadManager *externalMgr=0)
Sets up the internally shared resources for multithreading.
AS_API int asAtomicInc(int &value)
Increments the value by one and returns the result as a single atomic instruction.
AS_API asILockableSharedBool * asCreateLockableSharedBool()
Create a lockable shared boolean.
AS_API asIScriptEngine * asCreateScriptEngine(asDWORD version=ANGELSCRIPT_VERSION)
Creates the script engine.
asUINT asGetTypeTraits()
Returns the appropriate flags for use with RegisterObjectType.
AS_API asIScriptContext * asGetActiveContext()
Returns the currently active context.
Information on a bytecode instruction.
const char * name
Name of the instruction for debugging.
asEBCInstr bc
Bytecode instruction id.
asEBCType type
Instruction argument layout.
int stackInc
How much this argument increments the stack pointer. 0xFFFF if it depends on the arguments.
Represents a function or method pointer.
Represents a compiler message.
asEMsgType type
The type of message.
const char * section
The script section where the message is raised.
const char * message
The message text.
A struct with registers from the VM sent to a JIT compiled function.
void * objectRegister
Temporary register for managed object references/handles.
asITypeInfo * objectType
Type of the object held in the object register.
asQWORD valueRegister
Temporary register for primitives and unmanaged references.
asIScriptContext * ctx
The context to which the registers belong.
asDWORD * stackFramePointer
Function stack frame. This doesn't change during the function execution.
asDWORD * programPointer
Points to the current bytecode instruction.
asDWORD * stackPointer
Top of the stack (grows downward)
bool doProcessSuspend
Set to true if the SUSPEND instruction should be processed. Do not update this value.