PageRenderTime 83ms CodeModel.GetById 2ms app.highlight 75ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/visualizations/Vortex/angelscript/add_on/clib/as_c.cpp

http://github.com/xbmc/xbmc
C++ | 302 lines | 243 code | 23 blank | 36 comment | 2 complexity | fb6aef565653171cb34200af4174787e MD5 | raw file
  1/*
  2   AngelCode Scripting Library
  3   Copyright (c) 2003-2009 Andreas Jonsson
  4
  5   This software is provided 'as-is', without any express or implied 
  6   warranty. In no event will the authors be held liable for any 
  7   damages arising from the use of this software.
  8
  9   Permission is granted to anyone to use this software for any 
 10   purpose, including commercial applications, and to alter it and 
 11   redistribute it freely, subject to the following restrictions:
 12
 13   1. The origin of this software must not be misrepresented; you 
 14      must not claim that you wrote the original software. If you use
 15      this software in a product, an acknowledgment in the product 
 16      documentation would be appreciated but is not required.
 17
 18   2. Altered source versions must be plainly marked as such, and 
 19      must not be misrepresented as being the original software.
 20
 21   3. This notice may not be removed or altered from any source 
 22      distribution.
 23
 24   The original version of this library can be located at:
 25   http://www.angelcode.com/angelscript/
 26
 27   Andreas Jonsson
 28   andreas@angelcode.com
 29*/
 30
 31
 32//
 33// as_c.cpp
 34//
 35// A C interface to the library 
 36//
 37
 38// Include the C++ interface header so we can call the proper methods
 39#include "../../angelscript/include/angelscript.h"
 40
 41BEGIN_AS_NAMESPACE
 42
 43typedef void (*asBINARYREADFUNC_t)(void *ptr, asUINT size, void *param);
 44typedef void (*asBINARYWRITEFUNC_t)(const void *ptr, asUINT size, void *param);
 45
 46typedef enum { asTRUE = 1, asFALSE = 0 } asBOOL;
 47
 48class asCBinaryStreamC : public asIBinaryStream
 49{
 50public:
 51	asCBinaryStreamC(asBINARYWRITEFUNC_t write, asBINARYREADFUNC_t read, void *param) {this->write = write; this->read = read; this->param = param;}
 52
 53	void Write(const void *ptr, asUINT size) { write(ptr, size, param); }
 54	void Read(void *ptr, asUINT size) { read(ptr, size, param); }
 55
 56	asBINARYREADFUNC_t read;
 57	asBINARYWRITEFUNC_t write;
 58	void *param;
 59};
 60
 61extern "C"
 62{
 63
 64// Implement a global wrapper function for each of the library's interface methods
 65AS_API int                asEngine_AddRef(asIScriptEngine *e)                                                                                                                                      { return e->AddRef(); }
 66AS_API int                asEngine_Release(asIScriptEngine *e)                                                                                                                                     { return e->Release(); }
 67AS_API int                asEngine_SetEngineProperty(asIScriptEngine *e, asEEngineProp property, asPWORD value)                                                                                    { return e->SetEngineProperty(property, value); }
 68AS_API asPWORD            asEngine_GetEngineProperty(asIScriptEngine *e, asEEngineProp property)                                                                                                   { return e->GetEngineProperty(property); }
 69AS_API int                asEngine_SetMessageCallback(asIScriptEngine *e, asFUNCTION_t callback, void *obj, asDWORD callConv)                                                                      { return e->SetMessageCallback(asFUNCTION(callback), obj, callConv); }
 70AS_API int                asEngine_ClearMessageCallback(asIScriptEngine *e)                                                                                                                        { return e->ClearMessageCallback(); }
 71AS_API int                asEngine_WriteMessage(asIScriptEngine *e, const char *section, int row, int col, asEMsgType type, const char *message)                                                   { return e->WriteMessage(section, row, col, type, message); }
 72AS_API int                asEngine_RegisterObjectType(asIScriptEngine *e, const char *name, int byteSize, asDWORD flags)                                                                           { return e->RegisterObjectType(name, byteSize, flags); }
 73AS_API int                asEngine_RegisterObjectProperty(asIScriptEngine *e, const char *obj, const char *declaration, int byteOffset)                                                            { return e->RegisterObjectProperty(obj, declaration, byteOffset); }
 74AS_API int                asEngine_RegisterObjectMethod(asIScriptEngine *e, const char *obj, const char *declaration, asFUNCTION_t funcPointer, asDWORD callConv)                                  { return e->RegisterObjectMethod(obj, declaration, asFUNCTION(funcPointer), callConv); }
 75AS_API int                asEngine_RegisterObjectBehaviour(asIScriptEngine *e, const char *datatype, asEBehaviours behaviour, const char *declaration, asFUNCTION_t funcPointer, asDWORD callConv) { return e->RegisterObjectBehaviour(datatype, behaviour, declaration, asFUNCTION(funcPointer), callConv); }
 76AS_API int                asEngine_RegisterGlobalProperty(asIScriptEngine *e, const char *declaration, void *pointer)                                                                              { return e->RegisterGlobalProperty(declaration, pointer); }
 77AS_API int                asEngine_GetGlobalPropertyCount(asIScriptEngine *e)                                                                                                                      { return e->GetGlobalPropertyCount(); }
 78AS_API int                asEngine_GetGlobalPropertyByIndex(asIScriptEngine *e, asUINT index, const char **name, int *typeId, asBOOL *isConst, const char **configGroup, void **pointer)           { bool _isConst; int r = e->GetGlobalPropertyByIndex(index, name, typeId, &_isConst, configGroup, pointer); if( isConst ) *isConst = (_isConst ? asTRUE : asFALSE); return r; }
 79AS_API int                asEngine_RegisterGlobalFunction(asIScriptEngine *e, const char *declaration, asFUNCTION_t funcPointer, asDWORD callConv)                                                 { return e->RegisterGlobalFunction(declaration, asFUNCTION(funcPointer), callConv); }
 80AS_API int                asEngine_GetGlobalFunctionCount(asIScriptEngine *e)                                                                                                                      { return e->GetGlobalFunctionCount(); }
 81AS_API int                asEngine_GetGlobalFunctionIdByIndex(asIScriptEngine *e, asUINT index)                                                                                                    { return e->GetGlobalFunctionIdByIndex(index); }
 82AS_API int                asEngine_RegisterInterface(asIScriptEngine *e, const char *name)                                                                                                         { return e->RegisterInterface(name); }
 83AS_API int                asEngine_RegisterInterfaceMethod(asIScriptEngine *e, const char *intf, const char *declaration)                                                                          { return e->RegisterInterfaceMethod(intf, declaration); }
 84AS_API int                asEngine_RegisterEnum(asIScriptEngine *e, const char *type)                                                                                                              { return e->RegisterEnum(type); }
 85AS_API int                asEngine_RegisterEnumValue(asIScriptEngine *e, const char *type, const char *name, int value)                                                                            { return e->RegisterEnumValue(type,name,value); }
 86AS_API int                asEngine_GetEnumCount(asIScriptEngine *e)                                                                                                                                { return e->GetEnumCount(); }
 87AS_API const char *       asEngine_GetEnumByIndex(asIScriptEngine *e, asUINT index, int *enumTypeId, const char **configGroup)                                                                     { return e->GetEnumByIndex(index, enumTypeId, configGroup); }
 88AS_API int                asEngine_GetEnumValueCount(asIScriptEngine *e, int enumTypeId)                                                                                                           { return e->GetEnumValueCount(enumTypeId); }
 89AS_API const char *       asEngine_GetEnumValueByIndex(asIScriptEngine *e, int enumTypeId, asUINT index, int *outValue)                                                                            { return e->GetEnumValueByIndex(enumTypeId, index, outValue); }
 90AS_API int                asEngine_RegisterStringFactory(asIScriptEngine *e, const char *datatype, asFUNCTION_t factoryFunc, asDWORD callConv)                                                     { return e->RegisterStringFactory(datatype, asFUNCTION(factoryFunc), callConv); }
 91AS_API int                asEngine_GetStringFactoryReturnTypeId(asIScriptEngine *e)                                                                                                                { return e->GetStringFactoryReturnTypeId(); }
 92AS_API int                asEngine_RegisterTypedef(asIScriptEngine *e, const char *type, const char *decl)                                                                                         { return e->RegisterTypedef(type,decl); }
 93AS_API int                asEngine_GetTypedefCount(asIScriptEngine *e)                                                                                                                             { return e->GetTypedefCount(); }
 94AS_API const char *       asEngine_GetTypedefByIndex(asIScriptEngine *e, asUINT index, int *typeId, const char **configGroup)                                                                      { return e->GetTypedefByIndex(index, typeId, configGroup); }
 95AS_API int                asEngine_BeginConfigGroup(asIScriptEngine *e, const char *groupName)                                                                                                     { return e->BeginConfigGroup(groupName); }
 96AS_API int                asEngine_EndConfigGroup(asIScriptEngine *e)                                                                                                                              { return e->EndConfigGroup(); }
 97AS_API int                asEngine_RemoveConfigGroup(asIScriptEngine *e, const char *groupName)                                                                                                    { return e->RemoveConfigGroup(groupName); }
 98AS_API int                asEngine_SetConfigGroupModuleAccess(asIScriptEngine *e, const char *groupName, const char *module, asBOOL haveAccess)                                                    { return e->SetConfigGroupModuleAccess(groupName, module, haveAccess ? true : false); }
 99AS_API asIScriptModule  * asEngine_GetModule(asIScriptEngine *e, const char *module, asEGMFlags flag)                                                                                              { return e->GetModule(module, flag); }
100AS_API int                asEngine_DiscardModule(asIScriptEngine *e, const char *module)                                                                                                           { return e->DiscardModule(module); }
101AS_API asIScriptFunction *asEngine_GetFunctionDescriptorById(asIScriptEngine *e, int funcId)                                                                                                       { return e->GetFunctionDescriptorById(funcId); }
102AS_API int                asEngine_GetTypeIdByDecl(asIScriptEngine *e, const char *decl)                                                                                                           { return e->GetTypeIdByDecl(decl); }
103AS_API const char *       asEngine_GetTypeDeclaration(asIScriptEngine *e, int typeId)                                                                                                              { return e->GetTypeDeclaration(typeId); }
104AS_API int                asEngine_GetSizeOfPrimitiveType(asIScriptEngine *e, int typeId)                                                                                                          { return e->GetSizeOfPrimitiveType(typeId); }
105AS_API asIObjectType *    asEngine_GetObjectTypeById(asIScriptEngine *e, int typeId)                                                                                                               { return e->GetObjectTypeById(typeId); }
106AS_API asIObjectType *    asEngine_GetObjectTypeByIndex(asIScriptEngine *e, asUINT index)                                                                                                          { return e->GetObjectTypeByIndex(index); }
107AS_API int                asEngine_GetObjectTypeCount(asIScriptEngine *e)                                                                                                                          { return e->GetObjectTypeCount(); }
108AS_API asIScriptContext * asEngine_CreateContext(asIScriptEngine *e)                                                                                                                               { return e->CreateContext(); }
109AS_API void *             asEngine_CreateScriptObject(asIScriptEngine *e, int typeId)                                                                                                              { return e->CreateScriptObject(typeId); }
110AS_API void *             asEngine_CreateScriptObjectCopy(asIScriptEngine *e, void *obj, int typeId)                                                                                               { return e->CreateScriptObjectCopy(obj, typeId); }
111AS_API void               asEngine_CopyScriptObject(asIScriptEngine *e, void *dstObj, void *srcObj, int typeId)                                                                                    { e->CopyScriptObject(dstObj, srcObj, typeId); }
112AS_API void               asEngine_ReleaseScriptObject(asIScriptEngine *e, void *obj, int typeId)                                                                                                  { e->ReleaseScriptObject(obj, typeId); }
113AS_API void               asEngine_AddRefScriptObject(asIScriptEngine *e, void *obj, int typeId)                                                                                                   { e->AddRefScriptObject(obj, typeId); }
114AS_API asBOOL             asEngine_IsHandleCompatibleWithObject(asIScriptEngine *e, void *obj, int objTypeId, int handleTypeId)                                                                    { return e->IsHandleCompatibleWithObject(obj, objTypeId, handleTypeId) ? asTRUE : asFALSE; }
115AS_API int                asEngine_ExecuteString(asIScriptEngine *e, const char *module, const char *script, asIScriptContext **ctx, asDWORD flags)                                                { return e->ExecuteString(module, script, ctx, flags); }
116AS_API int                asEngine_GarbageCollect(asIScriptEngine *e, asDWORD flags)                                                                                                               { return e->GarbageCollect(flags); }
117AS_API void               asEngine_GetGCStatistics(asIScriptEngine *e, asUINT *currentSize, asUINT *totalDestroyed, asUINT *totalDetected)                                                         { e->GetGCStatistics(currentSize, totalDestroyed, totalDetected); }
118AS_API void               asEngine_NotifyGarbageCollectorOfNewObject(asIScriptEngine *e, void *obj, int typeId)                                                                                    { e->NotifyGarbageCollectorOfNewObject(obj, typeId); }
119AS_API void               asEngine_GCEnumCallback(asIScriptEngine *e, void *obj)                                                                                                                   { e->GCEnumCallback(obj); }
120AS_API void *             asEngine_SetUserData(asIScriptEngine *e, void *data)                                                                                                                     { return e->SetUserData(data); }
121AS_API void *             asEngine_GetUserData(asIScriptEngine *e)                                                                                                                                 { return e->GetUserData(); }
122
123AS_API asIScriptEngine   *asModule_GetEngine(asIScriptModule *m)                                                                               { return m->GetEngine(); }
124AS_API void               asModule_SetName(asIScriptModule *m, const char *name)                                                               { m->SetName(name); }
125AS_API const char        *asModule_GetName(asIScriptModule *m)                                                                                 { return m->GetName(); }
126AS_API int                asModule_AddScriptSection(asIScriptModule *m, const char *name, const char *code, size_t codeLength, int lineOffset) { return m->AddScriptSection(name, code, codeLength, lineOffset); }
127AS_API int                asModule_Build(asIScriptModule *m)                                                                                   { return m->Build(); }
128AS_API int                asModule_GetFunctionCount(asIScriptModule *m)                                                                        { return m->GetFunctionCount(); }
129AS_API int                asModule_GetFunctionIdByIndex(asIScriptModule *m, int index)                                                         { return m->GetFunctionIdByIndex(index); }
130AS_API int                asModule_GetFunctionIdByName(asIScriptModule *m, const char *name)                                                   { return m->GetFunctionIdByName(name); }
131AS_API int                asModule_GetFunctionIdByDecl(asIScriptModule *m, const char *decl)                                                   { return m->GetFunctionIdByDecl(decl); }
132AS_API asIScriptFunction *asModule_GetFunctionDescriptorByIndex(asIScriptModule *m, int index)                                                 { return m->GetFunctionDescriptorByIndex(index); }
133AS_API asIScriptFunction *asModule_GetFunctionDescriptorById(asIScriptModule *m, int funcId)                                                   { return m->GetFunctionDescriptorById(funcId); }
134AS_API int                asModule_ResetGlobalVars(asIScriptModule *m)                                                                         { return m->ResetGlobalVars(); }
135AS_API int                asModule_GetGlobalVarCount(asIScriptModule *m)                                                                       { return m->GetGlobalVarCount(); }
136AS_API int                asModule_GetGlobalVarIndexByName(asIScriptModule *m, const char *name)                                               { return m->GetGlobalVarIndexByName(name); }
137AS_API int                asModule_GetGlobalVarIndexByDecl(asIScriptModule *m, const char *decl)                                               { return m->GetGlobalVarIndexByDecl(decl); }
138AS_API const char        *asModule_GetGlobalVarDeclaration(asIScriptModule *m, int index)                                                      { return m->GetGlobalVarDeclaration(index); }
139AS_API const char        *asModule_GetGlobalVarName(asIScriptModule *m, int index)                                                             { return m->GetGlobalVarName(index); }
140AS_API int                asModule_GetGlobalVarTypeId(asIScriptModule *m, int index, asBOOL *isConst)                                          { bool _isConst; int r = m->GetGlobalVarTypeId(index, &_isConst); if( isConst ) *isConst = (_isConst ? asTRUE : asFALSE); return r; }
141AS_API void              *asModule_GetAddressOfGlobalVar(asIScriptModule *m, int index)                                                        { return m->GetAddressOfGlobalVar(index); }
142AS_API int                asModule_GetObjectTypeCount(asIScriptModule *m)                                                                      { return m->GetObjectTypeCount(); }
143AS_API asIObjectType     *asModule_GetObjectTypeByIndex(asIScriptModule *m, asUINT index)                                                      { return m->GetObjectTypeByIndex(index); }
144AS_API int                asModule_GetTypeIdByDecl(asIScriptModule *m, const char *decl)                                                       { return m->GetTypeIdByDecl(decl); }
145AS_API int                asModule_GetEnumCount(asIScriptModule *m)                                                                            { return m->GetEnumCount(); }
146AS_API const char *       asModule_GetEnumByIndex(asIScriptModule *m, asUINT index, int *enumTypeId)                                           { return m->GetEnumByIndex(index, enumTypeId); }
147AS_API int                asModule_GetEnumValueCount(asIScriptModule *m, int enumTypeId)                                                       { return m->GetEnumValueCount(enumTypeId); }
148AS_API const char *       asModule_GetEnumValueByIndex(asIScriptModule *m, int enumTypeId, asUINT index, int *outValue)                        { return m->GetEnumValueByIndex(enumTypeId, index, outValue); }
149AS_API int                asModule_GetTypedefCount(asIScriptModule *m)                                                                         { return m->GetTypedefCount(); }
150AS_API const char *       asModule_GetTypedefByIndex(asIScriptModule *m, asUINT index, int *typeId)                                            { return m->GetTypedefByIndex(index, typeId); }
151AS_API int                asModule_GetImportedFunctionCount(asIScriptModule *m)                                                                { return m->GetImportedFunctionCount(); }
152AS_API int                asModule_GetImportedFunctionIndexByDecl(asIScriptModule *m, const char *decl)                                        { return m->GetImportedFunctionIndexByDecl(decl); }
153AS_API const char        *asModule_GetImportedFunctionDeclaration(asIScriptModule *m, int importIndex)                                         { return m->GetImportedFunctionDeclaration(importIndex); }
154AS_API const char        *asModule_GetImportedFunctionSourceModule(asIScriptModule *m, int importIndex)                                        { return m->GetImportedFunctionSourceModule(importIndex); }
155AS_API int                asModule_BindImportedFunction(asIScriptModule *m, int importIndex, int funcId)                                       { return m->BindImportedFunction(importIndex, funcId); }
156AS_API int                asModule_UnbindImportedFunction(asIScriptModule *m, int importIndex)                                                 { return m->UnbindImportedFunction(importIndex); }
157AS_API int                asModule_BindAllImportedFunctions(asIScriptModule *m)                                                                { return m->BindAllImportedFunctions(); }
158AS_API int                asModule_UnbindAllImportedFunctions(asIScriptModule *m)                                                              { return m->UnbindAllImportedFunctions(); }
159AS_API int                asModule_SaveByteCode(asIScriptModule *m, asIBinaryStream *out)                                                      { return m->SaveByteCode(out); }
160AS_API int                asModule_LoadByteCode(asIScriptModule *m, asIBinaryStream *in)                                                       { return m->LoadByteCode(in); }
161                                                                                                                               
162AS_API int              asContext_AddRef(asIScriptContext *c)                                                               { return c->AddRef(); }
163AS_API int              asContext_Release(asIScriptContext *c)                                                              { return c->Release(); }
164AS_API asIScriptEngine *asContext_GetEngine(asIScriptContext *c)                                                            { return c->GetEngine(); }
165AS_API int              asContext_GetState(asIScriptContext *c)                                                             { return c->GetState(); }
166AS_API int              asContext_Prepare(asIScriptContext *c, int funcID)                                                  { return c->Prepare(funcID); }
167AS_API int              asContext_SetArgByte(asIScriptContext *c, asUINT arg, asBYTE value)                                 { return c->SetArgByte(arg, value); } 
168AS_API int              asContext_SetArgWord(asIScriptContext *c, asUINT arg, asWORD value)                                 { return c->SetArgWord(arg, value); } 
169AS_API int              asContext_SetArgDWord(asIScriptContext *c, asUINT arg, asDWORD value)                               { return c->SetArgDWord(arg, value); } 
170AS_API int              asContext_SetArgQWord(asIScriptContext *c, asUINT arg, asQWORD value)                               { return c->SetArgQWord(arg, value); }
171AS_API int              asContext_SetArgFloat(asIScriptContext *c, asUINT arg, float value)                                 { return c->SetArgFloat(arg, value); }
172AS_API int              asContext_SetArgDouble(asIScriptContext *c, asUINT arg, double value)                               { return c->SetArgDouble(arg, value); }
173AS_API int              asContext_SetArgAddress(asIScriptContext *c, asUINT arg, void *addr)                                { return c->SetArgAddress(arg, addr); }
174AS_API int              asContext_SetArgObject(asIScriptContext *c, asUINT arg, void *obj)                                  { return c->SetArgObject(arg, obj); }
175AS_API void *           asContext_GetAddressOfArg(asIScriptContext *c, asUINT arg)                                          { return c->GetAddressOfArg(arg); }
176AS_API int              asContext_SetObject(asIScriptContext *c, void *obj)                                                 { return c->SetObject(obj); }
177AS_API asBYTE           asContext_GetReturnByte(asIScriptContext *c)                                                        { return c->GetReturnByte(); }
178AS_API asWORD           asContext_GetReturnWord(asIScriptContext *c)                                                        { return c->GetReturnWord(); }
179AS_API asDWORD          asContext_GetReturnDWord(asIScriptContext *c)                                                       { return c->GetReturnDWord(); }
180AS_API asQWORD          asContext_GetReturnQWord(asIScriptContext *c)                                                       { return c->GetReturnQWord(); }
181AS_API float            asContext_GetReturnFloat(asIScriptContext *c)                                                       { return c->GetReturnFloat(); }
182AS_API double           asContext_GetReturnDouble(asIScriptContext *c)                                                      { return c->GetReturnDouble(); }
183AS_API void *           asContext_GetReturnAddress(asIScriptContext *c)                                                     { return c->GetReturnAddress(); }
184AS_API void *           asContext_GetReturnObject(asIScriptContext *c)                                                      { return c->GetReturnObject(); }
185AS_API void *           asContext_GetAddressOfReturnValue(asIScriptContext *c)                                              { return c->GetAddressOfReturnValue(); }
186AS_API int              asContext_Execute(asIScriptContext *c)                                                              { return c->Execute(); }
187AS_API int              asContext_Abort(asIScriptContext *c)                                                                { return c->Abort(); }
188AS_API int              asContext_Suspend(asIScriptContext *c)                                                              { return c->Suspend(); }
189AS_API int              asContext_GetCurrentLineNumber(asIScriptContext *c, int *column)                                    { return c->GetCurrentLineNumber(column); }
190AS_API int              asContext_GetCurrentFunction(asIScriptContext *c)                                                   { return c->GetCurrentFunction(); }
191AS_API int              asContext_SetException(asIScriptContext *c, const char *string)                                     { return c->SetException(string); }
192AS_API int              asContext_GetExceptionLineNumber(asIScriptContext *c, int *column)                                  { return c->GetExceptionLineNumber(column); }
193AS_API int              asContext_GetExceptionFunction(asIScriptContext *c)                                                 { return c->GetExceptionFunction(); }
194AS_API const char *     asContext_GetExceptionString(asIScriptContext *c)                                                   { return c->GetExceptionString(); }
195AS_API int              asContext_SetLineCallback(asIScriptContext *c, asFUNCTION_t callback, void *obj, int callConv)      { return c->SetLineCallback(asFUNCTION(callback), obj, callConv); }
196AS_API void             asContext_ClearLineCallback(asIScriptContext *c)                                                    { c->ClearLineCallback(); }
197AS_API int              asContext_SetExceptionCallback(asIScriptContext *c, asFUNCTION_t callback, void *obj, int callConv) { return c->SetExceptionCallback(asFUNCTION(callback), obj, callConv); }
198AS_API void             asContext_ClearExceptionCallback(asIScriptContext *c)                                               { c->ClearExceptionCallback(); }
199AS_API int              asContext_GetCallstackSize(asIScriptContext *c)                                                     { return c->GetCallstackSize(); }
200AS_API int              asContext_GetCallstackFunction(asIScriptContext *c, int index)                                      { return c->GetCallstackFunction(index); }
201AS_API int              asContext_GetCallstackLineNumber(asIScriptContext *c, int index, int *column)                       { return c->GetCallstackLineNumber(index, column); }
202AS_API int              asContext_GetVarCount(asIScriptContext *c, int stackLevel)                                          { return c->GetVarCount(stackLevel); }
203AS_API const char *     asContext_GetVarName(asIScriptContext *c, int varIndex, int stackLevel)                             { return c->GetVarName(varIndex, stackLevel); }
204AS_API const char *     asContext_GetVarDeclaration(asIScriptContext *c, int varIndex, int stackLevel)                      { return c->GetVarDeclaration(varIndex, stackLevel); }
205AS_API int              asContext_GetVarTypeId(asIScriptContext *c, int varIndex, int stackLevel)                           { return c->GetVarTypeId(varIndex, stackLevel); }
206AS_API void *           asContext_GetAddressOfVar(asIScriptContext *c, int varIndex, int stackLevel)                        { return c->GetAddressOfVar(varIndex, stackLevel); }
207AS_API int              asContext_GetThisTypeId(asIScriptContext *c, int stackLevel)                                        { return c->GetThisTypeId(stackLevel); }
208AS_API void *           asContext_GetThisPointer(asIScriptContext *c, int stackLevel)                                       { return c->GetThisPointer(stackLevel); }
209AS_API void *           asContext_SetUserData(asIScriptContext *c, void *data)                                              { return c->SetUserData(data); }
210AS_API void *           asContext_GetUserData(asIScriptContext *c)                                                          { return c->GetUserData(); }
211
212AS_API asIScriptEngine *asGeneric_GetEngine(asIScriptGeneric *g)                    { return g->GetEngine(); }
213AS_API int              asGeneric_GetFunctionId(asIScriptGeneric *g)                { return g->GetFunctionId(); }
214AS_API void *           asGeneric_GetObject(asIScriptGeneric *g)                    { return g->GetObject(); }
215AS_API int              asGeneric_GetObjectTypeId(asIScriptGeneric *g)              { return g->GetObjectTypeId(); }
216AS_API int              asGeneric_GetArgCount(asIScriptGeneric *g)                  { return g->GetArgCount(); }
217AS_API asBYTE           asGeneric_GetArgByte(asIScriptGeneric *g, asUINT arg)       { return g->GetArgByte(arg); }
218AS_API asWORD           asGeneric_GetArgWord(asIScriptGeneric *g, asUINT arg)       { return g->GetArgWord(arg); }
219AS_API asDWORD          asGeneric_GetArgDWord(asIScriptGeneric *g, asUINT arg)      { return g->GetArgDWord(arg); }
220AS_API asQWORD          asGeneric_GetArgQWord(asIScriptGeneric *g, asUINT arg)      { return g->GetArgQWord(arg); }
221AS_API float            asGeneric_GetArgFloat(asIScriptGeneric *g, asUINT arg)      { return g->GetArgFloat(arg); }
222AS_API double           asGeneric_GetArgDouble(asIScriptGeneric *g, asUINT arg)     { return g->GetArgDouble(arg); }
223AS_API void *           asGeneric_GetArgAddress(asIScriptGeneric *g, asUINT arg)    { return g->GetArgAddress(arg); }
224AS_API void *           asGeneric_GetArgObject(asIScriptGeneric *g, asUINT arg)     { return g->GetArgObject(arg); }
225AS_API void *           asGeneric_GetAddressOfArg(asIScriptGeneric *g, asUINT arg)  { return g->GetAddressOfArg(arg); }
226AS_API int              asGeneric_GetArgTypeId(asIScriptGeneric *g, asUINT arg)     { return g->GetArgTypeId(arg); }
227AS_API int              asGeneric_SetReturnByte(asIScriptGeneric *g, asBYTE val)    { return g->SetReturnByte(val); }
228AS_API int              asGeneric_SetReturnWord(asIScriptGeneric *g, asWORD val)    { return g->SetReturnWord(val); }
229AS_API int              asGeneric_SetReturnDWord(asIScriptGeneric *g, asDWORD val)  { return g->SetReturnDWord(val); }
230AS_API int              asGeneric_SetReturnQWord(asIScriptGeneric *g, asQWORD val)  { return g->SetReturnQWord(val); }
231AS_API int              asGeneric_SetReturnFloat(asIScriptGeneric *g, float val)    { return g->SetReturnFloat(val); }
232AS_API int              asGeneric_SetReturnDouble(asIScriptGeneric *g, double val)  { return g->SetReturnDouble(val); }
233AS_API int              asGeneric_SetReturnAddress(asIScriptGeneric *g, void *addr) { return g->SetReturnAddress(addr); }
234AS_API int              asGeneric_SetReturnObject(asIScriptGeneric *g, void *obj)   { return g->SetReturnObject(obj); }
235AS_API void *           asGeneric_GetAddressOfReturnLocation(asIScriptGeneric *g)   { return g->GetAddressOfReturnLocation(); }
236AS_API int              asGeneric_GetReturnTypeId(asIScriptGeneric *g)              { return g->GetReturnTypeId(); }
237
238AS_API asIScriptEngine *asObject_GetEngine(asIScriptObject *s)                        { return s->GetEngine(); }
239AS_API int              asObject_AddRef(asIScriptObject *s)                           { return s->AddRef(); }
240AS_API int              asObject_Release(asIScriptObject *s)                          { return s->Release(); }
241AS_API int              asObject_GetTypeId(asIScriptObject *s)                        { return s->GetTypeId(); }
242AS_API asIObjectType *  asObject_GetObjectType(asIScriptObject *s)                    { return s->GetObjectType(); }
243AS_API int              asObject_GetPropertyCount(asIScriptObject *s)                 { return s->GetPropertyCount(); }
244AS_API int              asObject_GetPropertyTypeId(asIScriptObject *s, asUINT prop)   { return s->GetPropertyTypeId(prop); }
245AS_API const char *     asObject_GetPropertyName(asIScriptObject *s, asUINT prop)     { return s->GetPropertyName(prop); }
246AS_API void *           asObject_GetAddressOfProperty(asIScriptObject *s, asUINT prop)  { return s->GetAddressOfProperty(prop); }
247AS_API int              asObject_CopyFrom(asIScriptObject *s, asIScriptObject *other) { return s->CopyFrom(other); }
248
249AS_API asIScriptEngine *asArray_GetEngine(asIScriptArray *a)                       { return a->GetEngine(); }                
250AS_API int              asArray_AddRef(asIScriptArray *a)                          { return a->AddRef(); }
251AS_API int              asArray_Release(asIScriptArray *a)                         { return a->Release(); }
252AS_API int              asArray_GetArrayTypeId(asIScriptArray *a)                  { return a->GetArrayTypeId(); }
253AS_API int              asArray_GetElementTypeId(asIScriptArray *a)                { return a->GetElementTypeId(); }
254AS_API asUINT           asArray_GetElementCount(asIScriptArray *a)                 { return a->GetElementCount(); }
255AS_API void *           asArray_GetElementPointer(asIScriptArray *a, asUINT index) { return a->GetElementPointer(index); }
256AS_API void             asArray_Resize(asIScriptArray *a, asUINT size)             { a->Resize(size); }
257AS_API int              asArray_CopyFrom(asIScriptArray *a, asIScriptArray *other) { return a->CopyFrom(other); }
258
259AS_API asIScriptEngine         *asObjectType_GetEngine(const asIObjectType *o)                                                      { return o->GetEngine(); }
260AS_API int                      asObjectType_AddRef(asIObjectType *o)                                                         { return o->AddRef(); }
261AS_API int                      asObjectType_Release(asIObjectType *o)                                                        { return o->Release(); }
262AS_API const char              *asObjectType_GetName(const asIObjectType *o)                                                        { return o->GetName(); }
263AS_API asIObjectType           *asObjectType_GetBaseType(const asIObjectType *o)                                                    { return o->GetBaseType(); }
264AS_API asDWORD                  asObjectType_GetFlags(const asIObjectType *o)                                                       { return o->GetFlags(); }
265AS_API asUINT                   asObjectType_GetSize(const asIObjectType *o)                                                        { return o->GetSize(); }
266AS_API int                      asObjectType_GetTypeId(const asIObjectType *o)                                                      { return o->GetTypeId(); }
267AS_API int                      asObjectType_GetSubTypeId(const asIObjectType *o)                                                   { return o->GetSubTypeId(); }
268AS_API int                      asObjectType_GetBehaviourCount(const asIObjectType *o)                                              { return o->GetBehaviourCount(); }
269AS_API int                      asObjectType_GetBehaviourByIndex(const asIObjectType *o, asUINT index, asEBehaviours *outBehaviour) { return o->GetBehaviourByIndex(index, outBehaviour); }
270AS_API int                      asObjectType_GetInterfaceCount(const asIObjectType *o)                                              { return o->GetInterfaceCount(); }
271AS_API asIObjectType           *asObjectType_GetInterface(const asIObjectType *o, asUINT index)                                     { return o->GetInterface(index); }
272AS_API int                      asObjectType_GetFactoryCount(const asIObjectType *o)                                                { return o->GetFactoryCount(); }
273AS_API int                      asObjectType_GetFactoryIdByIndex(const asIObjectType *o, int index)                                 { return o->GetFactoryIdByIndex(index); }
274AS_API int                      asObjectType_GetFactoryIdByDecl(const asIObjectType *o, const char *decl)                           { return o->GetFactoryIdByDecl(decl); }
275AS_API int                      asObjectType_GetMethodCount(const asIObjectType *o)                                                 { return o->GetMethodCount(); }
276AS_API int                      asObjectType_GetMethodIdByIndex(const asIObjectType *o, int index)                                  { return o->GetMethodIdByIndex(index); }
277AS_API int                      asObjectType_GetMethodIdByName(const asIObjectType *o, const char *name)                            { return o->GetMethodIdByName(name); }
278AS_API int                      asObjectType_GetMethodIdByDecl(const asIObjectType *o, const char *decl)                            { return o->GetMethodIdByDecl(decl); }
279AS_API asIScriptFunction       *asObjectType_GetMethodDescriptorByIndex(const asIObjectType *o, int index)                          { return o->GetMethodDescriptorByIndex(index); }
280AS_API int                      asObjectType_GetPropertyCount(const asIObjectType *o)                                               { return o->GetPropertyCount(); }
281AS_API int                      asObjectType_GetPropertyTypeId(const asIObjectType *o, asUINT prop)                                 { return o->GetPropertyTypeId(prop); }
282AS_API const char              *asObjectType_GetPropertyName(const asIObjectType *o, asUINT prop)                                   { return o->GetPropertyName(prop); }
283AS_API int                      asObjectType_GetPropertyOffset(const asIObjectType *o, asUINT prop)                                 { return o->GetPropertyOffset(prop); }
284                                                                                                               
285AS_API asIScriptEngine     *asScriptFunction_GetEngine(const asIScriptFunction *f)                                           { return f->GetEngine(); }
286AS_API const char          *asScriptFunction_GetModuleName(const asIScriptFunction *f)                                       { return f->GetModuleName(); }
287AS_API asIObjectType       *asScriptFunction_GetObjectType(const asIScriptFunction *f)                                       { return f->GetObjectType(); }
288AS_API const char          *asScriptFunction_GetObjectName(const asIScriptFunction *f)                                       { return f->GetObjectName(); }
289AS_API const char          *asScriptFunction_GetName(const asIScriptFunction *f)                                             { return f->GetName(); }
290AS_API const char          *asScriptFunction_GetDeclaration(const asIScriptFunction *f, bool includeObjectName)              { return f->GetDeclaration(includeObjectName); }
291AS_API bool                 asScriptFunction_IsClassMethod(const asIScriptFunction *f)                                       { return f->IsClassMethod(); }
292AS_API bool                 asScriptFunction_IsInterfaceMethod(const asIScriptFunction *f)                                   { return f->IsInterfaceMethod(); }
293AS_API int                  asScriptFunction_GetParamCount(const asIScriptFunction *f)                                       { return f->GetParamCount(); }
294AS_API int                  asScriptFunction_GetParamTypeId(const asIScriptFunction *f, int index)                           { return f->GetParamTypeId(index); }
295AS_API int                  asScriptFunction_GetReturnTypeId(const asIScriptFunction *f)                                     { return f->GetReturnTypeId(); }
296                                                                                                  
297}
298
299END_AS_NAMESPACE
300
301
302