12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548 |
- /* ----------------------------------------------------------------------------
- * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 2.0.7
- *
- * This file is not intended to be easily readable and contains a number of
- * coding conventions designed to improve portability and efficiency. Do not make
- * changes to this file unless you know what you are doing--modify the SWIG
- * interface file instead.
- * ----------------------------------------------------------------------------- */
- #define SWIGLUA
- #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
- #define SWIG_LUA_MODULE_GLOBAL
- #ifdef __cplusplus
- /* SwigValueWrapper is described in swig.swg */
- template<typename T> class SwigValueWrapper {
- struct SwigMovePointer {
- T *ptr;
- SwigMovePointer(T *p) : ptr(p) { }
- ~SwigMovePointer() { delete ptr; }
- SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
- } pointer;
- SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
- SwigValueWrapper(const SwigValueWrapper<T>& rhs);
- public:
- SwigValueWrapper() : pointer(0) { }
- SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
- operator T&() const { return *pointer.ptr; }
- T *operator&() { return pointer.ptr; }
- };
- template <typename T> T SwigValueInit() {
- return T();
- }
- #endif
- /* -----------------------------------------------------------------------------
- * This section contains generic SWIG labels for method/variable
- * declarations/attributes, and other compiler dependent labels.
- * ----------------------------------------------------------------------------- */
- /* template workaround for compilers that cannot correctly implement the C++ standard */
- #ifndef SWIGTEMPLATEDISAMBIGUATOR
- # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
- # define SWIGTEMPLATEDISAMBIGUATOR template
- # elif defined(__HP_aCC)
- /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
- /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
- # define SWIGTEMPLATEDISAMBIGUATOR template
- # else
- # define SWIGTEMPLATEDISAMBIGUATOR
- # endif
- #endif
- /* inline attribute */
- #ifndef SWIGINLINE
- # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
- # define SWIGINLINE inline
- # else
- # define SWIGINLINE
- # endif
- #endif
- /* attribute recognised by some compilers to avoid 'unused' warnings */
- #ifndef SWIGUNUSED
- # if defined(__GNUC__)
- # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
- # define SWIGUNUSED __attribute__ ((__unused__))
- # else
- # define SWIGUNUSED
- # endif
- # elif defined(__ICC)
- # define SWIGUNUSED __attribute__ ((__unused__))
- # else
- # define SWIGUNUSED
- # endif
- #endif
- #ifndef SWIG_MSC_UNSUPPRESS_4505
- # if defined(_MSC_VER)
- # pragma warning(disable : 4505) /* unreferenced local function has been removed */
- # endif
- #endif
- #ifndef SWIGUNUSEDPARM
- # ifdef __cplusplus
- # define SWIGUNUSEDPARM(p)
- # else
- # define SWIGUNUSEDPARM(p) p SWIGUNUSED
- # endif
- #endif
- /* internal SWIG method */
- #ifndef SWIGINTERN
- # define SWIGINTERN static SWIGUNUSED
- #endif
- /* internal inline SWIG method */
- #ifndef SWIGINTERNINLINE
- # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
- #endif
- /* exporting methods */
- #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
- # ifndef GCC_HASCLASSVISIBILITY
- # define GCC_HASCLASSVISIBILITY
- # endif
- #endif
- #ifndef SWIGEXPORT
- # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
- # if defined(STATIC_LINKED)
- # define SWIGEXPORT
- # else
- # define SWIGEXPORT __declspec(dllexport)
- # endif
- # else
- # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
- # define SWIGEXPORT __attribute__ ((visibility("default")))
- # else
- # define SWIGEXPORT
- # endif
- # endif
- #endif
- /* calling conventions for Windows */
- #ifndef SWIGSTDCALL
- # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
- # define SWIGSTDCALL __stdcall
- # else
- # define SWIGSTDCALL
- # endif
- #endif
- /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
- #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
- # define _CRT_SECURE_NO_DEPRECATE
- #endif
- /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
- #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
- # define _SCL_SECURE_NO_DEPRECATE
- #endif
- /* -----------------------------------------------------------------------------
- * swigrun.swg
- *
- * This file contains generic C API SWIG runtime support for pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
- /* This should only be incremented when either the layout of swig_type_info changes,
- or for whatever reason, the runtime changes incompatibly */
- #define SWIG_RUNTIME_VERSION "4"
- /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
- #ifdef SWIG_TYPE_TABLE
- # define SWIG_QUOTE_STRING(x) #x
- # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
- # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
- #else
- # define SWIG_TYPE_TABLE_NAME
- #endif
- /*
- You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
- creating a static or dynamic library from the SWIG runtime code.
- In 99.9% of the cases, SWIG just needs to declare them as 'static'.
-
- But only do this if strictly necessary, ie, if you have problems
- with your compiler or suchlike.
- */
- #ifndef SWIGRUNTIME
- # define SWIGRUNTIME SWIGINTERN
- #endif
- #ifndef SWIGRUNTIMEINLINE
- # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
- #endif
- /* Generic buffer size */
- #ifndef SWIG_BUFFER_SIZE
- # define SWIG_BUFFER_SIZE 1024
- #endif
- /* Flags for pointer conversions */
- #define SWIG_POINTER_DISOWN 0x1
- #define SWIG_CAST_NEW_MEMORY 0x2
- /* Flags for new pointer objects */
- #define SWIG_POINTER_OWN 0x1
- /*
- Flags/methods for returning states.
-
- The SWIG conversion methods, as ConvertPtr, return an integer
- that tells if the conversion was successful or not. And if not,
- an error code can be returned (see swigerrors.swg for the codes).
-
- Use the following macros/flags to set or process the returning
- states.
-
- In old versions of SWIG, code such as the following was usually written:
- if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
- // success code
- } else {
- //fail code
- }
- Now you can be more explicit:
- int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
- if (SWIG_IsOK(res)) {
- // success code
- } else {
- // fail code
- }
- which is the same really, but now you can also do
- Type *ptr;
- int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
- if (SWIG_IsOK(res)) {
- // success code
- if (SWIG_IsNewObj(res) {
- ...
- delete *ptr;
- } else {
- ...
- }
- } else {
- // fail code
- }
-
- I.e., now SWIG_ConvertPtr can return new objects and you can
- identify the case and take care of the deallocation. Of course that
- also requires SWIG_ConvertPtr to return new result values, such as
- int SWIG_ConvertPtr(obj, ptr,...) {
- if (<obj is ok>) {
- if (<need new object>) {
- *ptr = <ptr to new allocated object>;
- return SWIG_NEWOBJ;
- } else {
- *ptr = <ptr to old object>;
- return SWIG_OLDOBJ;
- }
- } else {
- return SWIG_BADOBJ;
- }
- }
- Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
- more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
- SWIG errors code.
- Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
- allows to return the 'cast rank', for example, if you have this
- int food(double)
- int fooi(int);
- and you call
-
- food(1) // cast rank '1' (1 -> 1.0)
- fooi(1) // cast rank '0'
- just use the SWIG_AddCast()/SWIG_CheckState()
- */
- #define SWIG_OK (0)
- #define SWIG_ERROR (-1)
- #define SWIG_IsOK(r) (r >= 0)
- #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
- /* The CastRankLimit says how many bits are used for the cast rank */
- #define SWIG_CASTRANKLIMIT (1 << 8)
- /* The NewMask denotes the object was created (using new/malloc) */
- #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
- /* The TmpMask is for in/out typemaps that use temporal objects */
- #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
- /* Simple returning values */
- #define SWIG_BADOBJ (SWIG_ERROR)
- #define SWIG_OLDOBJ (SWIG_OK)
- #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
- #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
- /* Check, add and del mask methods */
- #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
- #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
- #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
- #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
- #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
- #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
- /* Cast-Rank Mode */
- #if defined(SWIG_CASTRANK_MODE)
- # ifndef SWIG_TypeRank
- # define SWIG_TypeRank unsigned long
- # endif
- # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
- # define SWIG_MAXCASTRANK (2)
- # endif
- # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
- # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
- SWIGINTERNINLINE int SWIG_AddCast(int r) {
- return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
- }
- SWIGINTERNINLINE int SWIG_CheckState(int r) {
- return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
- }
- #else /* no cast-rank mode */
- # define SWIG_AddCast
- # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
- #endif
- #include <string.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef void *(*swig_converter_func)(void *, int *);
- typedef struct swig_type_info *(*swig_dycast_func)(void **);
- /* Structure to store information on one type */
- typedef struct swig_type_info {
- const char *name; /* mangled name of this type */
- const char *str; /* human readable name of this type */
- swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
- struct swig_cast_info *cast; /* linked list of types that can cast into this type */
- void *clientdata; /* language specific type data */
- int owndata; /* flag if the structure owns the clientdata */
- } swig_type_info;
- /* Structure to store a type and conversion function used for casting */
- typedef struct swig_cast_info {
- swig_type_info *type; /* pointer to type that is equivalent to this type */
- swig_converter_func converter; /* function to cast the void pointers */
- struct swig_cast_info *next; /* pointer to next cast in linked list */
- struct swig_cast_info *prev; /* pointer to the previous cast */
- } swig_cast_info;
- /* Structure used to store module information
- * Each module generates one structure like this, and the runtime collects
- * all of these structures and stores them in a circularly linked list.*/
- typedef struct swig_module_info {
- swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
- size_t size; /* Number of types in this module */
- struct swig_module_info *next; /* Pointer to next element in circularly linked list */
- swig_type_info **type_initial; /* Array of initially generated type structures */
- swig_cast_info **cast_initial; /* Array of initially generated casting structures */
- void *clientdata; /* Language specific module data */
- } swig_module_info;
- /*
- Compare two type names skipping the space characters, therefore
- "char*" == "char *" and "Class<int>" == "Class<int >", etc.
- Return 0 when the two name types are equivalent, as in
- strncmp, but skipping ' '.
- */
- SWIGRUNTIME int
- SWIG_TypeNameComp(const char *f1, const char *l1,
- const char *f2, const char *l2) {
- for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
- while ((*f1 == ' ') && (f1 != l1)) ++f1;
- while ((*f2 == ' ') && (f2 != l2)) ++f2;
- if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
- }
- return (int)((l1 - f1) - (l2 - f2));
- }
- /*
- Check type equivalence in a name list like <name1>|<name2>|...
- Return 0 if not equal, 1 if equal
- */
- SWIGRUNTIME int
- SWIG_TypeEquiv(const char *nb, const char *tb) {
- int equiv = 0;
- const char* te = tb + strlen(tb);
- const char* ne = nb;
- while (!equiv && *ne) {
- for (nb = ne; *ne; ++ne) {
- if (*ne == '|') break;
- }
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
- if (*ne) ++ne;
- }
- return equiv;
- }
- /*
- Check type equivalence in a name list like <name1>|<name2>|...
- Return 0 if equal, -1 if nb < tb, 1 if nb > tb
- */
- SWIGRUNTIME int
- SWIG_TypeCompare(const char *nb, const char *tb) {
- int equiv = 0;
- const char* te = tb + strlen(tb);
- const char* ne = nb;
- while (!equiv && *ne) {
- for (nb = ne; *ne; ++ne) {
- if (*ne == '|') break;
- }
- equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
- if (*ne) ++ne;
- }
- return equiv;
- }
- /*
- Check the typename
- */
- SWIGRUNTIME swig_cast_info *
- SWIG_TypeCheck(const char *c, swig_type_info *ty) {
- if (ty) {
- swig_cast_info *iter = ty->cast;
- while (iter) {
- if (strcmp(iter->type->name, c) == 0) {
- if (iter == ty->cast)
- return iter;
- /* Move iter to the top of the linked list */
- iter->prev->next = iter->next;
- if (iter->next)
- iter->next->prev = iter->prev;
- iter->next = ty->cast;
- iter->prev = 0;
- if (ty->cast) ty->cast->prev = iter;
- ty->cast = iter;
- return iter;
- }
- iter = iter->next;
- }
- }
- return 0;
- }
- /*
- Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
- */
- SWIGRUNTIME swig_cast_info *
- SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
- if (ty) {
- swig_cast_info *iter = ty->cast;
- while (iter) {
- if (iter->type == from) {
- if (iter == ty->cast)
- return iter;
- /* Move iter to the top of the linked list */
- iter->prev->next = iter->next;
- if (iter->next)
- iter->next->prev = iter->prev;
- iter->next = ty->cast;
- iter->prev = 0;
- if (ty->cast) ty->cast->prev = iter;
- ty->cast = iter;
- return iter;
- }
- iter = iter->next;
- }
- }
- return 0;
- }
- /*
- Cast a pointer up an inheritance hierarchy
- */
- SWIGRUNTIMEINLINE void *
- SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
- }
- /*
- Dynamic pointer casting. Down an inheritance hierarchy
- */
- SWIGRUNTIME swig_type_info *
- SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
- swig_type_info *lastty = ty;
- if (!ty || !ty->dcast) return ty;
- while (ty && (ty->dcast)) {
- ty = (*ty->dcast)(ptr);
- if (ty) lastty = ty;
- }
- return lastty;
- }
- /*
- Return the name associated with this type
- */
- SWIGRUNTIMEINLINE const char *
- SWIG_TypeName(const swig_type_info *ty) {
- return ty->name;
- }
- /*
- Return the pretty name associated with this type,
- that is an unmangled type name in a form presentable to the user.
- */
- SWIGRUNTIME const char *
- SWIG_TypePrettyName(const swig_type_info *type) {
- /* The "str" field contains the equivalent pretty names of the
- type, separated by vertical-bar characters. We choose
- to print the last name, as it is often (?) the most
- specific. */
- if (!type) return NULL;
- if (type->str != NULL) {
- const char *last_name = type->str;
- const char *s;
- for (s = type->str; *s; s++)
- if (*s == '|') last_name = s+1;
- return last_name;
- }
- else
- return type->name;
- }
- /*
- Set the clientdata field for a type
- */
- SWIGRUNTIME void
- SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
- swig_cast_info *cast = ti->cast;
- /* if (ti->clientdata == clientdata) return; */
- ti->clientdata = clientdata;
-
- while (cast) {
- if (!cast->converter) {
- swig_type_info *tc = cast->type;
- if (!tc->clientdata) {
- SWIG_TypeClientData(tc, clientdata);
- }
- }
- cast = cast->next;
- }
- }
- SWIGRUNTIME void
- SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
- SWIG_TypeClientData(ti, clientdata);
- ti->owndata = 1;
- }
-
- /*
- Search for a swig_type_info structure only by mangled name
- Search is a O(log #types)
-
- We start searching at module start, and finish searching when start == end.
- Note: if start == end at the beginning of the function, we go all the way around
- the circular list.
- */
- SWIGRUNTIME swig_type_info *
- SWIG_MangledTypeQueryModule(swig_module_info *start,
- swig_module_info *end,
- const char *name) {
- swig_module_info *iter = start;
- do {
- if (iter->size) {
- register size_t l = 0;
- register size_t r = iter->size - 1;
- do {
- /* since l+r >= 0, we can (>> 1) instead (/ 2) */
- register size_t i = (l + r) >> 1;
- const char *iname = iter->types[i]->name;
- if (iname) {
- register int compare = strcmp(name, iname);
- if (compare == 0) {
- return iter->types[i];
- } else if (compare < 0) {
- if (i) {
- r = i - 1;
- } else {
- break;
- }
- } else if (compare > 0) {
- l = i + 1;
- }
- } else {
- break; /* should never happen */
- }
- } while (l <= r);
- }
- iter = iter->next;
- } while (iter != end);
- return 0;
- }
- /*
- Search for a swig_type_info structure for either a mangled name or a human readable name.
- It first searches the mangled names of the types, which is a O(log #types)
- If a type is not found it then searches the human readable names, which is O(#types).
-
- We start searching at module start, and finish searching when start == end.
- Note: if start == end at the beginning of the function, we go all the way around
- the circular list.
- */
- SWIGRUNTIME swig_type_info *
- SWIG_TypeQueryModule(swig_module_info *start,
- swig_module_info *end,
- const char *name) {
- /* STEP 1: Search the name field using binary search */
- swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
- if (ret) {
- return ret;
- } else {
- /* STEP 2: If the type hasn't been found, do a complete search
- of the str field (the human readable name) */
- swig_module_info *iter = start;
- do {
- register size_t i = 0;
- for (; i < iter->size; ++i) {
- if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
- return iter->types[i];
- }
- iter = iter->next;
- } while (iter != end);
- }
-
- /* neither found a match */
- return 0;
- }
- /*
- Pack binary data into a string
- */
- SWIGRUNTIME char *
- SWIG_PackData(char *c, void *ptr, size_t sz) {
- static const char hex[17] = "0123456789abcdef";
- register const unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
- for (; u != eu; ++u) {
- register unsigned char uu = *u;
- *(c++) = hex[(uu & 0xf0) >> 4];
- *(c++) = hex[uu & 0xf];
- }
- return c;
- }
- /*
- Unpack binary data from a string
- */
- SWIGRUNTIME const char *
- SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
- register unsigned char *u = (unsigned char *) ptr;
- register const unsigned char *eu = u + sz;
- for (; u != eu; ++u) {
- register char d = *(c++);
- register unsigned char uu;
- if ((d >= '0') && (d <= '9'))
- uu = ((d - '0') << 4);
- else if ((d >= 'a') && (d <= 'f'))
- uu = ((d - ('a'-10)) << 4);
- else
- return (char *) 0;
- d = *(c++);
- if ((d >= '0') && (d <= '9'))
- uu |= (d - '0');
- else if ((d >= 'a') && (d <= 'f'))
- uu |= (d - ('a'-10));
- else
- return (char *) 0;
- *u = uu;
- }
- return c;
- }
- /*
- Pack 'void *' into a string buffer.
- */
- SWIGRUNTIME char *
- SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
- char *r = buff;
- if ((2*sizeof(void *) + 2) > bsz) return 0;
- *(r++) = '_';
- r = SWIG_PackData(r,&ptr,sizeof(void *));
- if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
- strcpy(r,name);
- return buff;
- }
- SWIGRUNTIME const char *
- SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
- if (*c != '_') {
- if (strcmp(c,"NULL") == 0) {
- *ptr = (void *) 0;
- return name;
- } else {
- return 0;
- }
- }
- return SWIG_UnpackData(++c,ptr,sizeof(void *));
- }
- SWIGRUNTIME char *
- SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
- char *r = buff;
- size_t lname = (name ? strlen(name) : 0);
- if ((2*sz + 2 + lname) > bsz) return 0;
- *(r++) = '_';
- r = SWIG_PackData(r,ptr,sz);
- if (lname) {
- strncpy(r,name,lname+1);
- } else {
- *r = 0;
- }
- return buff;
- }
- SWIGRUNTIME const char *
- SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
- if (*c != '_') {
- if (strcmp(c,"NULL") == 0) {
- memset(ptr,0,sz);
- return name;
- } else {
- return 0;
- }
- }
- return SWIG_UnpackData(++c,ptr,sz);
- }
- #ifdef __cplusplus
- }
- #endif
- /* -----------------------------------------------------------------------------
- * luarun.swg
- *
- * This file contains the runtime support for Lua modules
- * and includes code for managing global variables and pointer
- * type checking.
- * ----------------------------------------------------------------------------- */
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "lua.h"
- #include "lauxlib.h"
- #include <stdlib.h> /* for malloc */
- #include <assert.h> /* for a few sanity tests */
- /* -----------------------------------------------------------------------------
- * Lua flavors
- * ----------------------------------------------------------------------------- */
- #define SWIG_LUA_FLAVOR_LUA 1
- #define SWIG_LUA_FLAVOR_ELUA 2
- #define SWIG_LUA_FLAVOR_ELUAC 3
- #if !defined(SWIG_LUA_TARGET)
- # error SWIG_LUA_TARGET not defined
- #endif
- #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
- # define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
- # define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
- # define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
- # define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
- #else /* SWIG_LUA_FLAVOR_LUA */
- # define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
- # define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
- # define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
- # define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
- #endif
- #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
- # define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
- # define LSTRVAL LRO_STRVAL
- #endif
- /* -----------------------------------------------------------------------------
- * compatibility defines
- * ----------------------------------------------------------------------------- */
- /* History of Lua C API length functions: In Lua 5.0 (and before?)
- there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
- but a compatibility define of "lua_strlen" was added. In Lua 5.2,
- this function was again renamed, to "lua_rawlen" (to emphasize that
- it doesn't call the "__len" metamethod), and the compatibility
- define of lua_strlen was removed. All SWIG uses have been updated
- to "lua_rawlen", and we add our own defines of that here for older
- versions of Lua. */
- #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
- # define lua_rawlen lua_strlen
- #elif LUA_VERSION_NUM == 501
- # define lua_rawlen lua_objlen
- #endif
- /* lua_pushglobaltable is the recommended "future-proof" way to get
- the global table for Lua 5.2 and later. Here we define
- lua_pushglobaltable ourselves for Lua versions before 5.2. */
- #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
- # define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
- #endif
- /* -----------------------------------------------------------------------------
- * global swig types
- * ----------------------------------------------------------------------------- */
- /* Constant table */
- #define SWIG_LUA_INT 1
- #define SWIG_LUA_FLOAT 2
- #define SWIG_LUA_STRING 3
- #define SWIG_LUA_POINTER 4
- #define SWIG_LUA_BINARY 5
- #define SWIG_LUA_CHAR 6
- /* Structure for variable linking table */
- typedef struct {
- const char *name;
- lua_CFunction get;
- lua_CFunction set;
- } swig_lua_var_info;
- /* Constant information structure */
- typedef struct {
- int type;
- char *name;
- long lvalue;
- double dvalue;
- void *pvalue;
- swig_type_info **ptype;
- } swig_lua_const_info;
- typedef struct {
- const char *name;
- lua_CFunction method;
- } swig_lua_method;
- typedef struct {
- const char *name;
- lua_CFunction getmethod;
- lua_CFunction setmethod;
- } swig_lua_attribute;
- typedef struct swig_lua_class {
- const char *name;
- swig_type_info **type;
- lua_CFunction constructor;
- void (*destructor)(void *);
- swig_lua_method *methods;
- swig_lua_attribute *attributes;
- struct swig_lua_class **bases;
- const char **base_names;
- } swig_lua_class;
- /* this is the struct for wrappering all pointers in SwigLua
- */
- typedef struct {
- swig_type_info *type;
- int own; /* 1 if owned & must be destroyed */
- void *ptr;
- } swig_lua_userdata;
- /* this is the struct for wrapping arbitary packed binary data
- (currently it is only used for member function pointers)
- the data ordering is similar to swig_lua_userdata, but it is currently not possible
- to tell the two structures apart within SWIG, other than by looking at the type
- */
- typedef struct {
- swig_type_info *type;
- int own; /* 1 if owned & must be destroyed */
- char data[1]; /* arbitary amount of data */
- } swig_lua_rawdata;
- /* Common SWIG API */
- #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
- #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
- #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
- /* for C++ member pointers, ie, member methods */
- #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
- #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
- /* Runtime API */
- #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
- #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
- #define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
- /* Contract support */
- #define SWIG_contract_assert(expr, msg) \
- if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else
- /* helper #defines */
- #define SWIG_fail {goto fail;}
- #define SWIG_fail_arg(func_name,argnum,type) \
- {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
- func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
- goto fail;}
- #define SWIG_fail_ptr(func_name,argnum,type) \
- SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
- #define SWIG_check_num_args(func_name,a,b) \
- if (lua_gettop(L)<a || lua_gettop(L)>b) \
- {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
- goto fail;}
- #define SWIG_Lua_get_table(L,n) \
- (lua_pushstring(L, n), lua_rawget(L,-2))
- #define SWIG_Lua_add_function(L,n,f) \
- (lua_pushstring(L, n), \
- lua_pushcfunction(L, f), \
- lua_rawset(L,-3))
- /* special helper for allowing 'nil' for usertypes */
- #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
- #ifdef __cplusplus
- /* Special helper for member function pointers
- it gets the address, casts it, then dereferences it */
- //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a)))
- #endif
- /* storing/access of swig_module_info */
- SWIGRUNTIME swig_module_info *
- SWIG_Lua_GetModule(lua_State* L) {
- swig_module_info *ret = 0;
- lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
- lua_rawget(L,LUA_REGISTRYINDEX);
- if (lua_islightuserdata(L,-1))
- ret=(swig_module_info*)lua_touserdata(L,-1);
- lua_pop(L,1); /* tidy */
- return ret;
- }
- SWIGRUNTIME void
- SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
- /* add this all into the Lua registry: */
- lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
- lua_pushlightuserdata(L,(void*)module);
- lua_rawset(L,LUA_REGISTRYINDEX);
- }
- /* -----------------------------------------------------------------------------
- * global variable support code: modules
- * ----------------------------------------------------------------------------- */
- /* this function is called when trying to set an immutable.
- default value is to print an error.
- This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
- SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
- {
- /* there should be 1 param passed in: the new value */
- #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
- lua_pop(L,1); /* remove it */
- lua_pushstring(L,"This variable is immutable");
- lua_error(L);
- #endif
- return 0; /* should not return anything */
- }
- /* the module.get method used for getting linked data */
- SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
- {
- /* there should be 2 params passed in
- (1) table (not the meta table)
- (2) string name of the attribute
- printf("SWIG_Lua_module_get %p(%s) '%s'\n",
- lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
- lua_tostring(L,2));
- */
- /* get the metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- assert(lua_isrotable(L,1)); /* just in case */
- #else
- assert(lua_istable(L,1)); /* default Lua action */
- #endif
- lua_getmetatable(L,1); /* get the metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- assert(lua_isrotable(L,-1)); /* just in case */
- #else
- assert(lua_istable(L,-1));
- #endif
- SWIG_Lua_get_table(L,".get"); /* get the .get table */
- lua_remove(L,3); /* remove metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- if (lua_isrotable(L,-1))
- #else
- if (lua_istable(L,-1))
- #endif
- {
- /* look for the key in the .get table */
- lua_pushvalue(L,2); /* key */
- lua_rawget(L,-2);
- lua_remove(L,3); /* remove .get */
- if (lua_iscfunction(L,-1))
- { /* found it so call the fn & return its value */
- lua_call(L,0,1);
- return 1;
- }
- lua_pop(L,1); /* remove the top */
- }
- lua_pop(L,1); /* remove the .get */
- lua_pushnil(L); /* return a nil */
- return 1;
- }
- /* the module.set method used for setting linked data */
- SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
- {
- /* there should be 3 params passed in
- (1) table (not the meta table)
- (2) string name of the attribute
- (3) any for the new value
- */
- /* get the metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- assert(lua_isrotable(L,1)); /* just in case */
- #else
- assert(lua_istable(L,1)); /* default Lua action */
- #endif
- lua_getmetatable(L,1); /* get the metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- assert(lua_isrotable(L,-1)); /* just in case */
- #else
- assert(lua_istable(L,-1));
- #endif
- SWIG_Lua_get_table(L,".set"); /* get the .set table */
- lua_remove(L,4); /* remove metatable */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- if (lua_isrotable(L,-1))
- #else
- if (lua_istable(L,-1))
- #endif
- {
- /* look for the key in the .set table */
- lua_pushvalue(L,2); /* key */
- lua_rawget(L,-2);
- lua_remove(L,4); /* remove .set */
- if (lua_iscfunction(L,-1))
- { /* found it so call the fn & return its value */
- lua_pushvalue(L,3); /* value */
- lua_call(L,1,0);
- return 0;
- }
- #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA)
- else {
- return 0; // Exits stoically if an invalid key is initialized.
- }
- #endif
- }
- lua_settop(L,3); /* reset back to start */
- /* we now have the table, key & new value, so just set directly */
- lua_rawset(L,1); /* add direct */
- return 0;
- }
- #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
- /* registering a module in lua. Pushes the module table on the stack. */
- SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
- {
- assert(lua_istable(L,-1)); /* just in case */
- lua_pushstring(L,name);
- lua_newtable(L); /* the table */
- /* add meta table */
- lua_newtable(L); /* the meta table */
- SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
- SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
- lua_pushstring(L,".get");
- lua_newtable(L); /* the .get table */
- lua_rawset(L,-3); /* add .get into metatable */
- lua_pushstring(L,".set");
- lua_newtable(L); /* the .set table */
- lua_rawset(L,-3); /* add .set into metatable */
- lua_setmetatable(L,-2); /* sets meta table in module */
- #ifdef SWIG_LUA_MODULE_GLOBAL
- /* If requested, install the module directly into the global namespace. */
- lua_rawset(L,-3); /* add module into parent */
- SWIG_Lua_get_table(L,name); /* get the table back out */
- #else
- /* Do not install the module table as global name. The stack top has
- the module table with the name below. We pop the top and replace
- the name with it. */
- lua_replace(L,-2);
- #endif
- }
- /* ending the register */
- SWIGINTERN void SWIG_Lua_module_end(lua_State* L)
- {
- lua_pop(L,1); /* tidy stack (remove module) */
- }
- /* adding a linked variable to the module */
- SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
- {
- assert(lua_istable(L,-1)); /* just in case */
- lua_getmetatable(L,-1); /* get the metatable */
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_get_table(L,".get"); /* find the .get table */
- assert(lua_istable(L,-1)); /* should be a table: */
- SWIG_Lua_add_function(L,name,getFn);
- lua_pop(L,1); /* tidy stack (remove table) */
- if (setFn) /* if there is a set fn */
- {
- SWIG_Lua_get_table(L,".set"); /* find the .set table */
- assert(lua_istable(L,-1)); /* should be a table: */
- SWIG_Lua_add_function(L,name,setFn);
- lua_pop(L,1); /* tidy stack (remove table) */
- }
- lua_pop(L,1); /* tidy stack (remove meta) */
- }
- #endif
- /* adding a function module */
- SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
- {
- SWIG_Lua_add_function(L,name,fn);
- }
- /* -----------------------------------------------------------------------------
- * global variable support code: classes
- * ----------------------------------------------------------------------------- */
- /* the class.get method, performs the lookup of class attributes */
- SWIGINTERN int SWIG_Lua_class_get(lua_State* L)
- {
- /* there should be 2 params passed in
- (1) userdata (not the meta table)
- (2) string name of the attribute
- */
- assert(lua_isuserdata(L,-2)); /* just in case */
- lua_getmetatable(L,-2); /* get the meta table */
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_get_table(L,".get"); /* find the .get table */
- assert(lua_istable(L,-1)); /* just in case */
- /* look for the key in the .get table */
- lua_pushvalue(L,2); /* key */
- lua_rawget(L,-2);
- lua_remove(L,-2); /* stack tidy, remove .get table */
- if (lua_iscfunction(L,-1))
- { /* found it so call the fn & return its value */
- lua_pushvalue(L,1); /* the userdata */
- lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
- lua_remove(L,-2); /* stack tidy, remove metatable */
- return 1;
- }
- lua_pop(L,1); /* remove whatever was there */
- /* ok, so try the .fn table */
- SWIG_Lua_get_table(L,".fn"); /* find the .get table */
- assert(lua_istable(L,-1)); /* just in case */
- lua_pushvalue(L,2); /* key */
- lua_rawget(L,-2); /* look for the fn */
- lua_remove(L,-2); /* stack tidy, remove .fn table */
- if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
- { /* found it so return the fn & let lua call it */
- lua_remove(L,-2); /* stack tidy, remove metatable */
- return 1;
- }
- lua_pop(L,1); /* remove whatever was there */
- /* NEW: looks for the __getitem() fn
- this is a user provided get fn */
- SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
- if (lua_iscfunction(L,-1)) /* if its there */
- { /* found it so call the fn & return its value */
- lua_pushvalue(L,1); /* the userdata */
- lua_pushvalue(L,2); /* the parameter */
- lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
- lua_remove(L,-2); /* stack tidy, remove metatable */
- return 1;
- }
- return 0; /* sorry not known */
- }
- /* the class.set method, performs the lookup of class attributes */
- SWIGINTERN int SWIG_Lua_class_set(lua_State* L)
- {
- /* there should be 3 params passed in
- (1) table (not the meta table)
- (2) string name of the attribute
- (3) any for the new value
- printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
- lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
- lua_tostring(L,2),
- lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
- assert(lua_isuserdata(L,1)); /* just in case */
- lua_getmetatable(L,1); /* get the meta table */
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_get_table(L,".set"); /* find the .set table */
- if (lua_istable(L,-1))
- {
- /* look for the key in the .set table */
- lua_pushvalue(L,2); /* key */
- lua_rawget(L,-2);
- if (lua_iscfunction(L,-1))
- { /* found it so call the fn & return its value */
- lua_pushvalue(L,1); /* userdata */
- lua_pushvalue(L,3); /* value */
- lua_call(L,2,0);
- return 0;
- }
- lua_pop(L,1); /* remove the value */
- }
- lua_pop(L,1); /* remove the value .set table */
- /* NEW: looks for the __setitem() fn
- this is a user provided set fn */
- SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
- if (lua_iscfunction(L,-1)) /* if its there */
- { /* found it so call the fn & return its value */
- lua_pushvalue(L,1); /* the userdata */
- lua_pushvalue(L,2); /* the parameter */
- lua_pushvalue(L,3); /* the value */
- lua_call(L,3,0); /* 3 values in ,0 out */
- lua_remove(L,-2); /* stack tidy, remove metatable */
- return 1;
- }
- return 0;
- }
- /* the class.destruct method called by the interpreter */
- SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L)
- {
- /* there should be 1 params passed in
- (1) userdata (not the meta table) */
- swig_lua_userdata* usr;
- swig_lua_class* clss;
- assert(lua_isuserdata(L,-1)); /* just in case */
- usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
- /* if must be destroyed & has a destructor */
- if (usr->own) /* if must be destroyed */
- {
- clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
- if (clss && clss->destructor) /* there is a destroy fn */
- {
- clss->destructor(usr->ptr); /* bye bye */
- }
- }
- return 0;
- }
- /* the class.__tostring method called by the interpreter and print */
- SWIGINTERN int SWIG_Lua_class_tostring(lua_State* L)
- {
- /* there should be 1 param passed in
- (1) userdata (not the metatable) */
- assert(lua_isuserdata(L,1)); /* just in case */
- unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
- lua_getmetatable(L,1); /* get the meta table */
- assert(lua_istable(L,-1)); /* just in case */
-
- lua_getfield(L, -1, ".type");
- const char* className = lua_tostring(L, -1);
-
- char output[256];
- sprintf(output, "<%s userdata: %lX>", className, userData);
-
- lua_pushstring(L, (const char*)output);
- return 1;
- }
- /* to manually disown some userdata */
- SWIGINTERN int SWIG_Lua_class_disown(lua_State* L)
- {
- /* there should be 1 params passed in
- (1) userdata (not the meta table) */
- swig_lua_userdata* usr;
- assert(lua_isuserdata(L,-1)); /* just in case */
- usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
-
- usr->own = 0; /* clear our ownership */
- return 0;
- }
- /* gets the swig class registry (or creates it) */
- SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L)
- {
- /* add this all into the swig registry: */
- lua_pushstring(L,"SWIG");
- lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
- if (!lua_istable(L,-1)) /* not there */
- { /* must be first time, so add it */
- lua_pop(L,1); /* remove the result */
- lua_pushstring(L,"SWIG");
- lua_newtable(L);
- lua_rawset(L,LUA_REGISTRYINDEX);
- /* then get it */
- lua_pushstring(L,"SWIG");
- lua_rawget(L,LUA_REGISTRYINDEX);
- }
- }
- /* helper fn to get the classes metatable from the register */
- SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
- {
- SWIG_Lua_get_class_registry(L); /* get the registry */
- lua_pushstring(L,cname); /* get the name */
- lua_rawget(L,-2); /* get it */
- lua_remove(L,-2); /* tidy up (remove registry) */
- }
- /* helper add a variable to a registered class */
- SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
- {
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_get_table(L,".get"); /* find the .get table */
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_add_function(L,name,getFn);
- lua_pop(L,1); /* tidy stack (remove table) */
- if (setFn)
- {
- SWIG_Lua_get_table(L,".set"); /* find the .set table */
- assert(lua_istable(L,-1)); /* just in case */
- SWIG_Lua_add_function(L,name,setFn);
- lua_pop(L,1); /* tidy stack (remove table) */
- }
- }
- /* helper to recursively add class details (attributes & operations) */
- SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
- {
- int i;
- /* call all the base classes first: we can then override these later: */
- for(i=0;clss->bases[i];i++)
- {
- SWIG_Lua_add_class_details(L,clss->bases[i]);
- }
- /* add fns */
- for(i=0;clss->attributes[i].name;i++){
- SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
- }
- /* add methods to the metatable */
- SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
- assert(lua_istable(L,-1)); /* just in case */
- for(i=0;clss->methods[i].name;i++){
- SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
- }
- lua_pop(L,1); /* tidy stack (remove table) */
- /* add operator overloads
- these look ANY method which start with "__" and assume they
- are operator overloads & add them to the metatable
- (this might mess up is someone defines a method __gc (the destructor)*/
- for(i=0;clss->methods[i].name;i++){
- if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
- SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
- }
- }
- }
- /* set up the base classes pointers.
- Each class structure has a list of pointers to the base class structures.
- This function fills them.
- It cannot be done at compile time, as this will not work with hireachies
- spread over more than one swig file.
- Therefore it must be done at runtime, querying the SWIG type system.
- */
- SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
- {
- int i=0;
- swig_module_info* module=SWIG_GetModule(L);
- for(i=0;clss->base_names[i];i++)
- {
- if (clss->bases[i]==0) /* not found yet */
- {
- /* lookup and cache the base class */
- swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
- if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
- }
- }
- }
- /* performs the entire class registration process */
- SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
- {
- /* add its constructor to module with the name of the class
- so you can do MyClass(...) as well as new_MyClass(...)
- BUT only if a constructor is defined
- (this overcomes the problem of pure virtual classes without constructors)*/
- if (clss->constructor)
- SWIG_Lua_add_function(L,clss->name,clss->constructor);
- SWIG_Lua_get_class_registry(L); /* get the registry */
- lua_pushstring(L,clss->name); /* get the name */
- lua_newtable(L); /* create the metatable */
- /* add string of class name called ".type" */
- lua_pushstring(L,".type");
- lua_pushstring(L,clss->name);
- lua_rawset(L,-3);
- /* add a table called ".get" */
- lua_pushstring(L,".get");
- lua_newtable(L);
- lua_rawset(L,-3);
- /* add a table called ".set" */
- lua_pushstring(L,".set");
- lua_newtable(L);
- lua_rawset(L,-3);
- /* add a table called ".fn" */
- lua_pushstring(L,".fn");
- lua_newtable(L);
- /* add manual disown method */
- SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
- lua_rawset(L,-3);
- /* add accessor fns for using the .get,.set&.fn */
- SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
- SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
- SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
- /* add tostring method for better output */
- SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
- /* add it */
- lua_rawset(L,-3); /* metatable into registry */
- lua_pop(L,1); /* tidy stack (remove registry) */
- SWIG_Lua_get_class_metatable(L,clss->name);
- SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
- lua_pop(L,1); /* tidy stack (remove class metatable) */
- }
- /* -----------------------------------------------------------------------------
- * Class/structure conversion fns
- * ----------------------------------------------------------------------------- */
- /* helper to add metatable to new lua object */
- SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
- {
- if (type->clientdata) /* there is clientdata: so add the metatable */
- {
- SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
- if (lua_istable(L,-1))
- {
- lua_setmetatable(L,-2);
- }
- else
- {
- lua_pop(L,1);
- }
- }
- }
- /* pushes a new object into the lua stack */
- SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
- {
- swig_lua_userdata* usr;
- if (!ptr){
- lua_pushnil(L);
- return;
- }
- usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
- usr->ptr=ptr; /* set the ptr */
- usr->type=type;
- usr->own=own;
- #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
- _SWIG_Lua_AddMetatable(L,type); /* add metatable */
- #endif
- }
- /* takes a object from the lua stack & converts it into an object of the correct type
- (if possible) */
- SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
- {
- swig_lua_userdata* usr;
- swig_cast_info *cast;
- if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */
- usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
- if (usr)
- {
- if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
- {
- usr->own=0;
- }
- if (!type) /* special cast void*, no casting fn */
- {
- *ptr=usr->ptr;
- return SWIG_OK; /* ok */
- }
- cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
- if (cast)
- {
- int newmemory = 0;
- *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
- assert(!newmemory); /* newmemory handling not yet implemented */
- return SWIG_OK; /* ok */
- }
- }
- return SWIG_ERROR; /* error */
- }
- SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
- int argnum,const char* func_name){
- void* result;
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
- lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
- func_name,(type && type->str)?type->str:"void*",argnum);
- lua_error(L);
- }
- return result;
- }
- /* pushes a packed userdata. user for member fn pointers only */
- SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
- {
- swig_lua_rawdata* raw;
- assert(ptr); /* not acceptable to pass in a NULL value */
- raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
- raw->type=type;
- raw->own=0;
- memcpy(raw->data,ptr,size); /* copy the data */
- _SWIG_Lua_AddMetatable(L,type); /* add metatable */
- }
-
- /* converts a packed userdata. user for member fn pointers only */
- SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
- {
- swig_lua_rawdata* raw;
- raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
- if (!raw) return SWIG_ERROR; /* error */
- if (type==0 || type==raw->type) /* void* or identical type */
- {
- memcpy(ptr,raw->data,size); /* copy it */
- return SWIG_OK; /* ok */
- }
- return SWIG_ERROR; /* error */
- }
- /* a function to get the typestring of a piece of data */
- SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
- {
- swig_lua_userdata* usr;
- if (lua_isuserdata(L,tp))
- {
- usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
- if (usr && usr->type && usr->type->str)
- return usr->type->str;
- return "userdata (unknown type)";
- }
- return lua_typename(L,lua_type(L,tp));
- }
- /* lua callable function to get the userdata's type */
- SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
- {
- lua_pushstring(L,SWIG_Lua_typename(L,1));
- return 1;
- }
- /* lua callable function to compare userdata's value
- the issue is that two userdata may point to the same thing
- but to lua, they are different objects */
- SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
- {
- int result;
- swig_lua_userdata *usr1,*usr2;
- if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
- return 0; /* nil reply */
- usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
- usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
- /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
- result=(usr1->ptr==usr2->ptr);
- lua_pushboolean(L,result);
- return 1;
- }
- /* -----------------------------------------------------------------------------
- * global variable support code: class/struct typemap functions
- * ----------------------------------------------------------------------------- */
- #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
- /* Install Constants */
- SWIGINTERN void
- SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
- int i;
- for (i = 0; constants[i].type; i++) {
- switch(constants[i].type) {
- case SWIG_LUA_INT:
- lua_pushstring(L,constants[i].name);
- lua_pushnumber(L,(lua_Number)constants[i].lvalue);
- lua_rawset(L,-3);
- break;
- case SWIG_LUA_FLOAT:
- lua_pushstring(L,constants[i].name);
- lua_pushnumber(L,(lua_Number)constants[i].dvalue);
- lua_rawset(L,-3);
- break;
- case SWIG_LUA_CHAR:
- lua_pushstring(L,constants[i].name);
- lua_pushfstring(L,"%c",(char)constants[i].lvalue);
- lua_rawset(L,-3);
- break;
- case SWIG_LUA_STRING:
- lua_pushstring(L,constants[i].name);
- lua_pushstring(L,(char *) constants[i].pvalue);
- lua_rawset(L,-3);
- break;
- case SWIG_LUA_POINTER:
- lua_pushstring(L,constants[i].name);
- SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
- lua_rawset(L,-3);
- break;
- case SWIG_LUA_BINARY:
- lua_pushstring(L,constants[i].name);
- SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
- lua_rawset(L,-3);
- break;
- default:
- break;
- }
- }
- }
- #endif
- /* -----------------------------------------------------------------------------
- * executing lua code from within the wrapper
- * ----------------------------------------------------------------------------- */
- #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
- #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
- #endif
- /* Executes a C string in Lua a really simple way of calling lua from C
- Unfortunately lua keeps changing its API's, so we need a conditional compile
- In lua 5.0.X its lua_dostring()
- In lua 5.1.X its luaL_dostring()
- */
- SWIGINTERN int
- SWIG_Lua_dostring(lua_State *L, const char* str) {
- int ok,top;
- if (str==0 || str[0]==0) return 0; /* nothing to do */
- top=lua_gettop(L); /* save stack */
- #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
- ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
- #else
- ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
- #endif
- if (ok!=0) {
- SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
- }
- lua_settop(L,top); /* restore the stack */
- return ok;
- }
- #ifdef __cplusplus
- }
- #endif
- /* ------------------------------ end luarun.swg ------------------------------ */
- /* -------- TYPES TABLE (BEGIN) -------- */
- #define SWIGTYPE_p_ESLconnection swig_types[0]
- #define SWIGTYPE_p_ESLevent swig_types[1]
- #define SWIGTYPE_p_esl_event_t swig_types[2]
- #define SWIGTYPE_p_esl_priority_t swig_types[3]
- static swig_type_info *swig_types[5];
- static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
- #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
- #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
- /* -------- TYPES TABLE (END) -------- */
- #define SWIG_name "ESL"
- #define SWIG_init luaopen_ESL
- #define SWIG_init_user luaopen_ESL_user
- #define SWIG_LUACODE luaopen_ESL_luacode
- namespace swig {
- typedef struct{} LANGUAGE_OBJ;
- }
- #include "esl.h"
- #include "esl_oop.h"
- SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
- int ret = lua_isstring(L, idx);
- if (!ret)
- ret = lua_isnil(L, idx);
- return ret;
- }
- #ifdef __cplusplus
- extern "C" {
- #endif
- static int _wrap_ESLevent_event_set(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- esl_event_t *arg2 = (esl_event_t *) 0 ;
-
- SWIG_check_num_args("ESLevent::event",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::event",1,"ESLevent *");
- if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("ESLevent::event",2,"esl_event_t *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_event_set",1,SWIGTYPE_p_ESLevent);
- }
-
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_esl_event_t,SWIG_POINTER_DISOWN))){
- SWIG_fail_ptr("ESLevent_event_set",2,SWIGTYPE_p_esl_event_t);
- }
-
- if (arg1) (arg1)->event = arg2;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_event_get(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- esl_event_t *result = 0 ;
-
- SWIG_check_num_args("ESLevent::event",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::event",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_event_get",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (esl_event_t *) ((arg1)->event);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_esl_event_t,0); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_serialized_string_set(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
-
- SWIG_check_num_args("ESLevent::serialized_string",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::serialized_string",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::serialized_string",2,"char *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_serialized_string_set",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- {
- delete [] arg1->serialized_string;
- if (arg2) {
- arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]);
- strcpy((char *)arg1->serialized_string, (const char *)arg2);
- } else {
- arg1->serialized_string = 0;
- }
- }
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_serialized_string_get(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::serialized_string",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::serialized_string",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_serialized_string_get",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (char *) ((arg1)->serialized_string);
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_mine_set(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- int arg2 ;
-
- SWIG_check_num_args("ESLevent::mine",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::mine",1,"ESLevent *");
- if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLevent::mine",2,"int");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_mine_set",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (int)lua_tonumber(L, 2);
- if (arg1) (arg1)->mine = arg2;
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_mine_get(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLevent::mine",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::mine",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_mine_get",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (int) ((arg1)->mine);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLevent__SWIG_0(lua_State* L) {
- int SWIG_arg = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) NULL ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLevent::ESLevent",1,2)
- if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("ESLevent::ESLevent",1,"char const *");
- if(lua_gettop(L)>=2 && !SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::ESLevent",2,"char const *");
- arg1 = (char *)lua_tostring(L, 1);
- if(lua_gettop(L)>=2){
- arg2 = (char *)lua_tostring(L, 2);
- }
- result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLevent__SWIG_1(lua_State* L) {
- int SWIG_arg = 0;
- esl_event_t *arg1 = (esl_event_t *) 0 ;
- int arg2 = (int) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLevent::ESLevent",1,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::ESLevent",1,"esl_event_t *");
- if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg("ESLevent::ESLevent",2,"int");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_esl_event_t,0))){
- SWIG_fail_ptr("new_ESLevent",1,SWIGTYPE_p_esl_event_t);
- }
-
- if(lua_gettop(L)>=2){
- arg2 = (int)lua_tonumber(L, 2);
- }
- result = (ESLevent *)new ESLevent(arg1,arg2);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLevent__SWIG_2(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLevent::ESLevent",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::ESLevent",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("new_ESLevent",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (ESLevent *)new ESLevent(arg1);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLevent(lua_State* L) {
- int argc;
- int argv[3]={
- 1,2,3
- };
-
- argc = lua_gettop(L);
- if ((argc >= 1) && (argc <= 2)) {
- int _v;
- {
- void *ptr;
- if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_esl_event_t, 0)) {
- _v = 0;
- } else {
- _v = 1;
- }
- }
- if (_v) {
- if (argc <= 1) {
- return _wrap_new_ESLevent__SWIG_1(L);
- }
- {
- _v = lua_isnumber(L,argv[1]);
- }
- if (_v) {
- return _wrap_new_ESLevent__SWIG_1(L);
- }
- }
- }
- if (argc == 1) {
- int _v;
- {
- void *ptr;
- if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_ESLevent, 0)) {
- _v = 0;
- } else {
- _v = 1;
- }
- }
- if (_v) {
- return _wrap_new_ESLevent__SWIG_2(L);
- }
- }
- if ((argc >= 1) && (argc <= 2)) {
- int _v;
- {
- _v = SWIG_lua_isnilstring(L,argv[0]);
- }
- if (_v) {
- if (argc <= 1) {
- return _wrap_new_ESLevent__SWIG_0(L);
- }
- {
- _v = SWIG_lua_isnilstring(L,argv[1]);
- }
- if (_v) {
- return _wrap_new_ESLevent__SWIG_0(L);
- }
- }
- }
-
- lua_pushstring(L,"Wrong arguments for overloaded function 'new_ESLevent'\n"
- " Possible C/C++ prototypes are:\n"
- " ESLevent::ESLevent(char const *,char const *)\n"
- " ESLevent::ESLevent(esl_event_t *,int)\n"
- " ESLevent::ESLevent(ESLevent *)\n");
- lua_error(L);return 0;
- }
- static int _wrap_ESLevent_serialize(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) NULL ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::serialize",1,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::serialize",1,"ESLevent *");
- if(lua_gettop(L)>=2 && !SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::serialize",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_serialize",1,SWIGTYPE_p_ESLevent);
- }
-
- if(lua_gettop(L)>=2){
- arg2 = (char *)lua_tostring(L, 2);
- }
- result = (char *)(arg1)->serialize((char const *)arg2);
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_setPriority(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
- esl_priority_t *argp2 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::setPriority",1,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::setPriority",1,"ESLevent *");
- if(lua_gettop(L)>=2 && !lua_isuserdata(L,2)) SWIG_fail_arg("ESLevent::setPriority",2,"esl_priority_t");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_setPriority",1,SWIGTYPE_p_ESLevent);
- }
-
- if(lua_gettop(L)>=2){
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_esl_priority_t,0))){
- SWIG_fail_ptr("ESLevent_setPriority",2,SWIGTYPE_p_esl_priority_t);
- }
- arg2 = *argp2;
- }
- result = (bool)(arg1)->setPriority(arg2);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_getHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- int arg3 = (int) -1 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::getHeader",2,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::getHeader",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::getHeader",2,"char const *");
- if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("ESLevent::getHeader",3,"int");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_getHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (int)lua_tonumber(L, 3);
- }
- result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_getBody(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::getBody",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::getBody",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_getBody",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (char *)(arg1)->getBody();
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_getType(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::getType",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::getType",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_getType",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (char *)(arg1)->getType();
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_addBody(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::addBody",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::addBody",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::addBody",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_addBody",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (bool)(arg1)->addBody((char const *)arg2);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_addHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::addHeader",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::addHeader",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::addHeader",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLevent::addHeader",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_addHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_pushHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::pushHeader",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::pushHeader",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::pushHeader",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLevent::pushHeader",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_pushHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_unshiftHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::unshiftHeader",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::unshiftHeader",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::unshiftHeader",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLevent::unshiftHeader",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_unshiftHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_delHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *arg2 = (char *) 0 ;
- bool result;
-
- SWIG_check_num_args("ESLevent::delHeader",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::delHeader",1,"ESLevent *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLevent::delHeader",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_delHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (bool)(arg1)->delHeader((char const *)arg2);
- lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_firstHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::firstHeader",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::firstHeader",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_firstHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (char *)(arg1)->firstHeader();
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLevent_nextHeader(lua_State* L) {
- int SWIG_arg = 0;
- ESLevent *arg1 = (ESLevent *) 0 ;
- char *result = 0 ;
-
- SWIG_check_num_args("ESLevent::nextHeader",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLevent::nextHeader",1,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLevent_nextHeader",1,SWIGTYPE_p_ESLevent);
- }
-
- result = (char *)(arg1)->nextHeader();
- lua_pushstring(L,(const char *)result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static void swig_delete_ESLevent(void *obj) {
- ESLevent *arg1 = (ESLevent *) obj;
- delete arg1;
- }
- static swig_lua_method swig_ESLevent_methods[] = {
- {"serialize", _wrap_ESLevent_serialize},
- {"setPriority", _wrap_ESLevent_setPriority},
- {"getHeader", _wrap_ESLevent_getHeader},
- {"getBody", _wrap_ESLevent_getBody},
- {"getType", _wrap_ESLevent_getType},
- {"addBody", _wrap_ESLevent_addBody},
- {"addHeader", _wrap_ESLevent_addHeader},
- {"pushHeader", _wrap_ESLevent_pushHeader},
- {"unshiftHeader", _wrap_ESLevent_unshiftHeader},
- {"delHeader", _wrap_ESLevent_delHeader},
- {"firstHeader", _wrap_ESLevent_firstHeader},
- {"nextHeader", _wrap_ESLevent_nextHeader},
- {0,0}
- };
- static swig_lua_attribute swig_ESLevent_attributes[] = {
- { "event", _wrap_ESLevent_event_get, _wrap_ESLevent_event_set},
- { "serialized_string", _wrap_ESLevent_serialized_string_get, _wrap_ESLevent_serialized_string_set},
- { "mine", _wrap_ESLevent_mine_get, _wrap_ESLevent_mine_set},
- {0,0,0}
- };
- static swig_lua_class *swig_ESLevent_bases[] = {0};
- static const char *swig_ESLevent_base_names[] = {0};
- static swig_lua_class _wrap_class_ESLevent = { "ESLevent", &SWIGTYPE_p_ESLevent,_wrap_new_ESLevent, swig_delete_ESLevent, swig_ESLevent_methods, swig_ESLevent_attributes, swig_ESLevent_bases, swig_ESLevent_base_names };
- static int _wrap_new_ESLconnection__SWIG_0(lua_State* L) {
- int SWIG_arg = 0;
- char *arg1 = (char *) 0 ;
- int arg2 ;
- char *arg3 = (char *) 0 ;
- char *arg4 = (char *) 0 ;
- ESLconnection *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::ESLconnection",4,4)
- if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("ESLconnection::ESLconnection",1,"char const *");
- if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLconnection::ESLconnection",2,"int const");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::ESLconnection",3,"char const *");
- if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("ESLconnection::ESLconnection",4,"char const *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (int const)lua_tonumber(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- arg4 = (char *)lua_tostring(L, 4);
- result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLconnection__SWIG_1(lua_State* L) {
- int SWIG_arg = 0;
- char *arg1 = (char *) 0 ;
- int arg2 ;
- char *arg3 = (char *) 0 ;
- ESLconnection *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::ESLconnection",3,3)
- if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("ESLconnection::ESLconnection",1,"char const *");
- if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLconnection::ESLconnection",2,"int const");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::ESLconnection",3,"char const *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (int const)lua_tonumber(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLconnection__SWIG_2(lua_State* L) {
- int SWIG_arg = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- char *arg4 = (char *) 0 ;
- ESLconnection *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::ESLconnection",4,4)
- if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("ESLconnection::ESLconnection",1,"char const *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::ESLconnection",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::ESLconnection",3,"char const *");
- if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("ESLconnection::ESLconnection",4,"char const *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- arg4 = (char *)lua_tostring(L, 4);
- result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLconnection__SWIG_3(lua_State* L) {
- int SWIG_arg = 0;
- char *arg1 = (char *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- ESLconnection *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::ESLconnection",3,3)
- if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("ESLconnection::ESLconnection",1,"char const *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::ESLconnection",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::ESLconnection",3,"char const *");
- arg1 = (char *)lua_tostring(L, 1);
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLconnection__SWIG_4(lua_State* L) {
- int SWIG_arg = 0;
- int arg1 ;
- ESLconnection *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::ESLconnection",1,1)
- if(!lua_isnumber(L,1)) SWIG_fail_arg("ESLconnection::ESLconnection",1,"int");
- arg1 = (int)lua_tonumber(L, 1);
- result = (ESLconnection *)new ESLconnection(arg1);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLconnection,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_new_ESLconnection(lua_State* L) {
- int argc;
- int argv[5]={
- 1,2,3,4,5
- };
-
- argc = lua_gettop(L);
- if (argc == 1) {
- int _v;
- {
- _v = lua_isnumber(L,argv[0]);
- }
- if (_v) {
- return _wrap_new_ESLconnection__SWIG_4(L);
- }
- }
- if (argc == 3) {
- int _v;
- {
- _v = SWIG_lua_isnilstring(L,argv[0]);
- }
- if (_v) {
- {
- _v = lua_isnumber(L,argv[1]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[2]);
- }
- if (_v) {
- return _wrap_new_ESLconnection__SWIG_1(L);
- }
- }
- }
- }
- if (argc == 3) {
- int _v;
- {
- _v = SWIG_lua_isnilstring(L,argv[0]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[1]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[2]);
- }
- if (_v) {
- return _wrap_new_ESLconnection__SWIG_3(L);
- }
- }
- }
- }
- if (argc == 4) {
- int _v;
- {
- _v = SWIG_lua_isnilstring(L,argv[0]);
- }
- if (_v) {
- {
- _v = lua_isnumber(L,argv[1]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[2]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[3]);
- }
- if (_v) {
- return _wrap_new_ESLconnection__SWIG_0(L);
- }
- }
- }
- }
- }
- if (argc == 4) {
- int _v;
- {
- _v = SWIG_lua_isnilstring(L,argv[0]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[1]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[2]);
- }
- if (_v) {
- {
- _v = SWIG_lua_isnilstring(L,argv[3]);
- }
- if (_v) {
- return _wrap_new_ESLconnection__SWIG_2(L);
- }
- }
- }
- }
- }
-
- lua_pushstring(L,"Wrong arguments for overloaded function 'new_ESLconnection'\n"
- " Possible C/C++ prototypes are:\n"
- " ESLconnection::ESLconnection(char const *,int const,char const *,char const *)\n"
- " ESLconnection::ESLconnection(char const *,int const,char const *)\n"
- " ESLconnection::ESLconnection(char const *,char const *,char const *,char const *)\n"
- " ESLconnection::ESLconnection(char const *,char const *,char const *)\n"
- " ESLconnection::ESLconnection(int)\n");
- lua_error(L);return 0;
- }
- static int _wrap_ESLconnection_socketDescriptor(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::socketDescriptor",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::socketDescriptor",1,"ESLconnection *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_socketDescriptor",1,SWIGTYPE_p_ESLconnection);
- }
-
- result = (int)(arg1)->socketDescriptor();
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_connected(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::connected",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::connected",1,"ESLconnection *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_connected",1,SWIGTYPE_p_ESLconnection);
- }
-
- result = (int)(arg1)->connected();
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_getInfo(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::getInfo",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::getInfo",1,"ESLconnection *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_getInfo",1,SWIGTYPE_p_ESLconnection);
- }
-
- result = (ESLevent *)(arg1)->getInfo();
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_send(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::send",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::send",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::send",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_send",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (int)(arg1)->send((char const *)arg2);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_sendRecv(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::sendRecv",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::sendRecv",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::sendRecv",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_sendRecv",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (ESLevent *)(arg1)->sendRecv((char const *)arg2);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_api(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) NULL ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::api",2,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::api",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::api",2,"char const *");
- if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::api",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_api",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (char *)lua_tostring(L, 3);
- }
- result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_bgapi(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) NULL ;
- char *arg4 = (char *) NULL ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::bgapi",2,4)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::bgapi",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::bgapi",2,"char const *");
- if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::bgapi",3,"char const *");
- if(lua_gettop(L)>=4 && !SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("ESLconnection::bgapi",4,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_bgapi",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (char *)lua_tostring(L, 3);
- }
- if(lua_gettop(L)>=4){
- arg4 = (char *)lua_tostring(L, 4);
- }
- result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_sendEvent(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- ESLevent *arg2 = (ESLevent *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::sendEvent",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::sendEvent",1,"ESLconnection *");
- if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("ESLconnection::sendEvent",2,"ESLevent *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_sendEvent",1,SWIGTYPE_p_ESLconnection);
- }
-
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLconnection_sendEvent",2,SWIGTYPE_p_ESLevent);
- }
-
- result = (ESLevent *)(arg1)->sendEvent(arg2);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_sendMSG(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- ESLevent *arg2 = (ESLevent *) 0 ;
- char *arg3 = (char *) NULL ;
- int result;
-
- SWIG_check_num_args("ESLconnection::sendMSG",2,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::sendMSG",1,"ESLconnection *");
- if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("ESLconnection::sendMSG",2,"ESLevent *");
- if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::sendMSG",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_sendMSG",1,SWIGTYPE_p_ESLconnection);
- }
-
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_ESLevent,0))){
- SWIG_fail_ptr("ESLconnection_sendMSG",2,SWIGTYPE_p_ESLevent);
- }
-
- if(lua_gettop(L)>=3){
- arg3 = (char *)lua_tostring(L, 3);
- }
- result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_recvEvent(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::recvEvent",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::recvEvent",1,"ESLconnection *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_recvEvent",1,SWIGTYPE_p_ESLconnection);
- }
-
- result = (ESLevent *)(arg1)->recvEvent();
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_recvEventTimed(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- int arg2 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::recvEventTimed",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::recvEventTimed",1,"ESLconnection *");
- if(!lua_isnumber(L,2)) SWIG_fail_arg("ESLconnection::recvEventTimed",2,"int");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_recvEventTimed",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (int)lua_tonumber(L, 2);
- result = (ESLevent *)(arg1)->recvEventTimed(arg2);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_filter(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::filter",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::filter",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::filter",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::filter",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_filter",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_events(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::events",3,3)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::events",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::events",2,"char const *");
- if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::events",3,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_events",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- arg3 = (char *)lua_tostring(L, 3);
- result = (int)(arg1)->events((char const *)arg2,(char const *)arg3);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_execute(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) NULL ;
- char *arg4 = (char *) NULL ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::execute",2,4)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::execute",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::execute",2,"char const *");
- if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::execute",3,"char const *");
- if(lua_gettop(L)>=4 && !SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("ESLconnection::execute",4,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_execute",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (char *)lua_tostring(L, 3);
- }
- if(lua_gettop(L)>=4){
- arg4 = (char *)lua_tostring(L, 4);
- }
- result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_executeAsync(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- char *arg3 = (char *) NULL ;
- char *arg4 = (char *) NULL ;
- ESLevent *result = 0 ;
-
- SWIG_check_num_args("ESLconnection::executeAsync",2,4)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::executeAsync",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::executeAsync",2,"char const *");
- if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("ESLconnection::executeAsync",3,"char const *");
- if(lua_gettop(L)>=4 && !SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("ESLconnection::executeAsync",4,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_executeAsync",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- if(lua_gettop(L)>=3){
- arg3 = (char *)lua_tostring(L, 3);
- }
- if(lua_gettop(L)>=4){
- arg4 = (char *)lua_tostring(L, 4);
- }
- result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_ESLevent,1); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_setAsyncExecute(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::setAsyncExecute",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::setAsyncExecute",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::setAsyncExecute",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_setAsyncExecute",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (int)(arg1)->setAsyncExecute((char const *)arg2);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_setEventLock(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- char *arg2 = (char *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::setEventLock",2,2)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::setEventLock",1,"ESLconnection *");
- if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("ESLconnection::setEventLock",2,"char const *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_setEventLock",1,SWIGTYPE_p_ESLconnection);
- }
-
- arg2 = (char *)lua_tostring(L, 2);
- result = (int)(arg1)->setEventLock((char const *)arg2);
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static int _wrap_ESLconnection_disconnect(lua_State* L) {
- int SWIG_arg = 0;
- ESLconnection *arg1 = (ESLconnection *) 0 ;
- int result;
-
- SWIG_check_num_args("ESLconnection::disconnect",1,1)
- if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ESLconnection::disconnect",1,"ESLconnection *");
-
- if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_ESLconnection,0))){
- SWIG_fail_ptr("ESLconnection_disconnect",1,SWIGTYPE_p_ESLconnection);
- }
-
- result = (int)(arg1)->disconnect();
- lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- static void swig_delete_ESLconnection(void *obj) {
- ESLconnection *arg1 = (ESLconnection *) obj;
- delete arg1;
- }
- static swig_lua_method swig_ESLconnection_methods[] = {
- {"socketDescriptor", _wrap_ESLconnection_socketDescriptor},
- {"connected", _wrap_ESLconnection_connected},
- {"getInfo", _wrap_ESLconnection_getInfo},
- {"send", _wrap_ESLconnection_send},
- {"sendRecv", _wrap_ESLconnection_sendRecv},
- {"api", _wrap_ESLconnection_api},
- {"bgapi", _wrap_ESLconnection_bgapi},
- {"sendEvent", _wrap_ESLconnection_sendEvent},
- {"sendMSG", _wrap_ESLconnection_sendMSG},
- {"recvEvent", _wrap_ESLconnection_recvEvent},
- {"recvEventTimed", _wrap_ESLconnection_recvEventTimed},
- {"filter", _wrap_ESLconnection_filter},
- {"events", _wrap_ESLconnection_events},
- {"execute", _wrap_ESLconnection_execute},
- {"executeAsync", _wrap_ESLconnection_executeAsync},
- {"setAsyncExecute", _wrap_ESLconnection_setAsyncExecute},
- {"setEventLock", _wrap_ESLconnection_setEventLock},
- {"disconnect", _wrap_ESLconnection_disconnect},
- {0,0}
- };
- static swig_lua_attribute swig_ESLconnection_attributes[] = {
- {0,0,0}
- };
- static swig_lua_class *swig_ESLconnection_bases[] = {0};
- static const char *swig_ESLconnection_base_names[] = {0};
- static swig_lua_class _wrap_class_ESLconnection = { "ESLconnection", &SWIGTYPE_p_ESLconnection,_wrap_new_ESLconnection, swig_delete_ESLconnection, swig_ESLconnection_methods, swig_ESLconnection_attributes, swig_ESLconnection_bases, swig_ESLconnection_base_names };
- static int _wrap_eslSetLogLevel(lua_State* L) {
- int SWIG_arg = 0;
- int arg1 ;
-
- SWIG_check_num_args("eslSetLogLevel",1,1)
- if(!lua_isnumber(L,1)) SWIG_fail_arg("eslSetLogLevel",1,"int");
- arg1 = (int)lua_tonumber(L, 1);
- eslSetLogLevel(arg1);
-
- return SWIG_arg;
-
- if(0) SWIG_fail;
-
- fail:
- lua_error(L);
- return SWIG_arg;
- }
- #ifdef __cplusplus
- }
- #endif
- static const struct luaL_Reg swig_commands[] = {
- { "eslSetLogLevel", _wrap_eslSetLogLevel},
- {0,0}
- };
- static swig_lua_var_info swig_variables[] = {
- {0,0,0}
- };
- static swig_lua_const_info swig_constants[] = {
- {0,0,0,0,0,0}
- };
- /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
- static swig_type_info _swigt__p_ESLconnection = {"_p_ESLconnection", "ESLconnection *", 0, 0, (void*)&_wrap_class_ESLconnection, 0};
- static swig_type_info _swigt__p_ESLevent = {"_p_ESLevent", "ESLevent *", 0, 0, (void*)&_wrap_class_ESLevent, 0};
- static swig_type_info _swigt__p_esl_event_t = {"_p_esl_event_t", "esl_event_t *", 0, 0, (void*)0, 0};
- static swig_type_info _swigt__p_esl_priority_t = {"_p_esl_priority_t", "esl_priority_t *", 0, 0, (void*)0, 0};
- static swig_type_info *swig_type_initial[] = {
- &_swigt__p_ESLconnection,
- &_swigt__p_ESLevent,
- &_swigt__p_esl_event_t,
- &_swigt__p_esl_priority_t,
- };
- static swig_cast_info _swigc__p_ESLconnection[] = { {&_swigt__p_ESLconnection, 0, 0, 0},{0, 0, 0, 0}};
- static swig_cast_info _swigc__p_ESLevent[] = { {&_swigt__p_ESLevent, 0, 0, 0},{0, 0, 0, 0}};
- static swig_cast_info _swigc__p_esl_event_t[] = { {&_swigt__p_esl_event_t, 0, 0, 0},{0, 0, 0, 0}};
- static swig_cast_info _swigc__p_esl_priority_t[] = { {&_swigt__p_esl_priority_t, 0, 0, 0},{0, 0, 0, 0}};
- static swig_cast_info *swig_cast_initial[] = {
- _swigc__p_ESLconnection,
- _swigc__p_ESLevent,
- _swigc__p_esl_event_t,
- _swigc__p_esl_priority_t,
- };
- /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
- /* -----------------------------------------------------------------------------
- * Type initialization:
- * This problem is tough by the requirement that no dynamic
- * memory is used. Also, since swig_type_info structures store pointers to
- * swig_cast_info structures and swig_cast_info structures store pointers back
- * to swig_type_info structures, we need some lookup code at initialization.
- * The idea is that swig generates all the structures that are needed.
- * The runtime then collects these partially filled structures.
- * The SWIG_InitializeModule function takes these initial arrays out of
- * swig_module, and does all the lookup, filling in the swig_module.types
- * array with the correct data and linking the correct swig_cast_info
- * structures together.
- *
- * The generated swig_type_info structures are assigned staticly to an initial
- * array. We just loop through that array, and handle each type individually.
- * First we lookup if this type has been already loaded, and if so, use the
- * loaded structure instead of the generated one. Then we have to fill in the
- * cast linked list. The cast data is initially stored in something like a
- * two-dimensional array. Each row corresponds to a type (there are the same
- * number of rows as there are in the swig_type_initial array). Each entry in
- * a column is one of the swig_cast_info structures for that type.
- * The cast_initial array is actually an array of arrays, because each row has
- * a variable number of columns. So to actually build the cast linked list,
- * we find the array of casts associated with the type, and loop through it
- * adding the casts to the list. The one last trick we need to do is making
- * sure the type pointer in the swig_cast_info struct is correct.
- *
- * First off, we lookup the cast->type name to see if it is already loaded.
- * There are three cases to handle:
- * 1) If the cast->type has already been loaded AND the type we are adding
- * casting info to has not been loaded (it is in this module), THEN we
- * replace the cast->type pointer with the type pointer that has already
- * been loaded.
- * 2) If BOTH types (the one we are adding casting info to, and the
- * cast->type) are loaded, THEN the cast info has already been loaded by
- * the previous module so we just ignore it.
- * 3) Finally, if cast->type has not already been loaded, then we add that
- * swig_cast_info to the linked list (because the cast->type) pointer will
- * be correct.
- * ----------------------------------------------------------------------------- */
- #ifdef __cplusplus
- extern "C" {
- #if 0
- } /* c-mode */
- #endif
- #endif
- #if 0
- #define SWIGRUNTIME_DEBUG
- #endif
- SWIGRUNTIME void
- SWIG_InitializeModule(void *clientdata) {
- size_t i;
- swig_module_info *module_head, *iter;
- int found, init;
- clientdata = clientdata;
- /* check to see if the circular list has been setup, if not, set it up */
- if (swig_module.next==0) {
- /* Initialize the swig_module */
- swig_module.type_initial = swig_type_initial;
- swig_module.cast_initial = swig_cast_initial;
- swig_module.next = &swig_module;
- init = 1;
- } else {
- init = 0;
- }
- /* Try and load any already created modules */
- module_head = SWIG_GetModule(clientdata);
- if (!module_head) {
- /* This is the first module loaded for this interpreter */
- /* so set the swig module into the interpreter */
- SWIG_SetModule(clientdata, &swig_module);
- module_head = &swig_module;
- } else {
- /* the interpreter has loaded a SWIG module, but has it loaded this one? */
- found=0;
- iter=module_head;
- do {
- if (iter==&swig_module) {
- found=1;
- break;
- }
- iter=iter->next;
- } while (iter!= module_head);
- /* if the is found in the list, then all is done and we may leave */
- if (found) return;
- /* otherwise we must add out module into the list */
- swig_module.next = module_head->next;
- module_head->next = &swig_module;
- }
- /* When multiple interpeters are used, a module could have already been initialized in
- a different interpreter, but not yet have a pointer in this interpreter.
- In this case, we do not want to continue adding types... everything should be
- set up already */
- if (init == 0) return;
- /* Now work on filling in swig_module.types */
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: size %d\n", swig_module.size);
- #endif
- for (i = 0; i < swig_module.size; ++i) {
- swig_type_info *type = 0;
- swig_type_info *ret;
- swig_cast_info *cast;
-
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
- #endif
- /* if there is another module already loaded */
- if (swig_module.next != &swig_module) {
- type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
- }
- if (type) {
- /* Overwrite clientdata field */
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: found type %s\n", type->name);
- #endif
- if (swig_module.type_initial[i]->clientdata) {
- type->clientdata = swig_module.type_initial[i]->clientdata;
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
- #endif
- }
- } else {
- type = swig_module.type_initial[i];
- }
- /* Insert casting types */
- cast = swig_module.cast_initial[i];
- while (cast->type) {
-
- /* Don't need to add information already in the list */
- ret = 0;
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
- #endif
- if (swig_module.next != &swig_module) {
- ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
- #ifdef SWIGRUNTIME_DEBUG
- if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
- #endif
- }
- if (ret) {
- if (type == swig_module.type_initial[i]) {
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
- #endif
- cast->type = ret;
- ret = 0;
- } else {
- /* Check for casting already in the list */
- swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
- #ifdef SWIGRUNTIME_DEBUG
- if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
- #endif
- if (!ocast) ret = 0;
- }
- }
- if (!ret) {
- #ifdef SWIGRUNTIME_DEBUG
- printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
- #endif
- if (type->cast) {
- type->cast->prev = cast;
- cast->next = type->cast;
- }
- type->cast = cast;
- }
- cast++;
- }
- /* Set entry in modules->types array equal to the type */
- swig_module.types[i] = type;
- }
- swig_module.types[i] = 0;
- #ifdef SWIGRUNTIME_DEBUG
- printf("**** SWIG_InitializeModule: Cast List ******\n");
- for (i = 0; i < swig_module.size; ++i) {
- int j = 0;
- swig_cast_info *cast = swig_module.cast_initial[i];
- printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
- while (cast->type) {
- printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
- cast++;
- ++j;
- }
- printf("---- Total casts: %d\n",j);
- }
- printf("**** SWIG_InitializeModule: Cast List ******\n");
- #endif
- }
- /* This function will propagate the clientdata field of type to
- * any new swig_type_info structures that have been added into the list
- * of equivalent types. It is like calling
- * SWIG_TypeClientData(type, clientdata) a second time.
- */
- SWIGRUNTIME void
- SWIG_PropagateClientData(void) {
- size_t i;
- swig_cast_info *equiv;
- static int init_run = 0;
- if (init_run) return;
- init_run = 1;
- for (i = 0; i < swig_module.size; i++) {
- if (swig_module.types[i]->clientdata) {
- equiv = swig_module.types[i]->cast;
- while (equiv) {
- if (!equiv->converter) {
- if (equiv->type && !equiv->type->clientdata)
- SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
- }
- equiv = equiv->next;
- }
- }
- }
- }
- #ifdef __cplusplus
- #if 0
- { /* c-mode */
- #endif
- }
- #endif
- /* Forward declaration of where the user's %init{} gets inserted */
- void SWIG_init_user(lua_State* L );
-
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* this is the initialization function
- added at the very end of the code
- the function is always called SWIG_init, but an earlier #define will rename it
- */
- #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
- LUALIB_API int SWIG_init(lua_State* L)
- #else
- SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
- #endif
- {
- #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
- int i;
- /* start with global table */
- lua_pushglobaltable (L);
- /* SWIG's internal initalisation */
- SWIG_InitializeModule((void*)L);
- SWIG_PropagateClientData();
- #endif
- #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
- /* add a global fn */
- SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
- SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
- /* begin the module (its a table with the same name as the module) */
- SWIG_Lua_module_begin(L,SWIG_name);
- /* add commands/functions */
- for (i = 0; swig_commands[i].name; i++){
- SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
- }
- /* add variables */
- for (i = 0; swig_variables[i].name; i++){
- SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
- }
- #endif
- #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
- /* set up base class pointers (the hierarchy) */
- for (i = 0; swig_types[i]; i++){
- if (swig_types[i]->clientdata){
- SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
- }
- }
- /* additional registration structs & classes in lua */
- for (i = 0; swig_types[i]; i++){
- if (swig_types[i]->clientdata){
- SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
- }
- }
- #endif
- #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
- /* constants */
- SWIG_Lua_InstallConstants(L,swig_constants);
- #endif
- #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
- /* invoke user-specific initialization */
- SWIG_init_user(L);
- /* end module */
- /* Note: We do not clean up the stack here (Lua will do this for us). At this
- point, we have the globals table and out module table on the stack. Returning
- one value makes the module table the result of the require command. */
- return 1;
- #else
- return 0;
- #endif
- }
- #ifdef __cplusplus
- }
- #endif
- const char* SWIG_LUACODE=
- "";
- void SWIG_init_user(lua_State* L)
- {
- /* exec Lua code if applicable */
- SWIG_Lua_dostring(L,SWIG_LUACODE);
- }
|