esl_wrap.cpp 121 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 1.3.35
  4. *
  5. * This file is not intended to be easily readable and contains a number of
  6. * coding conventions designed to improve portability and efficiency. Do not make
  7. * changes to this file unless you know what you are doing--modify the SWIG
  8. * interface file instead.
  9. * ----------------------------------------------------------------------------- */
  10. #define SWIGPERL
  11. #define SWIG_CASTRANK_MODE
  12. #ifdef __cplusplus
  13. template<typename T> class SwigValueWrapper {
  14. T *tt;
  15. public:
  16. SwigValueWrapper() : tt(0) { }
  17. SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
  18. SwigValueWrapper(const T& t) : tt(new T(t)) { }
  19. ~SwigValueWrapper() { delete tt; }
  20. SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
  21. operator T&() const { return *tt; }
  22. T *operator&() { return tt; }
  23. private:
  24. SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  25. };
  26. template <typename T> T SwigValueInit() {
  27. return T();
  28. }
  29. #endif
  30. /* -----------------------------------------------------------------------------
  31. * This section contains generic SWIG labels for method/variable
  32. * declarations/attributes, and other compiler dependent labels.
  33. * ----------------------------------------------------------------------------- */
  34. /* template workaround for compilers that cannot correctly implement the C++ standard */
  35. #ifndef SWIGTEMPLATEDISAMBIGUATOR
  36. # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  37. # define SWIGTEMPLATEDISAMBIGUATOR template
  38. # elif defined(__HP_aCC)
  39. /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  40. /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  41. # define SWIGTEMPLATEDISAMBIGUATOR template
  42. # else
  43. # define SWIGTEMPLATEDISAMBIGUATOR
  44. # endif
  45. #endif
  46. /* inline attribute */
  47. #ifndef SWIGINLINE
  48. # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  49. # define SWIGINLINE inline
  50. # else
  51. # define SWIGINLINE
  52. # endif
  53. #endif
  54. /* attribute recognised by some compilers to avoid 'unused' warnings */
  55. #ifndef SWIGUNUSED
  56. # if defined(__GNUC__)
  57. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  58. # define SWIGUNUSED __attribute__ ((__unused__))
  59. # else
  60. # define SWIGUNUSED
  61. # endif
  62. # elif defined(__ICC)
  63. # define SWIGUNUSED __attribute__ ((__unused__))
  64. # else
  65. # define SWIGUNUSED
  66. # endif
  67. #endif
  68. #ifndef SWIGUNUSEDPARM
  69. # ifdef __cplusplus
  70. # define SWIGUNUSEDPARM(p)
  71. # else
  72. # define SWIGUNUSEDPARM(p) p SWIGUNUSED
  73. # endif
  74. #endif
  75. /* internal SWIG method */
  76. #ifndef SWIGINTERN
  77. # define SWIGINTERN static SWIGUNUSED
  78. #endif
  79. /* internal inline SWIG method */
  80. #ifndef SWIGINTERNINLINE
  81. # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  82. #endif
  83. /* exporting methods */
  84. #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  85. # ifndef GCC_HASCLASSVISIBILITY
  86. # define GCC_HASCLASSVISIBILITY
  87. # endif
  88. #endif
  89. #ifndef SWIGEXPORT
  90. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  91. # if defined(STATIC_LINKED)
  92. # define SWIGEXPORT
  93. # else
  94. # define SWIGEXPORT __declspec(dllexport)
  95. # endif
  96. # else
  97. # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  98. # define SWIGEXPORT __attribute__ ((visibility("default")))
  99. # else
  100. # define SWIGEXPORT
  101. # endif
  102. # endif
  103. #endif
  104. /* calling conventions for Windows */
  105. #ifndef SWIGSTDCALL
  106. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  107. # define SWIGSTDCALL __stdcall
  108. # else
  109. # define SWIGSTDCALL
  110. # endif
  111. #endif
  112. /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  113. #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  114. # define _CRT_SECURE_NO_DEPRECATE
  115. #endif
  116. /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  117. #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  118. # define _SCL_SECURE_NO_DEPRECATE
  119. #endif
  120. /* -----------------------------------------------------------------------------
  121. * swigrun.swg
  122. *
  123. * This file contains generic CAPI SWIG runtime support for pointer
  124. * type checking.
  125. * ----------------------------------------------------------------------------- */
  126. /* This should only be incremented when either the layout of swig_type_info changes,
  127. or for whatever reason, the runtime changes incompatibly */
  128. #define SWIG_RUNTIME_VERSION "4"
  129. /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  130. #ifdef SWIG_TYPE_TABLE
  131. # define SWIG_QUOTE_STRING(x) #x
  132. # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  133. # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  134. #else
  135. # define SWIG_TYPE_TABLE_NAME
  136. #endif
  137. /*
  138. You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  139. creating a static or dynamic library from the swig runtime code.
  140. In 99.9% of the cases, swig just needs to declare them as 'static'.
  141. But only do this if is strictly necessary, ie, if you have problems
  142. with your compiler or so.
  143. */
  144. #ifndef SWIGRUNTIME
  145. # define SWIGRUNTIME SWIGINTERN
  146. #endif
  147. #ifndef SWIGRUNTIMEINLINE
  148. # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  149. #endif
  150. /* Generic buffer size */
  151. #ifndef SWIG_BUFFER_SIZE
  152. # define SWIG_BUFFER_SIZE 1024
  153. #endif
  154. /* Flags for pointer conversions */
  155. #define SWIG_POINTER_DISOWN 0x1
  156. #define SWIG_CAST_NEW_MEMORY 0x2
  157. /* Flags for new pointer objects */
  158. #define SWIG_POINTER_OWN 0x1
  159. /*
  160. Flags/methods for returning states.
  161. The swig conversion methods, as ConvertPtr, return and integer
  162. that tells if the conversion was successful or not. And if not,
  163. an error code can be returned (see swigerrors.swg for the codes).
  164. Use the following macros/flags to set or process the returning
  165. states.
  166. In old swig versions, you usually write code as:
  167. if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  168. // success code
  169. } else {
  170. //fail code
  171. }
  172. Now you can be more explicit as:
  173. int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  174. if (SWIG_IsOK(res)) {
  175. // success code
  176. } else {
  177. // fail code
  178. }
  179. that seems to be the same, but now you can also do
  180. Type *ptr;
  181. int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  182. if (SWIG_IsOK(res)) {
  183. // success code
  184. if (SWIG_IsNewObj(res) {
  185. ...
  186. delete *ptr;
  187. } else {
  188. ...
  189. }
  190. } else {
  191. // fail code
  192. }
  193. I.e., now SWIG_ConvertPtr can return new objects and you can
  194. identify the case and take care of the deallocation. Of course that
  195. requires also to SWIG_ConvertPtr to return new result values, as
  196. int SWIG_ConvertPtr(obj, ptr,...) {
  197. if (<obj is ok>) {
  198. if (<need new object>) {
  199. *ptr = <ptr to new allocated object>;
  200. return SWIG_NEWOBJ;
  201. } else {
  202. *ptr = <ptr to old object>;
  203. return SWIG_OLDOBJ;
  204. }
  205. } else {
  206. return SWIG_BADOBJ;
  207. }
  208. }
  209. Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  210. more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  211. swig errors code.
  212. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  213. allows to return the 'cast rank', for example, if you have this
  214. int food(double)
  215. int fooi(int);
  216. and you call
  217. food(1) // cast rank '1' (1 -> 1.0)
  218. fooi(1) // cast rank '0'
  219. just use the SWIG_AddCast()/SWIG_CheckState()
  220. */
  221. #define SWIG_OK (0)
  222. #define SWIG_ERROR (-1)
  223. #define SWIG_IsOK(r) (r >= 0)
  224. #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  225. /* The CastRankLimit says how many bits are used for the cast rank */
  226. #define SWIG_CASTRANKLIMIT (1 << 8)
  227. /* The NewMask denotes the object was created (using new/malloc) */
  228. #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  229. /* The TmpMask is for in/out typemaps that use temporal objects */
  230. #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  231. /* Simple returning values */
  232. #define SWIG_BADOBJ (SWIG_ERROR)
  233. #define SWIG_OLDOBJ (SWIG_OK)
  234. #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  235. #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  236. /* Check, add and del mask methods */
  237. #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  238. #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  239. #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  240. #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  241. #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  242. #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  243. /* Cast-Rank Mode */
  244. #if defined(SWIG_CASTRANK_MODE)
  245. # ifndef SWIG_TypeRank
  246. # define SWIG_TypeRank unsigned long
  247. # endif
  248. # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  249. # define SWIG_MAXCASTRANK (2)
  250. # endif
  251. # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  252. # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  253. SWIGINTERNINLINE int SWIG_AddCast(int r) {
  254. return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  255. }
  256. SWIGINTERNINLINE int SWIG_CheckState(int r) {
  257. return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  258. }
  259. #else /* no cast-rank mode */
  260. # define SWIG_AddCast
  261. # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  262. #endif
  263. #include <string.h>
  264. #ifdef __cplusplus
  265. extern "C" {
  266. #endif
  267. typedef void *(*swig_converter_func)(void *, int *);
  268. typedef struct swig_type_info *(*swig_dycast_func)(void **);
  269. /* Structure to store information on one type */
  270. typedef struct swig_type_info {
  271. const char *name; /* mangled name of this type */
  272. const char *str; /* human readable name of this type */
  273. swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  274. struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  275. void *clientdata; /* language specific type data */
  276. int owndata; /* flag if the structure owns the clientdata */
  277. } swig_type_info;
  278. /* Structure to store a type and conversion function used for casting */
  279. typedef struct swig_cast_info {
  280. swig_type_info *type; /* pointer to type that is equivalent to this type */
  281. swig_converter_func converter; /* function to cast the void pointers */
  282. struct swig_cast_info *next; /* pointer to next cast in linked list */
  283. struct swig_cast_info *prev; /* pointer to the previous cast */
  284. } swig_cast_info;
  285. /* Structure used to store module information
  286. * Each module generates one structure like this, and the runtime collects
  287. * all of these structures and stores them in a circularly linked list.*/
  288. typedef struct swig_module_info {
  289. swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  290. size_t size; /* Number of types in this module */
  291. struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  292. swig_type_info **type_initial; /* Array of initially generated type structures */
  293. swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  294. void *clientdata; /* Language specific module data */
  295. } swig_module_info;
  296. /*
  297. Compare two type names skipping the space characters, therefore
  298. "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  299. Return 0 when the two name types are equivalent, as in
  300. strncmp, but skipping ' '.
  301. */
  302. SWIGRUNTIME int
  303. SWIG_TypeNameComp(const char *f1, const char *l1,
  304. const char *f2, const char *l2) {
  305. for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  306. while ((*f1 == ' ') && (f1 != l1)) ++f1;
  307. while ((*f2 == ' ') && (f2 != l2)) ++f2;
  308. if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  309. }
  310. return (int)((l1 - f1) - (l2 - f2));
  311. }
  312. /*
  313. Check type equivalence in a name list like <name1>|<name2>|...
  314. Return 0 if not equal, 1 if equal
  315. */
  316. SWIGRUNTIME int
  317. SWIG_TypeEquiv(const char *nb, const char *tb) {
  318. int equiv = 0;
  319. const char* te = tb + strlen(tb);
  320. const char* ne = nb;
  321. while (!equiv && *ne) {
  322. for (nb = ne; *ne; ++ne) {
  323. if (*ne == '|') break;
  324. }
  325. equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
  326. if (*ne) ++ne;
  327. }
  328. return equiv;
  329. }
  330. /*
  331. Check type equivalence in a name list like <name1>|<name2>|...
  332. Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  333. */
  334. SWIGRUNTIME int
  335. SWIG_TypeCompare(const char *nb, const char *tb) {
  336. int equiv = 0;
  337. const char* te = tb + strlen(tb);
  338. const char* ne = nb;
  339. while (!equiv && *ne) {
  340. for (nb = ne; *ne; ++ne) {
  341. if (*ne == '|') break;
  342. }
  343. equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
  344. if (*ne) ++ne;
  345. }
  346. return equiv;
  347. }
  348. /* think of this as a c++ template<> or a scheme macro */
  349. #define SWIG_TypeCheck_Template(comparison, ty) \
  350. if (ty) { \
  351. swig_cast_info *iter = ty->cast; \
  352. while (iter) { \
  353. if (comparison) { \
  354. if (iter == ty->cast) return iter; \
  355. /* Move iter to the top of the linked list */ \
  356. iter->prev->next = iter->next; \
  357. if (iter->next) \
  358. iter->next->prev = iter->prev; \
  359. iter->next = ty->cast; \
  360. iter->prev = 0; \
  361. if (ty->cast) ty->cast->prev = iter; \
  362. ty->cast = iter; \
  363. return iter; \
  364. } \
  365. iter = iter->next; \
  366. } \
  367. } \
  368. return 0
  369. /*
  370. Check the typename
  371. */
  372. SWIGRUNTIME swig_cast_info *
  373. SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  374. SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
  375. }
  376. /* Same as previous function, except strcmp is replaced with a pointer comparison */
  377. SWIGRUNTIME swig_cast_info *
  378. SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
  379. SWIG_TypeCheck_Template(iter->type == from, into);
  380. }
  381. /*
  382. Cast a pointer up an inheritance hierarchy
  383. */
  384. SWIGRUNTIMEINLINE void *
  385. SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  386. return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  387. }
  388. /*
  389. Dynamic pointer casting. Down an inheritance hierarchy
  390. */
  391. SWIGRUNTIME swig_type_info *
  392. SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  393. swig_type_info *lastty = ty;
  394. if (!ty || !ty->dcast) return ty;
  395. while (ty && (ty->dcast)) {
  396. ty = (*ty->dcast)(ptr);
  397. if (ty) lastty = ty;
  398. }
  399. return lastty;
  400. }
  401. /*
  402. Return the name associated with this type
  403. */
  404. SWIGRUNTIMEINLINE const char *
  405. SWIG_TypeName(const swig_type_info *ty) {
  406. return ty->name;
  407. }
  408. /*
  409. Return the pretty name associated with this type,
  410. that is an unmangled type name in a form presentable to the user.
  411. */
  412. SWIGRUNTIME const char *
  413. SWIG_TypePrettyName(const swig_type_info *type) {
  414. /* The "str" field contains the equivalent pretty names of the
  415. type, separated by vertical-bar characters. We choose
  416. to print the last name, as it is often (?) the most
  417. specific. */
  418. if (!type) return NULL;
  419. if (type->str != NULL) {
  420. const char *last_name = type->str;
  421. const char *s;
  422. for (s = type->str; *s; s++)
  423. if (*s == '|') last_name = s+1;
  424. return last_name;
  425. }
  426. else
  427. return type->name;
  428. }
  429. /*
  430. Set the clientdata field for a type
  431. */
  432. SWIGRUNTIME void
  433. SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  434. swig_cast_info *cast = ti->cast;
  435. /* if (ti->clientdata == clientdata) return; */
  436. ti->clientdata = clientdata;
  437. while (cast) {
  438. if (!cast->converter) {
  439. swig_type_info *tc = cast->type;
  440. if (!tc->clientdata) {
  441. SWIG_TypeClientData(tc, clientdata);
  442. }
  443. }
  444. cast = cast->next;
  445. }
  446. }
  447. SWIGRUNTIME void
  448. SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  449. SWIG_TypeClientData(ti, clientdata);
  450. ti->owndata = 1;
  451. }
  452. /*
  453. Search for a swig_type_info structure only by mangled name
  454. Search is a O(log #types)
  455. We start searching at module start, and finish searching when start == end.
  456. Note: if start == end at the beginning of the function, we go all the way around
  457. the circular list.
  458. */
  459. SWIGRUNTIME swig_type_info *
  460. SWIG_MangledTypeQueryModule(swig_module_info *start,
  461. swig_module_info *end,
  462. const char *name) {
  463. swig_module_info *iter = start;
  464. do {
  465. if (iter->size) {
  466. register size_t l = 0;
  467. register size_t r = iter->size - 1;
  468. do {
  469. /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  470. register size_t i = (l + r) >> 1;
  471. const char *iname = iter->types[i]->name;
  472. if (iname) {
  473. register int compare = strcmp(name, iname);
  474. if (compare == 0) {
  475. return iter->types[i];
  476. } else if (compare < 0) {
  477. if (i) {
  478. r = i - 1;
  479. } else {
  480. break;
  481. }
  482. } else if (compare > 0) {
  483. l = i + 1;
  484. }
  485. } else {
  486. break; /* should never happen */
  487. }
  488. } while (l <= r);
  489. }
  490. iter = iter->next;
  491. } while (iter != end);
  492. return 0;
  493. }
  494. /*
  495. Search for a swig_type_info structure for either a mangled name or a human readable name.
  496. It first searches the mangled names of the types, which is a O(log #types)
  497. If a type is not found it then searches the human readable names, which is O(#types).
  498. We start searching at module start, and finish searching when start == end.
  499. Note: if start == end at the beginning of the function, we go all the way around
  500. the circular list.
  501. */
  502. SWIGRUNTIME swig_type_info *
  503. SWIG_TypeQueryModule(swig_module_info *start,
  504. swig_module_info *end,
  505. const char *name) {
  506. /* STEP 1: Search the name field using binary search */
  507. swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  508. if (ret) {
  509. return ret;
  510. } else {
  511. /* STEP 2: If the type hasn't been found, do a complete search
  512. of the str field (the human readable name) */
  513. swig_module_info *iter = start;
  514. do {
  515. register size_t i = 0;
  516. for (; i < iter->size; ++i) {
  517. if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  518. return iter->types[i];
  519. }
  520. iter = iter->next;
  521. } while (iter != end);
  522. }
  523. /* neither found a match */
  524. return 0;
  525. }
  526. /*
  527. Pack binary data into a string
  528. */
  529. SWIGRUNTIME char *
  530. SWIG_PackData(char *c, void *ptr, size_t sz) {
  531. static const char hex[17] = "0123456789abcdef";
  532. register const unsigned char *u = (unsigned char *) ptr;
  533. register const unsigned char *eu = u + sz;
  534. for (; u != eu; ++u) {
  535. register unsigned char uu = *u;
  536. *(c++) = hex[(uu & 0xf0) >> 4];
  537. *(c++) = hex[uu & 0xf];
  538. }
  539. return c;
  540. }
  541. /*
  542. Unpack binary data from a string
  543. */
  544. SWIGRUNTIME const char *
  545. SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  546. register unsigned char *u = (unsigned char *) ptr;
  547. register const unsigned char *eu = u + sz;
  548. for (; u != eu; ++u) {
  549. register char d = *(c++);
  550. register unsigned char uu;
  551. if ((d >= '0') && (d <= '9'))
  552. uu = ((d - '0') << 4);
  553. else if ((d >= 'a') && (d <= 'f'))
  554. uu = ((d - ('a'-10)) << 4);
  555. else
  556. return (char *) 0;
  557. d = *(c++);
  558. if ((d >= '0') && (d <= '9'))
  559. uu |= (d - '0');
  560. else if ((d >= 'a') && (d <= 'f'))
  561. uu |= (d - ('a'-10));
  562. else
  563. return (char *) 0;
  564. *u = uu;
  565. }
  566. return c;
  567. }
  568. /*
  569. Pack 'void *' into a string buffer.
  570. */
  571. SWIGRUNTIME char *
  572. SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  573. char *r = buff;
  574. if ((2*sizeof(void *) + 2) > bsz) return 0;
  575. *(r++) = '_';
  576. r = SWIG_PackData(r,&ptr,sizeof(void *));
  577. if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  578. strcpy(r,name);
  579. return buff;
  580. }
  581. SWIGRUNTIME const char *
  582. SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  583. if (*c != '_') {
  584. if (strcmp(c,"NULL") == 0) {
  585. *ptr = (void *) 0;
  586. return name;
  587. } else {
  588. return 0;
  589. }
  590. }
  591. return SWIG_UnpackData(++c,ptr,sizeof(void *));
  592. }
  593. SWIGRUNTIME char *
  594. SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  595. char *r = buff;
  596. size_t lname = (name ? strlen(name) : 0);
  597. if ((2*sz + 2 + lname) > bsz) return 0;
  598. *(r++) = '_';
  599. r = SWIG_PackData(r,ptr,sz);
  600. if (lname) {
  601. strncpy(r,name,lname+1);
  602. } else {
  603. *r = 0;
  604. }
  605. return buff;
  606. }
  607. SWIGRUNTIME const char *
  608. SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  609. if (*c != '_') {
  610. if (strcmp(c,"NULL") == 0) {
  611. memset(ptr,0,sz);
  612. return name;
  613. } else {
  614. return 0;
  615. }
  616. }
  617. return SWIG_UnpackData(++c,ptr,sz);
  618. }
  619. #ifdef __cplusplus
  620. }
  621. #endif
  622. /* Errors in SWIG */
  623. #define SWIG_UnknownError -1
  624. #define SWIG_IOError -2
  625. #define SWIG_RuntimeError -3
  626. #define SWIG_IndexError -4
  627. #define SWIG_TypeError -5
  628. #define SWIG_DivisionByZero -6
  629. #define SWIG_OverflowError -7
  630. #define SWIG_SyntaxError -8
  631. #define SWIG_ValueError -9
  632. #define SWIG_SystemError -10
  633. #define SWIG_AttributeError -11
  634. #define SWIG_MemoryError -12
  635. #define SWIG_NullReferenceError -13
  636. #ifdef __cplusplus
  637. /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
  638. #include <math.h>
  639. #include <stdlib.h>
  640. extern "C" {
  641. #endif
  642. #include "EXTERN.h"
  643. #include "perl.h"
  644. #include "XSUB.h"
  645. /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
  646. /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
  647. #ifndef PERL_REVISION
  648. # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
  649. # define PERL_PATCHLEVEL_H_IMPLICIT
  650. # include <patchlevel.h>
  651. # endif
  652. # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
  653. # include <could_not_find_Perl_patchlevel.h>
  654. # endif
  655. # ifndef PERL_REVISION
  656. # define PERL_REVISION (5)
  657. # define PERL_VERSION PATCHLEVEL
  658. # define PERL_SUBVERSION SUBVERSION
  659. # endif
  660. #endif
  661. #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
  662. #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
  663. #endif
  664. #ifndef SvIOK_UV
  665. # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
  666. #endif
  667. #ifndef SvUOK
  668. # define SvUOK(sv) SvIOK_UV(sv)
  669. #endif
  670. #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
  671. # define PL_sv_undef sv_undef
  672. # define PL_na na
  673. # define PL_errgv errgv
  674. # define PL_sv_no sv_no
  675. # define PL_sv_yes sv_yes
  676. # define PL_markstack_ptr markstack_ptr
  677. #endif
  678. #ifndef IVSIZE
  679. # ifdef LONGSIZE
  680. # define IVSIZE LONGSIZE
  681. # else
  682. # define IVSIZE 4 /* A bold guess, but the best we can make. */
  683. # endif
  684. #endif
  685. #ifndef INT2PTR
  686. # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
  687. # define PTRV UV
  688. # define INT2PTR(any,d) (any)(d)
  689. # else
  690. # if PTRSIZE == LONGSIZE
  691. # define PTRV unsigned long
  692. # else
  693. # define PTRV unsigned
  694. # endif
  695. # define INT2PTR(any,d) (any)(PTRV)(d)
  696. # endif
  697. # define NUM2PTR(any,d) (any)(PTRV)(d)
  698. # define PTR2IV(p) INT2PTR(IV,p)
  699. # define PTR2UV(p) INT2PTR(UV,p)
  700. # define PTR2NV(p) NUM2PTR(NV,p)
  701. # if PTRSIZE == LONGSIZE
  702. # define PTR2ul(p) (unsigned long)(p)
  703. # else
  704. # define PTR2ul(p) INT2PTR(unsigned long,p)
  705. # endif
  706. #endif /* !INT2PTR */
  707. #ifndef SvPV_nolen
  708. # define SvPV_nolen(x) SvPV(x,PL_na)
  709. #endif
  710. #ifndef get_sv
  711. # define get_sv perl_get_sv
  712. #endif
  713. #ifndef ERRSV
  714. # define ERRSV get_sv("@",FALSE)
  715. #endif
  716. #ifndef pTHX_
  717. #define pTHX_
  718. #endif
  719. #include <string.h>
  720. #ifdef __cplusplus
  721. }
  722. #endif
  723. /* -----------------------------------------------------------------------------
  724. * error manipulation
  725. * ----------------------------------------------------------------------------- */
  726. SWIGINTERN const char*
  727. SWIG_Perl_ErrorType(int code) {
  728. const char* type = 0;
  729. switch(code) {
  730. case SWIG_MemoryError:
  731. type = "MemoryError";
  732. break;
  733. case SWIG_IOError:
  734. type = "IOError";
  735. break;
  736. case SWIG_RuntimeError:
  737. type = "RuntimeError";
  738. break;
  739. case SWIG_IndexError:
  740. type = "IndexError";
  741. break;
  742. case SWIG_TypeError:
  743. type = "TypeError";
  744. break;
  745. case SWIG_DivisionByZero:
  746. type = "ZeroDivisionError";
  747. break;
  748. case SWIG_OverflowError:
  749. type = "OverflowError";
  750. break;
  751. case SWIG_SyntaxError:
  752. type = "SyntaxError";
  753. break;
  754. case SWIG_ValueError:
  755. type = "ValueError";
  756. break;
  757. case SWIG_SystemError:
  758. type = "SystemError";
  759. break;
  760. case SWIG_AttributeError:
  761. type = "AttributeError";
  762. break;
  763. default:
  764. type = "RuntimeError";
  765. }
  766. return type;
  767. }
  768. /* -----------------------------------------------------------------------------
  769. * perlrun.swg
  770. *
  771. * This file contains the runtime support for Perl modules
  772. * and includes code for managing global variables and pointer
  773. * type checking.
  774. * ----------------------------------------------------------------------------- */
  775. #ifdef PERL_OBJECT
  776. #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
  777. #define SWIG_PERL_OBJECT_CALL pPerl,
  778. #else
  779. #define SWIG_PERL_OBJECT_DECL
  780. #define SWIG_PERL_OBJECT_CALL
  781. #endif
  782. /* Common SWIG API */
  783. /* for raw pointers */
  784. #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
  785. #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
  786. /* for raw packed data */
  787. #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
  788. #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
  789. /* for class or struct pointers */
  790. #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  791. #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  792. /* for C or C++ function pointers */
  793. #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
  794. #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
  795. /* for C++ member pointers, ie, member methods */
  796. #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
  797. #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
  798. /* Runtime API */
  799. #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
  800. #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
  801. /* Error manipulation */
  802. #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
  803. #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
  804. #define SWIG_fail goto fail
  805. /* Perl-specific SWIG API */
  806. #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
  807. #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
  808. #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
  809. #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
  810. #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
  811. #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
  812. #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
  813. /* -----------------------------------------------------------------------------
  814. * pointers/data manipulation
  815. * ----------------------------------------------------------------------------- */
  816. /* For backward compatibility only */
  817. #define SWIG_POINTER_EXCEPTION 0
  818. #ifdef __cplusplus
  819. extern "C" {
  820. #endif
  821. #define SWIG_OWNER SWIG_POINTER_OWN
  822. #define SWIG_SHADOW SWIG_OWNER << 1
  823. #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
  824. /* SWIG Perl macros */
  825. /* Macro to declare an XS function */
  826. #ifndef XSPROTO
  827. # define XSPROTO(name) void name(pTHX_ CV* cv)
  828. #endif
  829. /* Macro to call an XS function */
  830. #ifdef PERL_OBJECT
  831. # define SWIG_CALLXS(_name) _name(cv,pPerl)
  832. #else
  833. # ifndef MULTIPLICITY
  834. # define SWIG_CALLXS(_name) _name(cv)
  835. # else
  836. # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
  837. # endif
  838. #endif
  839. #ifdef PERL_OBJECT
  840. #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
  841. #ifdef __cplusplus
  842. extern "C" {
  843. #endif
  844. typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
  845. #ifdef __cplusplus
  846. }
  847. #endif
  848. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  849. #define SWIGCLASS_STATIC
  850. #else /* PERL_OBJECT */
  851. #define MAGIC_PPERL
  852. #define SWIGCLASS_STATIC static SWIGUNUSED
  853. #ifndef MULTIPLICITY
  854. #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
  855. #ifdef __cplusplus
  856. extern "C" {
  857. #endif
  858. typedef int (*SwigMagicFunc)(SV *, MAGIC *);
  859. #ifdef __cplusplus
  860. }
  861. #endif
  862. #else /* MULTIPLICITY */
  863. #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
  864. #ifdef __cplusplus
  865. extern "C" {
  866. #endif
  867. typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
  868. #ifdef __cplusplus
  869. }
  870. #endif
  871. #endif /* MULTIPLICITY */
  872. #endif /* PERL_OBJECT */
  873. /* Workaround for bug in perl 5.6.x croak and earlier */
  874. #if (PERL_VERSION < 8)
  875. # ifdef PERL_OBJECT
  876. # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
  877. static void SWIG_Perl_croak_null(CPerlObj *pPerl)
  878. # else
  879. static void SWIG_croak_null()
  880. # endif
  881. {
  882. SV *err=ERRSV;
  883. # if (PERL_VERSION < 6)
  884. croak("%_", err);
  885. # else
  886. if (SvOK(err) && !SvROK(err)) croak("%_", err);
  887. croak(Nullch);
  888. # endif
  889. }
  890. #else
  891. # define SWIG_croak_null() croak(Nullch)
  892. #endif
  893. /*
  894. Define how strict is the cast between strings and integers/doubles
  895. when overloading between these types occurs.
  896. The default is making it as strict as possible by using SWIG_AddCast
  897. when needed.
  898. You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
  899. disable the SWIG_AddCast, making the casting between string and
  900. numbers less strict.
  901. In the end, we try to solve the overloading between strings and
  902. numerical types in the more natural way, but if you can avoid it,
  903. well, avoid it using %rename, for example.
  904. */
  905. #ifndef SWIG_PERL_NO_STRICT_STR2NUM
  906. # ifndef SWIG_PERL_STRICT_STR2NUM
  907. # define SWIG_PERL_STRICT_STR2NUM
  908. # endif
  909. #endif
  910. #ifdef SWIG_PERL_STRICT_STR2NUM
  911. /* string takes precedence */
  912. #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
  913. #else
  914. /* number takes precedence */
  915. #define SWIG_Str2NumCast(x) x
  916. #endif
  917. #include <stdlib.h>
  918. SWIGRUNTIME const char *
  919. SWIG_Perl_TypeProxyName(const swig_type_info *type) {
  920. if (!type) return NULL;
  921. if (type->clientdata != NULL) {
  922. return (const char*) type->clientdata;
  923. }
  924. else {
  925. return type->name;
  926. }
  927. }
  928. SWIGRUNTIME swig_cast_info *
  929. SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
  930. SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0))
  931. || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
  932. }
  933. /* Function for getting a pointer value */
  934. SWIGRUNTIME int
  935. SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  936. swig_cast_info *tc;
  937. void *voidptr = (void *)0;
  938. SV *tsv = 0;
  939. /* If magical, apply more magic */
  940. if (SvGMAGICAL(sv))
  941. mg_get(sv);
  942. /* Check to see if this is an object */
  943. if (sv_isobject(sv)) {
  944. IV tmp = 0;
  945. tsv = (SV*) SvRV(sv);
  946. if ((SvTYPE(tsv) == SVt_PVHV)) {
  947. MAGIC *mg;
  948. if (SvMAGICAL(tsv)) {
  949. mg = mg_find(tsv,'P');
  950. if (mg) {
  951. sv = mg->mg_obj;
  952. if (sv_isobject(sv)) {
  953. tsv = (SV*)SvRV(sv);
  954. tmp = SvIV(tsv);
  955. }
  956. }
  957. } else {
  958. return SWIG_ERROR;
  959. }
  960. } else {
  961. tmp = SvIV(tsv);
  962. }
  963. voidptr = INT2PTR(void *,tmp);
  964. } else if (! SvOK(sv)) { /* Check for undef */
  965. *(ptr) = (void *) 0;
  966. return SWIG_OK;
  967. } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
  968. if (!SvROK(sv)) {
  969. *(ptr) = (void *) 0;
  970. return SWIG_OK;
  971. } else {
  972. return SWIG_ERROR;
  973. }
  974. } else { /* Don't know what it is */
  975. return SWIG_ERROR;
  976. }
  977. if (_t) {
  978. /* Now see if the types match */
  979. char *_c = HvNAME(SvSTASH(SvRV(sv)));
  980. tc = SWIG_TypeProxyCheck(_c,_t);
  981. if (!tc) {
  982. return SWIG_ERROR;
  983. }
  984. {
  985. int newmemory = 0;
  986. *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
  987. assert(!newmemory); /* newmemory handling not yet implemented */
  988. }
  989. } else {
  990. *ptr = voidptr;
  991. }
  992. /*
  993. * DISOWN implementation: we need a perl guru to check this one.
  994. */
  995. if (tsv && (flags & SWIG_POINTER_DISOWN)) {
  996. /*
  997. * almost copy paste code from below SWIG_POINTER_OWN setting
  998. */
  999. SV *obj = sv;
  1000. HV *stash = SvSTASH(SvRV(obj));
  1001. GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE);
  1002. if (isGV(gv)) {
  1003. HV *hv = GvHVn(gv);
  1004. /*
  1005. * To set ownership (see below), a newSViv(1) entry is added.
  1006. * Hence, to remove ownership, we delete the entry.
  1007. */
  1008. if (hv_exists_ent(hv, obj, 0)) {
  1009. hv_delete_ent(hv, obj, 0, 0);
  1010. }
  1011. }
  1012. }
  1013. return SWIG_OK;
  1014. }
  1015. SWIGRUNTIME void
  1016. SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  1017. if (ptr && (flags & SWIG_SHADOW)) {
  1018. SV *self;
  1019. SV *obj=newSV(0);
  1020. HV *hash=newHV();
  1021. HV *stash;
  1022. sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
  1023. stash=SvSTASH(SvRV(obj));
  1024. if (flags & SWIG_POINTER_OWN) {
  1025. HV *hv;
  1026. GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
  1027. if (!isGV(gv))
  1028. gv_init(gv, stash, "OWNER", 5, FALSE);
  1029. hv=GvHVn(gv);
  1030. hv_store_ent(hv, obj, newSViv(1), 0);
  1031. }
  1032. sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
  1033. SvREFCNT_dec(obj);
  1034. self=newRV_noinc((SV *)hash);
  1035. sv_setsv(sv, self);
  1036. SvREFCNT_dec((SV *)self);
  1037. sv_bless(sv, stash);
  1038. }
  1039. else {
  1040. sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
  1041. }
  1042. }
  1043. SWIGRUNTIMEINLINE SV *
  1044. SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  1045. SV *result = sv_newmortal();
  1046. SWIG_MakePtr(result, ptr, t, flags);
  1047. return result;
  1048. }
  1049. SWIGRUNTIME void
  1050. SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  1051. char result[1024];
  1052. char *r = result;
  1053. if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
  1054. *(r++) = '_';
  1055. r = SWIG_PackData(r,ptr,sz);
  1056. strcpy(r,SWIG_Perl_TypeProxyName(type));
  1057. sv_setpv(sv, result);
  1058. }
  1059. SWIGRUNTIME SV *
  1060. SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
  1061. SV *result = sv_newmortal();
  1062. SWIG_Perl_MakePackedObj(result, ptr, sz, type);
  1063. return result;
  1064. }
  1065. /* Convert a packed value value */
  1066. SWIGRUNTIME int
  1067. SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
  1068. swig_cast_info *tc;
  1069. const char *c = 0;
  1070. if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
  1071. c = SvPV_nolen(obj);
  1072. /* Pointer values must start with leading underscore */
  1073. if (*c != '_') return SWIG_ERROR;
  1074. c++;
  1075. c = SWIG_UnpackData(c,ptr,sz);
  1076. if (ty) {
  1077. tc = SWIG_TypeCheck(c,ty);
  1078. if (!tc) return SWIG_ERROR;
  1079. }
  1080. return SWIG_OK;
  1081. }
  1082. /* Macros for low-level exception handling */
  1083. #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
  1084. typedef XSPROTO(SwigPerlWrapper);
  1085. typedef SwigPerlWrapper *SwigPerlWrapperPtr;
  1086. /* Structure for command table */
  1087. typedef struct {
  1088. const char *name;
  1089. SwigPerlWrapperPtr wrapper;
  1090. } swig_command_info;
  1091. /* Information for constant table */
  1092. #define SWIG_INT 1
  1093. #define SWIG_FLOAT 2
  1094. #define SWIG_STRING 3
  1095. #define SWIG_POINTER 4
  1096. #define SWIG_BINARY 5
  1097. /* Constant information structure */
  1098. typedef struct swig_constant_info {
  1099. int type;
  1100. const char *name;
  1101. long lvalue;
  1102. double dvalue;
  1103. void *pvalue;
  1104. swig_type_info **ptype;
  1105. } swig_constant_info;
  1106. /* Structure for variable table */
  1107. typedef struct {
  1108. const char *name;
  1109. SwigMagicFunc set;
  1110. SwigMagicFunc get;
  1111. swig_type_info **type;
  1112. } swig_variable_info;
  1113. /* Magic variable code */
  1114. #ifndef PERL_OBJECT
  1115. #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
  1116. #ifndef MULTIPLICITY
  1117. SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
  1118. #else
  1119. SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
  1120. #endif
  1121. #else
  1122. # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
  1123. SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
  1124. #endif
  1125. {
  1126. MAGIC *mg;
  1127. sv_magic(sv,sv,'U',(char *) name,strlen(name));
  1128. mg = mg_find(sv,'U');
  1129. mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  1130. mg->mg_virtual->svt_get = (SwigMagicFunc) get;
  1131. mg->mg_virtual->svt_set = (SwigMagicFunc) set;
  1132. mg->mg_virtual->svt_len = 0;
  1133. mg->mg_virtual->svt_clear = 0;
  1134. mg->mg_virtual->svt_free = 0;
  1135. }
  1136. SWIGRUNTIME swig_module_info *
  1137. SWIG_Perl_GetModule(void) {
  1138. static void *type_pointer = (void *)0;
  1139. SV *pointer;
  1140. /* first check if pointer already created */
  1141. if (!type_pointer) {
  1142. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
  1143. if (pointer && SvOK(pointer)) {
  1144. type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
  1145. }
  1146. }
  1147. return (swig_module_info *) type_pointer;
  1148. }
  1149. SWIGRUNTIME void
  1150. SWIG_Perl_SetModule(swig_module_info *module) {
  1151. SV *pointer;
  1152. /* create a new pointer */
  1153. pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
  1154. sv_setiv(pointer, PTR2IV(module));
  1155. }
  1156. #ifdef __cplusplus
  1157. }
  1158. #endif
  1159. /* Workaround perl5 global namespace pollution. Note that undefining library
  1160. * functions like fopen will not solve the problem on all platforms as fopen
  1161. * might be a macro on Windows but not necessarily on other operating systems. */
  1162. #ifdef do_open
  1163. #undef do_open
  1164. #endif
  1165. #ifdef do_close
  1166. #undef do_close
  1167. #endif
  1168. #ifdef scalar
  1169. #undef scalar
  1170. #endif
  1171. #ifdef list
  1172. #undef list
  1173. #endif
  1174. #ifdef apply
  1175. #undef apply
  1176. #endif
  1177. #ifdef convert
  1178. #undef convert
  1179. #endif
  1180. #ifdef Error
  1181. #undef Error
  1182. #endif
  1183. #ifdef form
  1184. #undef form
  1185. #endif
  1186. #ifdef vform
  1187. #undef vform
  1188. #endif
  1189. #ifdef LABEL
  1190. #undef LABEL
  1191. #endif
  1192. #ifdef METHOD
  1193. #undef METHOD
  1194. #endif
  1195. #ifdef Move
  1196. #undef Move
  1197. #endif
  1198. #ifdef yylex
  1199. #undef yylex
  1200. #endif
  1201. #ifdef yyparse
  1202. #undef yyparse
  1203. #endif
  1204. #ifdef yyerror
  1205. #undef yyerror
  1206. #endif
  1207. #ifdef invert
  1208. #undef invert
  1209. #endif
  1210. #ifdef ref
  1211. #undef ref
  1212. #endif
  1213. #ifdef read
  1214. #undef read
  1215. #endif
  1216. #ifdef write
  1217. #undef write
  1218. #endif
  1219. #ifdef eof
  1220. #undef eof
  1221. #endif
  1222. #ifdef bool
  1223. #undef bool
  1224. #endif
  1225. #ifdef close
  1226. #undef close
  1227. #endif
  1228. #ifdef rewind
  1229. #undef rewind
  1230. #endif
  1231. #ifdef free
  1232. #undef free
  1233. #endif
  1234. #ifdef malloc
  1235. #undef malloc
  1236. #endif
  1237. #ifdef calloc
  1238. #undef calloc
  1239. #endif
  1240. #ifdef Stat
  1241. #undef Stat
  1242. #endif
  1243. #ifdef check
  1244. #undef check
  1245. #endif
  1246. #ifdef seekdir
  1247. #undef seekdir
  1248. #endif
  1249. #ifdef open
  1250. #undef open
  1251. #endif
  1252. #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  1253. #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  1254. /* -------- TYPES TABLE (BEGIN) -------- */
  1255. #define SWIGTYPE_p_ESLconnection swig_types[0]
  1256. #define SWIGTYPE_p_ESLevent swig_types[1]
  1257. #define SWIGTYPE_p_char swig_types[2]
  1258. #define SWIGTYPE_p_esl_event_t swig_types[3]
  1259. #define SWIGTYPE_p_esl_priority_t swig_types[4]
  1260. static swig_type_info *swig_types[6];
  1261. static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
  1262. #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  1263. #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  1264. /* -------- TYPES TABLE (END) -------- */
  1265. #define SWIG_init boot_ESL
  1266. #define SWIG_name "ESLc::boot_ESL"
  1267. #define SWIG_prefix "ESLc::"
  1268. #define SWIGVERSION 0x010335
  1269. #define SWIG_VERSION SWIGVERSION
  1270. #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
  1271. #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
  1272. #include <stdexcept>
  1273. #ifdef __cplusplus
  1274. extern "C"
  1275. #endif
  1276. #ifndef PERL_OBJECT
  1277. #ifndef MULTIPLICITY
  1278. SWIGEXPORT void SWIG_init (CV* cv);
  1279. #else
  1280. SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
  1281. #endif
  1282. #else
  1283. SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
  1284. #endif
  1285. #include "esl.h"
  1286. #include "esl_oop.h"
  1287. SWIGINTERN swig_type_info*
  1288. SWIG_pchar_descriptor(void)
  1289. {
  1290. static int init = 0;
  1291. static swig_type_info* info = 0;
  1292. if (!init) {
  1293. info = SWIG_TypeQuery("_p_char");
  1294. init = 1;
  1295. }
  1296. return info;
  1297. }
  1298. SWIGINTERN int
  1299. SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
  1300. {
  1301. if (SvPOK(obj)) {
  1302. STRLEN len = 0;
  1303. char *cstr = SvPV(obj, len);
  1304. size_t size = len + 1;
  1305. if (cptr) {
  1306. if (alloc) {
  1307. if (*alloc == SWIG_NEWOBJ) {
  1308. *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
  1309. } else {
  1310. *cptr = cstr;
  1311. *alloc = SWIG_OLDOBJ;
  1312. }
  1313. }
  1314. }
  1315. if (psize) *psize = size;
  1316. return SWIG_OK;
  1317. } else {
  1318. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  1319. if (pchar_descriptor) {
  1320. char* vptr = 0;
  1321. if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
  1322. if (cptr) *cptr = vptr;
  1323. if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
  1324. if (alloc) *alloc = SWIG_OLDOBJ;
  1325. return SWIG_OK;
  1326. }
  1327. }
  1328. }
  1329. return SWIG_TypeError;
  1330. }
  1331. SWIGINTERNINLINE SV *
  1332. SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  1333. {
  1334. SV *obj = sv_newmortal();
  1335. if (carray) {
  1336. sv_setpvn(obj, carray, size);
  1337. } else {
  1338. sv_setsv(obj, &PL_sv_undef);
  1339. }
  1340. return obj;
  1341. }
  1342. SWIGINTERNINLINE SV *
  1343. SWIG_FromCharPtr(const char *cptr)
  1344. {
  1345. return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  1346. }
  1347. #include <limits.h>
  1348. #if !defined(SWIG_NO_LLONG_MAX)
  1349. # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  1350. # define LLONG_MAX __LONG_LONG_MAX__
  1351. # define LLONG_MIN (-LLONG_MAX - 1LL)
  1352. # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  1353. # endif
  1354. #endif
  1355. SWIGINTERN int
  1356. SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
  1357. {
  1358. if (SvNIOK(obj)) {
  1359. if (val) *val = SvNV(obj);
  1360. return SWIG_OK;
  1361. } else if (SvIOK(obj)) {
  1362. if (val) *val = (double) SvIV(obj);
  1363. return SWIG_AddCast(SWIG_OK);
  1364. } else {
  1365. const char *nptr = SvPV_nolen(obj);
  1366. if (nptr) {
  1367. char *endptr;
  1368. double v = strtod(nptr, &endptr);
  1369. if (errno == ERANGE) {
  1370. errno = 0;
  1371. return SWIG_OverflowError;
  1372. } else {
  1373. if (*endptr == '\0') {
  1374. if (val) *val = v;
  1375. return SWIG_Str2NumCast(SWIG_OK);
  1376. }
  1377. }
  1378. }
  1379. }
  1380. return SWIG_TypeError;
  1381. }
  1382. #include <float.h>
  1383. #include <math.h>
  1384. SWIGINTERNINLINE int
  1385. SWIG_CanCastAsInteger(double *d, double min, double max) {
  1386. double x = *d;
  1387. if ((min <= x && x <= max)) {
  1388. double fx = floor(x);
  1389. double cx = ceil(x);
  1390. double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  1391. if ((errno == EDOM) || (errno == ERANGE)) {
  1392. errno = 0;
  1393. } else {
  1394. double summ, reps, diff;
  1395. if (rd < x) {
  1396. diff = x - rd;
  1397. } else if (rd > x) {
  1398. diff = rd - x;
  1399. } else {
  1400. return 1;
  1401. }
  1402. summ = rd + x;
  1403. reps = diff/summ;
  1404. if (reps < 8*DBL_EPSILON) {
  1405. *d = rd;
  1406. return 1;
  1407. }
  1408. }
  1409. }
  1410. return 0;
  1411. }
  1412. SWIGINTERN int
  1413. SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
  1414. {
  1415. if (SvIOK(obj)) {
  1416. if (val) *val = SvIV(obj);
  1417. return SWIG_OK;
  1418. } else {
  1419. int dispatch = 0;
  1420. const char *nptr = SvPV_nolen(obj);
  1421. if (nptr) {
  1422. char *endptr;
  1423. long v;
  1424. errno = 0;
  1425. v = strtol(nptr, &endptr,0);
  1426. if (errno == ERANGE) {
  1427. errno = 0;
  1428. return SWIG_OverflowError;
  1429. } else {
  1430. if (*endptr == '\0') {
  1431. if (val) *val = v;
  1432. return SWIG_Str2NumCast(SWIG_OK);
  1433. }
  1434. }
  1435. }
  1436. if (!dispatch) {
  1437. double d;
  1438. int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
  1439. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  1440. if (val) *val = (long)(d);
  1441. return res;
  1442. }
  1443. }
  1444. }
  1445. return SWIG_TypeError;
  1446. }
  1447. SWIGINTERN int
  1448. SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
  1449. {
  1450. long v;
  1451. int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  1452. if (SWIG_IsOK(res)) {
  1453. if ((v < INT_MIN || v > INT_MAX)) {
  1454. return SWIG_OverflowError;
  1455. } else {
  1456. if (val) *val = static_cast< int >(v);
  1457. }
  1458. }
  1459. return res;
  1460. }
  1461. SWIGINTERNINLINE SV *
  1462. SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
  1463. {
  1464. SV *obj = sv_newmortal();
  1465. sv_setiv(obj, (IV) value);
  1466. return obj;
  1467. }
  1468. SWIGINTERNINLINE SV *
  1469. SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
  1470. {
  1471. return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
  1472. }
  1473. SWIGINTERNINLINE SV *
  1474. SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
  1475. {
  1476. SV *obj = sv_newmortal();
  1477. if (value) {
  1478. sv_setsv(obj, &PL_sv_yes);
  1479. } else {
  1480. sv_setsv(obj, &PL_sv_no);
  1481. }
  1482. return obj;
  1483. }
  1484. #ifdef __cplusplus
  1485. extern "C" {
  1486. #endif
  1487. #ifdef PERL_OBJECT
  1488. #define MAGIC_CLASS _wrap_ESL_var::
  1489. class _wrap_ESL_var : public CPerlObj {
  1490. public:
  1491. #else
  1492. #define MAGIC_CLASS
  1493. #endif
  1494. SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
  1495. MAGIC_PPERL
  1496. croak("Value is read-only.");
  1497. return 0;
  1498. }
  1499. #ifdef PERL_OBJECT
  1500. };
  1501. #endif
  1502. #ifdef __cplusplus
  1503. }
  1504. #endif
  1505. #ifdef __cplusplus
  1506. extern "C" {
  1507. #endif
  1508. XS(_wrap_ESLevent_event_set) {
  1509. {
  1510. ESLevent *arg1 = (ESLevent *) 0 ;
  1511. esl_event_t *arg2 = (esl_event_t *) 0 ;
  1512. void *argp1 = 0 ;
  1513. int res1 = 0 ;
  1514. void *argp2 = 0 ;
  1515. int res2 = 0 ;
  1516. int argvi = 0;
  1517. dXSARGS;
  1518. if ((items < 2) || (items > 2)) {
  1519. SWIG_croak("Usage: ESLevent_event_set(self,event);");
  1520. }
  1521. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1522. if (!SWIG_IsOK(res1)) {
  1523. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_set" "', argument " "1"" of type '" "ESLevent *""'");
  1524. }
  1525. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1526. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_esl_event_t, SWIG_POINTER_DISOWN | 0 );
  1527. if (!SWIG_IsOK(res2)) {
  1528. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_event_set" "', argument " "2"" of type '" "esl_event_t *""'");
  1529. }
  1530. arg2 = reinterpret_cast< esl_event_t * >(argp2);
  1531. if (arg1) (arg1)->event = arg2;
  1532. XSRETURN(argvi);
  1533. fail:
  1534. SWIG_croak_null();
  1535. }
  1536. }
  1537. XS(_wrap_ESLevent_event_get) {
  1538. {
  1539. ESLevent *arg1 = (ESLevent *) 0 ;
  1540. esl_event_t *result = 0 ;
  1541. void *argp1 = 0 ;
  1542. int res1 = 0 ;
  1543. int argvi = 0;
  1544. dXSARGS;
  1545. if ((items < 1) || (items > 1)) {
  1546. SWIG_croak("Usage: ESLevent_event_get(self);");
  1547. }
  1548. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1549. if (!SWIG_IsOK(res1)) {
  1550. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_event_get" "', argument " "1"" of type '" "ESLevent *""'");
  1551. }
  1552. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1553. result = (esl_event_t *) ((arg1)->event);
  1554. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_esl_event_t, 0 | 0); argvi++ ;
  1555. XSRETURN(argvi);
  1556. fail:
  1557. SWIG_croak_null();
  1558. }
  1559. }
  1560. XS(_wrap_ESLevent_serialized_string_set) {
  1561. {
  1562. ESLevent *arg1 = (ESLevent *) 0 ;
  1563. char *arg2 = (char *) 0 ;
  1564. void *argp1 = 0 ;
  1565. int res1 = 0 ;
  1566. int res2 ;
  1567. char *buf2 = 0 ;
  1568. int alloc2 = 0 ;
  1569. int argvi = 0;
  1570. dXSARGS;
  1571. if ((items < 2) || (items > 2)) {
  1572. SWIG_croak("Usage: ESLevent_serialized_string_set(self,serialized_string);");
  1573. }
  1574. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1575. if (!SWIG_IsOK(res1)) {
  1576. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_set" "', argument " "1"" of type '" "ESLevent *""'");
  1577. }
  1578. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1579. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1580. if (!SWIG_IsOK(res2)) {
  1581. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialized_string_set" "', argument " "2"" of type '" "char *""'");
  1582. }
  1583. arg2 = reinterpret_cast< char * >(buf2);
  1584. if (arg1->serialized_string) delete[] arg1->serialized_string;
  1585. if (arg2) {
  1586. size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
  1587. arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
  1588. } else {
  1589. arg1->serialized_string = 0;
  1590. }
  1591. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1592. XSRETURN(argvi);
  1593. fail:
  1594. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1595. SWIG_croak_null();
  1596. }
  1597. }
  1598. XS(_wrap_ESLevent_serialized_string_get) {
  1599. {
  1600. ESLevent *arg1 = (ESLevent *) 0 ;
  1601. char *result = 0 ;
  1602. void *argp1 = 0 ;
  1603. int res1 = 0 ;
  1604. int argvi = 0;
  1605. dXSARGS;
  1606. if ((items < 1) || (items > 1)) {
  1607. SWIG_croak("Usage: ESLevent_serialized_string_get(self);");
  1608. }
  1609. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1610. if (!SWIG_IsOK(res1)) {
  1611. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialized_string_get" "', argument " "1"" of type '" "ESLevent *""'");
  1612. }
  1613. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1614. result = (char *) ((arg1)->serialized_string);
  1615. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  1616. XSRETURN(argvi);
  1617. fail:
  1618. SWIG_croak_null();
  1619. }
  1620. }
  1621. XS(_wrap_ESLevent_mine_set) {
  1622. {
  1623. ESLevent *arg1 = (ESLevent *) 0 ;
  1624. int arg2 ;
  1625. void *argp1 = 0 ;
  1626. int res1 = 0 ;
  1627. int val2 ;
  1628. int ecode2 = 0 ;
  1629. int argvi = 0;
  1630. dXSARGS;
  1631. if ((items < 2) || (items > 2)) {
  1632. SWIG_croak("Usage: ESLevent_mine_set(self,mine);");
  1633. }
  1634. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1635. if (!SWIG_IsOK(res1)) {
  1636. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_set" "', argument " "1"" of type '" "ESLevent *""'");
  1637. }
  1638. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1639. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  1640. if (!SWIG_IsOK(ecode2)) {
  1641. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLevent_mine_set" "', argument " "2"" of type '" "int""'");
  1642. }
  1643. arg2 = static_cast< int >(val2);
  1644. if (arg1) (arg1)->mine = arg2;
  1645. XSRETURN(argvi);
  1646. fail:
  1647. SWIG_croak_null();
  1648. }
  1649. }
  1650. XS(_wrap_ESLevent_mine_get) {
  1651. {
  1652. ESLevent *arg1 = (ESLevent *) 0 ;
  1653. int result;
  1654. void *argp1 = 0 ;
  1655. int res1 = 0 ;
  1656. int argvi = 0;
  1657. dXSARGS;
  1658. if ((items < 1) || (items > 1)) {
  1659. SWIG_croak("Usage: ESLevent_mine_get(self);");
  1660. }
  1661. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1662. if (!SWIG_IsOK(res1)) {
  1663. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_mine_get" "', argument " "1"" of type '" "ESLevent *""'");
  1664. }
  1665. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1666. result = (int) ((arg1)->mine);
  1667. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  1668. XSRETURN(argvi);
  1669. fail:
  1670. SWIG_croak_null();
  1671. }
  1672. }
  1673. XS(_wrap_new_ESLevent__SWIG_0) {
  1674. {
  1675. char *arg1 = (char *) 0 ;
  1676. char *arg2 = (char *) NULL ;
  1677. ESLevent *result = 0 ;
  1678. int res1 ;
  1679. char *buf1 = 0 ;
  1680. int alloc1 = 0 ;
  1681. int res2 ;
  1682. char *buf2 = 0 ;
  1683. int alloc2 = 0 ;
  1684. int argvi = 0;
  1685. dXSARGS;
  1686. if ((items < 1) || (items > 2)) {
  1687. SWIG_croak("Usage: new_ESLevent(type,subclass_name);");
  1688. }
  1689. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  1690. if (!SWIG_IsOK(res1)) {
  1691. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "char const *""'");
  1692. }
  1693. arg1 = reinterpret_cast< char * >(buf1);
  1694. if (items > 1) {
  1695. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1696. if (!SWIG_IsOK(res2)) {
  1697. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "char const *""'");
  1698. }
  1699. arg2 = reinterpret_cast< char * >(buf2);
  1700. }
  1701. result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);
  1702. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1703. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  1704. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1705. XSRETURN(argvi);
  1706. fail:
  1707. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  1708. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1709. SWIG_croak_null();
  1710. }
  1711. }
  1712. XS(_wrap_new_ESLevent__SWIG_1) {
  1713. {
  1714. esl_event_t *arg1 = (esl_event_t *) 0 ;
  1715. int arg2 = (int) 0 ;
  1716. ESLevent *result = 0 ;
  1717. void *argp1 = 0 ;
  1718. int res1 = 0 ;
  1719. int val2 ;
  1720. int ecode2 = 0 ;
  1721. int argvi = 0;
  1722. dXSARGS;
  1723. if ((items < 1) || (items > 2)) {
  1724. SWIG_croak("Usage: new_ESLevent(wrap_me,free_me);");
  1725. }
  1726. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_esl_event_t, 0 | 0 );
  1727. if (!SWIG_IsOK(res1)) {
  1728. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "esl_event_t *""'");
  1729. }
  1730. arg1 = reinterpret_cast< esl_event_t * >(argp1);
  1731. if (items > 1) {
  1732. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  1733. if (!SWIG_IsOK(ecode2)) {
  1734. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "int""'");
  1735. }
  1736. arg2 = static_cast< int >(val2);
  1737. }
  1738. result = (ESLevent *)new ESLevent(arg1,arg2);
  1739. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1740. XSRETURN(argvi);
  1741. fail:
  1742. SWIG_croak_null();
  1743. }
  1744. }
  1745. XS(_wrap_new_ESLevent__SWIG_2) {
  1746. {
  1747. ESLevent *arg1 = (ESLevent *) 0 ;
  1748. ESLevent *result = 0 ;
  1749. void *argp1 = 0 ;
  1750. int res1 = 0 ;
  1751. int argvi = 0;
  1752. dXSARGS;
  1753. if ((items < 1) || (items > 1)) {
  1754. SWIG_croak("Usage: new_ESLevent(me);");
  1755. }
  1756. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1757. if (!SWIG_IsOK(res1)) {
  1758. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  1759. }
  1760. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1761. result = (ESLevent *)new ESLevent(arg1);
  1762. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  1763. XSRETURN(argvi);
  1764. fail:
  1765. SWIG_croak_null();
  1766. }
  1767. }
  1768. XS(_wrap_new_ESLevent) {
  1769. dXSARGS;
  1770. {
  1771. unsigned long _index = 0;
  1772. SWIG_TypeRank _rank = 0;
  1773. if ((items >= 1) && (items <= 2)) {
  1774. SWIG_TypeRank _ranki = 0;
  1775. SWIG_TypeRank _rankm = 0;
  1776. SWIG_TypeRank _pi = 1;
  1777. int _v = 0;
  1778. {
  1779. void *vptr = 0;
  1780. int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_esl_event_t, 0);
  1781. _v = SWIG_CheckState(res);
  1782. }
  1783. if (!_v) goto check_1;
  1784. _ranki += _v*_pi;
  1785. _rankm += _pi;
  1786. _pi *= SWIG_MAXCASTRANK;
  1787. if (items > 1) {
  1788. {
  1789. {
  1790. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
  1791. _v = SWIG_CheckState(res);
  1792. }
  1793. }
  1794. if (!_v) goto check_1;
  1795. _ranki += _v*_pi;
  1796. _rankm += _pi;
  1797. _pi *= SWIG_MAXCASTRANK;
  1798. }
  1799. if (!_index || (_ranki < _rank)) {
  1800. _rank = _ranki; _index = 1;
  1801. if (_rank == _rankm) goto dispatch;
  1802. }
  1803. }
  1804. check_1:
  1805. if (items == 1) {
  1806. SWIG_TypeRank _ranki = 0;
  1807. SWIG_TypeRank _rankm = 0;
  1808. SWIG_TypeRank _pi = 1;
  1809. int _v = 0;
  1810. {
  1811. void *vptr = 0;
  1812. int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_ESLevent, 0);
  1813. _v = SWIG_CheckState(res);
  1814. }
  1815. if (!_v) goto check_2;
  1816. _ranki += _v*_pi;
  1817. _rankm += _pi;
  1818. _pi *= SWIG_MAXCASTRANK;
  1819. if (!_index || (_ranki < _rank)) {
  1820. _rank = _ranki; _index = 2;
  1821. if (_rank == _rankm) goto dispatch;
  1822. }
  1823. }
  1824. check_2:
  1825. if ((items >= 1) && (items <= 2)) {
  1826. SWIG_TypeRank _ranki = 0;
  1827. SWIG_TypeRank _rankm = 0;
  1828. SWIG_TypeRank _pi = 1;
  1829. int _v = 0;
  1830. {
  1831. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  1832. _v = SWIG_CheckState(res);
  1833. }
  1834. if (!_v) goto check_3;
  1835. _ranki += _v*_pi;
  1836. _rankm += _pi;
  1837. _pi *= SWIG_MAXCASTRANK;
  1838. if (items > 1) {
  1839. {
  1840. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  1841. _v = SWIG_CheckState(res);
  1842. }
  1843. if (!_v) goto check_3;
  1844. _ranki += _v*_pi;
  1845. _rankm += _pi;
  1846. _pi *= SWIG_MAXCASTRANK;
  1847. }
  1848. if (!_index || (_ranki < _rank)) {
  1849. _rank = _ranki; _index = 3;
  1850. if (_rank == _rankm) goto dispatch;
  1851. }
  1852. }
  1853. check_3:
  1854. dispatch:
  1855. switch(_index) {
  1856. case 1:
  1857. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_1); return;
  1858. case 2:
  1859. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_2); return;
  1860. case 3:
  1861. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_0); return;
  1862. }
  1863. }
  1864. croak("No matching function for overloaded 'new_ESLevent'");
  1865. XSRETURN(0);
  1866. }
  1867. XS(_wrap_delete_ESLevent) {
  1868. {
  1869. ESLevent *arg1 = (ESLevent *) 0 ;
  1870. void *argp1 = 0 ;
  1871. int res1 = 0 ;
  1872. int argvi = 0;
  1873. dXSARGS;
  1874. if ((items < 1) || (items > 1)) {
  1875. SWIG_croak("Usage: delete_ESLevent(self);");
  1876. }
  1877. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, SWIG_POINTER_DISOWN | 0 );
  1878. if (!SWIG_IsOK(res1)) {
  1879. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLevent" "', argument " "1"" of type '" "ESLevent *""'");
  1880. }
  1881. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1882. delete arg1;
  1883. XSRETURN(argvi);
  1884. fail:
  1885. SWIG_croak_null();
  1886. }
  1887. }
  1888. XS(_wrap_ESLevent_serialize) {
  1889. {
  1890. ESLevent *arg1 = (ESLevent *) 0 ;
  1891. char *arg2 = (char *) NULL ;
  1892. char *result = 0 ;
  1893. void *argp1 = 0 ;
  1894. int res1 = 0 ;
  1895. int res2 ;
  1896. char *buf2 = 0 ;
  1897. int alloc2 = 0 ;
  1898. int argvi = 0;
  1899. dXSARGS;
  1900. if ((items < 1) || (items > 2)) {
  1901. SWIG_croak("Usage: ESLevent_serialize(self,format);");
  1902. }
  1903. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1904. if (!SWIG_IsOK(res1)) {
  1905. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_serialize" "', argument " "1"" of type '" "ESLevent *""'");
  1906. }
  1907. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1908. if (items > 1) {
  1909. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1910. if (!SWIG_IsOK(res2)) {
  1911. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialize" "', argument " "2"" of type '" "char const *""'");
  1912. }
  1913. arg2 = reinterpret_cast< char * >(buf2);
  1914. }
  1915. result = (char *)(arg1)->serialize((char const *)arg2);
  1916. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  1917. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1918. XSRETURN(argvi);
  1919. fail:
  1920. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  1921. SWIG_croak_null();
  1922. }
  1923. }
  1924. XS(_wrap_ESLevent_setPriority) {
  1925. {
  1926. ESLevent *arg1 = (ESLevent *) 0 ;
  1927. esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
  1928. bool result;
  1929. void *argp1 = 0 ;
  1930. int res1 = 0 ;
  1931. void *argp2 ;
  1932. int res2 = 0 ;
  1933. int argvi = 0;
  1934. dXSARGS;
  1935. if ((items < 1) || (items > 2)) {
  1936. SWIG_croak("Usage: ESLevent_setPriority(self,priority);");
  1937. }
  1938. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1939. if (!SWIG_IsOK(res1)) {
  1940. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_setPriority" "', argument " "1"" of type '" "ESLevent *""'");
  1941. }
  1942. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1943. if (items > 1) {
  1944. {
  1945. res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_esl_priority_t, 0 );
  1946. if (!SWIG_IsOK(res2)) {
  1947. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  1948. }
  1949. if (!argp2) {
  1950. SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESLevent_setPriority" "', argument " "2"" of type '" "esl_priority_t""'");
  1951. } else {
  1952. arg2 = *(reinterpret_cast< esl_priority_t * >(argp2));
  1953. }
  1954. }
  1955. }
  1956. result = (bool)(arg1)->setPriority(arg2);
  1957. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  1958. XSRETURN(argvi);
  1959. fail:
  1960. SWIG_croak_null();
  1961. }
  1962. }
  1963. XS(_wrap_ESLevent_getHeader) {
  1964. {
  1965. ESLevent *arg1 = (ESLevent *) 0 ;
  1966. char *arg2 = (char *) 0 ;
  1967. int arg3 = (int) -1 ;
  1968. char *result = 0 ;
  1969. void *argp1 = 0 ;
  1970. int res1 = 0 ;
  1971. int res2 ;
  1972. char *buf2 = 0 ;
  1973. int alloc2 = 0 ;
  1974. int val3 ;
  1975. int ecode3 = 0 ;
  1976. int argvi = 0;
  1977. dXSARGS;
  1978. if ((items < 2) || (items > 3)) {
  1979. SWIG_croak("Usage: ESLevent_getHeader(self,header_name,idx);");
  1980. }
  1981. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  1982. if (!SWIG_IsOK(res1)) {
  1983. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getHeader" "', argument " "1"" of type '" "ESLevent *""'");
  1984. }
  1985. arg1 = reinterpret_cast< ESLevent * >(argp1);
  1986. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  1987. if (!SWIG_IsOK(res2)) {
  1988. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char const *""'");
  1989. }
  1990. arg2 = reinterpret_cast< char * >(buf2);
  1991. if (items > 2) {
  1992. ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
  1993. if (!SWIG_IsOK(ecode3)) {
  1994. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ESLevent_getHeader" "', argument " "3"" of type '" "int""'");
  1995. }
  1996. arg3 = static_cast< int >(val3);
  1997. }
  1998. result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
  1999. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2000. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2001. XSRETURN(argvi);
  2002. fail:
  2003. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2004. SWIG_croak_null();
  2005. }
  2006. }
  2007. XS(_wrap_ESLevent_getBody) {
  2008. {
  2009. ESLevent *arg1 = (ESLevent *) 0 ;
  2010. char *result = 0 ;
  2011. void *argp1 = 0 ;
  2012. int res1 = 0 ;
  2013. int argvi = 0;
  2014. dXSARGS;
  2015. if ((items < 1) || (items > 1)) {
  2016. SWIG_croak("Usage: ESLevent_getBody(self);");
  2017. }
  2018. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2019. if (!SWIG_IsOK(res1)) {
  2020. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getBody" "', argument " "1"" of type '" "ESLevent *""'");
  2021. }
  2022. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2023. result = (char *)(arg1)->getBody();
  2024. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2025. XSRETURN(argvi);
  2026. fail:
  2027. SWIG_croak_null();
  2028. }
  2029. }
  2030. XS(_wrap_ESLevent_getType) {
  2031. {
  2032. ESLevent *arg1 = (ESLevent *) 0 ;
  2033. char *result = 0 ;
  2034. void *argp1 = 0 ;
  2035. int res1 = 0 ;
  2036. int argvi = 0;
  2037. dXSARGS;
  2038. if ((items < 1) || (items > 1)) {
  2039. SWIG_croak("Usage: ESLevent_getType(self);");
  2040. }
  2041. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2042. if (!SWIG_IsOK(res1)) {
  2043. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_getType" "', argument " "1"" of type '" "ESLevent *""'");
  2044. }
  2045. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2046. result = (char *)(arg1)->getType();
  2047. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2048. XSRETURN(argvi);
  2049. fail:
  2050. SWIG_croak_null();
  2051. }
  2052. }
  2053. XS(_wrap_ESLevent_addBody) {
  2054. {
  2055. ESLevent *arg1 = (ESLevent *) 0 ;
  2056. char *arg2 = (char *) 0 ;
  2057. bool result;
  2058. void *argp1 = 0 ;
  2059. int res1 = 0 ;
  2060. int res2 ;
  2061. char *buf2 = 0 ;
  2062. int alloc2 = 0 ;
  2063. int argvi = 0;
  2064. dXSARGS;
  2065. if ((items < 2) || (items > 2)) {
  2066. SWIG_croak("Usage: ESLevent_addBody(self,value);");
  2067. }
  2068. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2069. if (!SWIG_IsOK(res1)) {
  2070. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addBody" "', argument " "1"" of type '" "ESLevent *""'");
  2071. }
  2072. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2073. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2074. if (!SWIG_IsOK(res2)) {
  2075. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addBody" "', argument " "2"" of type '" "char const *""'");
  2076. }
  2077. arg2 = reinterpret_cast< char * >(buf2);
  2078. result = (bool)(arg1)->addBody((char const *)arg2);
  2079. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2080. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2081. XSRETURN(argvi);
  2082. fail:
  2083. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2084. SWIG_croak_null();
  2085. }
  2086. }
  2087. XS(_wrap_ESLevent_addHeader) {
  2088. {
  2089. ESLevent *arg1 = (ESLevent *) 0 ;
  2090. char *arg2 = (char *) 0 ;
  2091. char *arg3 = (char *) 0 ;
  2092. bool result;
  2093. void *argp1 = 0 ;
  2094. int res1 = 0 ;
  2095. int res2 ;
  2096. char *buf2 = 0 ;
  2097. int alloc2 = 0 ;
  2098. int res3 ;
  2099. char *buf3 = 0 ;
  2100. int alloc3 = 0 ;
  2101. int argvi = 0;
  2102. dXSARGS;
  2103. if ((items < 3) || (items > 3)) {
  2104. SWIG_croak("Usage: ESLevent_addHeader(self,header_name,value);");
  2105. }
  2106. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2107. if (!SWIG_IsOK(res1)) {
  2108. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_addHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2109. }
  2110. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2111. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2112. if (!SWIG_IsOK(res2)) {
  2113. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addHeader" "', argument " "2"" of type '" "char const *""'");
  2114. }
  2115. arg2 = reinterpret_cast< char * >(buf2);
  2116. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2117. if (!SWIG_IsOK(res3)) {
  2118. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_addHeader" "', argument " "3"" of type '" "char const *""'");
  2119. }
  2120. arg3 = reinterpret_cast< char * >(buf3);
  2121. result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
  2122. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2123. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2124. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2125. XSRETURN(argvi);
  2126. fail:
  2127. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2128. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2129. SWIG_croak_null();
  2130. }
  2131. }
  2132. XS(_wrap_ESLevent_pushHeader) {
  2133. {
  2134. ESLevent *arg1 = (ESLevent *) 0 ;
  2135. char *arg2 = (char *) 0 ;
  2136. char *arg3 = (char *) 0 ;
  2137. bool result;
  2138. void *argp1 = 0 ;
  2139. int res1 = 0 ;
  2140. int res2 ;
  2141. char *buf2 = 0 ;
  2142. int alloc2 = 0 ;
  2143. int res3 ;
  2144. char *buf3 = 0 ;
  2145. int alloc3 = 0 ;
  2146. int argvi = 0;
  2147. dXSARGS;
  2148. if ((items < 3) || (items > 3)) {
  2149. SWIG_croak("Usage: ESLevent_pushHeader(self,header_name,value);");
  2150. }
  2151. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2152. if (!SWIG_IsOK(res1)) {
  2153. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_pushHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2154. }
  2155. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2156. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2157. if (!SWIG_IsOK(res2)) {
  2158. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_pushHeader" "', argument " "2"" of type '" "char const *""'");
  2159. }
  2160. arg2 = reinterpret_cast< char * >(buf2);
  2161. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2162. if (!SWIG_IsOK(res3)) {
  2163. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_pushHeader" "', argument " "3"" of type '" "char const *""'");
  2164. }
  2165. arg3 = reinterpret_cast< char * >(buf3);
  2166. result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
  2167. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2168. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2169. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2170. XSRETURN(argvi);
  2171. fail:
  2172. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2173. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2174. SWIG_croak_null();
  2175. }
  2176. }
  2177. XS(_wrap_ESLevent_unshiftHeader) {
  2178. {
  2179. ESLevent *arg1 = (ESLevent *) 0 ;
  2180. char *arg2 = (char *) 0 ;
  2181. char *arg3 = (char *) 0 ;
  2182. bool result;
  2183. void *argp1 = 0 ;
  2184. int res1 = 0 ;
  2185. int res2 ;
  2186. char *buf2 = 0 ;
  2187. int alloc2 = 0 ;
  2188. int res3 ;
  2189. char *buf3 = 0 ;
  2190. int alloc3 = 0 ;
  2191. int argvi = 0;
  2192. dXSARGS;
  2193. if ((items < 3) || (items > 3)) {
  2194. SWIG_croak("Usage: ESLevent_unshiftHeader(self,header_name,value);");
  2195. }
  2196. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2197. if (!SWIG_IsOK(res1)) {
  2198. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_unshiftHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2199. }
  2200. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2201. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2202. if (!SWIG_IsOK(res2)) {
  2203. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_unshiftHeader" "', argument " "2"" of type '" "char const *""'");
  2204. }
  2205. arg2 = reinterpret_cast< char * >(buf2);
  2206. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2207. if (!SWIG_IsOK(res3)) {
  2208. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_unshiftHeader" "', argument " "3"" of type '" "char const *""'");
  2209. }
  2210. arg3 = reinterpret_cast< char * >(buf3);
  2211. result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
  2212. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2213. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2214. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2215. XSRETURN(argvi);
  2216. fail:
  2217. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2218. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2219. SWIG_croak_null();
  2220. }
  2221. }
  2222. XS(_wrap_ESLevent_delHeader) {
  2223. {
  2224. ESLevent *arg1 = (ESLevent *) 0 ;
  2225. char *arg2 = (char *) 0 ;
  2226. bool result;
  2227. void *argp1 = 0 ;
  2228. int res1 = 0 ;
  2229. int res2 ;
  2230. char *buf2 = 0 ;
  2231. int alloc2 = 0 ;
  2232. int argvi = 0;
  2233. dXSARGS;
  2234. if ((items < 2) || (items > 2)) {
  2235. SWIG_croak("Usage: ESLevent_delHeader(self,header_name);");
  2236. }
  2237. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2238. if (!SWIG_IsOK(res1)) {
  2239. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_delHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2240. }
  2241. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2242. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2243. if (!SWIG_IsOK(res2)) {
  2244. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_delHeader" "', argument " "2"" of type '" "char const *""'");
  2245. }
  2246. arg2 = reinterpret_cast< char * >(buf2);
  2247. result = (bool)(arg1)->delHeader((char const *)arg2);
  2248. ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
  2249. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2250. XSRETURN(argvi);
  2251. fail:
  2252. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2253. SWIG_croak_null();
  2254. }
  2255. }
  2256. XS(_wrap_ESLevent_firstHeader) {
  2257. {
  2258. ESLevent *arg1 = (ESLevent *) 0 ;
  2259. char *result = 0 ;
  2260. void *argp1 = 0 ;
  2261. int res1 = 0 ;
  2262. int argvi = 0;
  2263. dXSARGS;
  2264. if ((items < 1) || (items > 1)) {
  2265. SWIG_croak("Usage: ESLevent_firstHeader(self);");
  2266. }
  2267. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2268. if (!SWIG_IsOK(res1)) {
  2269. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_firstHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2270. }
  2271. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2272. result = (char *)(arg1)->firstHeader();
  2273. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2274. XSRETURN(argvi);
  2275. fail:
  2276. SWIG_croak_null();
  2277. }
  2278. }
  2279. XS(_wrap_ESLevent_nextHeader) {
  2280. {
  2281. ESLevent *arg1 = (ESLevent *) 0 ;
  2282. char *result = 0 ;
  2283. void *argp1 = 0 ;
  2284. int res1 = 0 ;
  2285. int argvi = 0;
  2286. dXSARGS;
  2287. if ((items < 1) || (items > 1)) {
  2288. SWIG_croak("Usage: ESLevent_nextHeader(self);");
  2289. }
  2290. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLevent, 0 | 0 );
  2291. if (!SWIG_IsOK(res1)) {
  2292. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLevent_nextHeader" "', argument " "1"" of type '" "ESLevent *""'");
  2293. }
  2294. arg1 = reinterpret_cast< ESLevent * >(argp1);
  2295. result = (char *)(arg1)->nextHeader();
  2296. ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
  2297. XSRETURN(argvi);
  2298. fail:
  2299. SWIG_croak_null();
  2300. }
  2301. }
  2302. XS(_wrap_new_ESLconnection__SWIG_0) {
  2303. {
  2304. char *arg1 = (char *) 0 ;
  2305. char *arg2 = (char *) 0 ;
  2306. char *arg3 = (char *) 0 ;
  2307. char *arg4 = (char *) 0 ;
  2308. ESLconnection *result = 0 ;
  2309. int res1 ;
  2310. char *buf1 = 0 ;
  2311. int alloc1 = 0 ;
  2312. int res2 ;
  2313. char *buf2 = 0 ;
  2314. int alloc2 = 0 ;
  2315. int res3 ;
  2316. char *buf3 = 0 ;
  2317. int alloc3 = 0 ;
  2318. int res4 ;
  2319. char *buf4 = 0 ;
  2320. int alloc4 = 0 ;
  2321. int argvi = 0;
  2322. dXSARGS;
  2323. if ((items < 4) || (items > 4)) {
  2324. SWIG_croak("Usage: new_ESLconnection(host,port,user,password);");
  2325. }
  2326. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2327. if (!SWIG_IsOK(res1)) {
  2328. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2329. }
  2330. arg1 = reinterpret_cast< char * >(buf1);
  2331. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2332. if (!SWIG_IsOK(res2)) {
  2333. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  2334. }
  2335. arg2 = reinterpret_cast< char * >(buf2);
  2336. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2337. if (!SWIG_IsOK(res3)) {
  2338. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2339. }
  2340. arg3 = reinterpret_cast< char * >(buf3);
  2341. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  2342. if (!SWIG_IsOK(res4)) {
  2343. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_ESLconnection" "', argument " "4"" of type '" "char const *""'");
  2344. }
  2345. arg4 = reinterpret_cast< char * >(buf4);
  2346. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  2347. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2348. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2349. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2350. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2351. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2352. XSRETURN(argvi);
  2353. fail:
  2354. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2355. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2356. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2357. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2358. SWIG_croak_null();
  2359. }
  2360. }
  2361. XS(_wrap_new_ESLconnection__SWIG_1) {
  2362. {
  2363. char *arg1 = (char *) 0 ;
  2364. char *arg2 = (char *) 0 ;
  2365. char *arg3 = (char *) 0 ;
  2366. ESLconnection *result = 0 ;
  2367. int res1 ;
  2368. char *buf1 = 0 ;
  2369. int alloc1 = 0 ;
  2370. int res2 ;
  2371. char *buf2 = 0 ;
  2372. int alloc2 = 0 ;
  2373. int res3 ;
  2374. char *buf3 = 0 ;
  2375. int alloc3 = 0 ;
  2376. int argvi = 0;
  2377. dXSARGS;
  2378. if ((items < 3) || (items > 3)) {
  2379. SWIG_croak("Usage: new_ESLconnection(host,port,password);");
  2380. }
  2381. res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
  2382. if (!SWIG_IsOK(res1)) {
  2383. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'");
  2384. }
  2385. arg1 = reinterpret_cast< char * >(buf1);
  2386. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2387. if (!SWIG_IsOK(res2)) {
  2388. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'");
  2389. }
  2390. arg2 = reinterpret_cast< char * >(buf2);
  2391. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2392. if (!SWIG_IsOK(res3)) {
  2393. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'");
  2394. }
  2395. arg3 = reinterpret_cast< char * >(buf3);
  2396. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
  2397. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2398. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2399. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2400. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2401. XSRETURN(argvi);
  2402. fail:
  2403. if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  2404. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2405. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2406. SWIG_croak_null();
  2407. }
  2408. }
  2409. XS(_wrap_new_ESLconnection__SWIG_2) {
  2410. {
  2411. int arg1 ;
  2412. ESLconnection *result = 0 ;
  2413. int val1 ;
  2414. int ecode1 = 0 ;
  2415. int argvi = 0;
  2416. dXSARGS;
  2417. if ((items < 1) || (items > 1)) {
  2418. SWIG_croak("Usage: new_ESLconnection(socket);");
  2419. }
  2420. ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
  2421. if (!SWIG_IsOK(ecode1)) {
  2422. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "int""'");
  2423. }
  2424. arg1 = static_cast< int >(val1);
  2425. result = (ESLconnection *)new ESLconnection(arg1);
  2426. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2427. XSRETURN(argvi);
  2428. fail:
  2429. SWIG_croak_null();
  2430. }
  2431. }
  2432. XS(_wrap_new_ESLconnection) {
  2433. dXSARGS;
  2434. {
  2435. unsigned long _index = 0;
  2436. SWIG_TypeRank _rank = 0;
  2437. if (items == 1) {
  2438. SWIG_TypeRank _ranki = 0;
  2439. SWIG_TypeRank _rankm = 0;
  2440. SWIG_TypeRank _pi = 1;
  2441. int _v = 0;
  2442. {
  2443. {
  2444. int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
  2445. _v = SWIG_CheckState(res);
  2446. }
  2447. }
  2448. if (!_v) goto check_1;
  2449. _ranki += _v*_pi;
  2450. _rankm += _pi;
  2451. _pi *= SWIG_MAXCASTRANK;
  2452. if (!_index || (_ranki < _rank)) {
  2453. _rank = _ranki; _index = 1;
  2454. if (_rank == _rankm) goto dispatch;
  2455. }
  2456. }
  2457. check_1:
  2458. if (items == 3) {
  2459. SWIG_TypeRank _ranki = 0;
  2460. SWIG_TypeRank _rankm = 0;
  2461. SWIG_TypeRank _pi = 1;
  2462. int _v = 0;
  2463. {
  2464. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2465. _v = SWIG_CheckState(res);
  2466. }
  2467. if (!_v) goto check_2;
  2468. _ranki += _v*_pi;
  2469. _rankm += _pi;
  2470. _pi *= SWIG_MAXCASTRANK;
  2471. {
  2472. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  2473. _v = SWIG_CheckState(res);
  2474. }
  2475. if (!_v) goto check_2;
  2476. _ranki += _v*_pi;
  2477. _rankm += _pi;
  2478. _pi *= SWIG_MAXCASTRANK;
  2479. {
  2480. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2481. _v = SWIG_CheckState(res);
  2482. }
  2483. if (!_v) goto check_2;
  2484. _ranki += _v*_pi;
  2485. _rankm += _pi;
  2486. _pi *= SWIG_MAXCASTRANK;
  2487. if (!_index || (_ranki < _rank)) {
  2488. _rank = _ranki; _index = 2;
  2489. if (_rank == _rankm) goto dispatch;
  2490. }
  2491. }
  2492. check_2:
  2493. if (items == 4) {
  2494. SWIG_TypeRank _ranki = 0;
  2495. SWIG_TypeRank _rankm = 0;
  2496. SWIG_TypeRank _pi = 1;
  2497. int _v = 0;
  2498. {
  2499. int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0);
  2500. _v = SWIG_CheckState(res);
  2501. }
  2502. if (!_v) goto check_3;
  2503. _ranki += _v*_pi;
  2504. _rankm += _pi;
  2505. _pi *= SWIG_MAXCASTRANK;
  2506. {
  2507. int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
  2508. _v = SWIG_CheckState(res);
  2509. }
  2510. if (!_v) goto check_3;
  2511. _ranki += _v*_pi;
  2512. _rankm += _pi;
  2513. _pi *= SWIG_MAXCASTRANK;
  2514. {
  2515. int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
  2516. _v = SWIG_CheckState(res);
  2517. }
  2518. if (!_v) goto check_3;
  2519. _ranki += _v*_pi;
  2520. _rankm += _pi;
  2521. _pi *= SWIG_MAXCASTRANK;
  2522. {
  2523. int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0);
  2524. _v = SWIG_CheckState(res);
  2525. }
  2526. if (!_v) goto check_3;
  2527. _ranki += _v*_pi;
  2528. _rankm += _pi;
  2529. _pi *= SWIG_MAXCASTRANK;
  2530. if (!_index || (_ranki < _rank)) {
  2531. _rank = _ranki; _index = 3;
  2532. if (_rank == _rankm) goto dispatch;
  2533. }
  2534. }
  2535. check_3:
  2536. dispatch:
  2537. switch(_index) {
  2538. case 1:
  2539. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return;
  2540. case 2:
  2541. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return;
  2542. case 3:
  2543. ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return;
  2544. }
  2545. }
  2546. croak("No matching function for overloaded 'new_ESLconnection'");
  2547. XSRETURN(0);
  2548. }
  2549. XS(_wrap_delete_ESLconnection) {
  2550. {
  2551. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2552. void *argp1 = 0 ;
  2553. int res1 = 0 ;
  2554. int argvi = 0;
  2555. dXSARGS;
  2556. if ((items < 1) || (items > 1)) {
  2557. SWIG_croak("Usage: delete_ESLconnection(self);");
  2558. }
  2559. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, SWIG_POINTER_DISOWN | 0 );
  2560. if (!SWIG_IsOK(res1)) {
  2561. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESLconnection" "', argument " "1"" of type '" "ESLconnection *""'");
  2562. }
  2563. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2564. delete arg1;
  2565. XSRETURN(argvi);
  2566. fail:
  2567. SWIG_croak_null();
  2568. }
  2569. }
  2570. XS(_wrap_ESLconnection_socketDescriptor) {
  2571. {
  2572. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2573. int result;
  2574. void *argp1 = 0 ;
  2575. int res1 = 0 ;
  2576. int argvi = 0;
  2577. dXSARGS;
  2578. if ((items < 1) || (items > 1)) {
  2579. SWIG_croak("Usage: ESLconnection_socketDescriptor(self);");
  2580. }
  2581. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2582. if (!SWIG_IsOK(res1)) {
  2583. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_socketDescriptor" "', argument " "1"" of type '" "ESLconnection *""'");
  2584. }
  2585. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2586. result = (int)(arg1)->socketDescriptor();
  2587. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2588. XSRETURN(argvi);
  2589. fail:
  2590. SWIG_croak_null();
  2591. }
  2592. }
  2593. XS(_wrap_ESLconnection_connected) {
  2594. {
  2595. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2596. int result;
  2597. void *argp1 = 0 ;
  2598. int res1 = 0 ;
  2599. int argvi = 0;
  2600. dXSARGS;
  2601. if ((items < 1) || (items > 1)) {
  2602. SWIG_croak("Usage: ESLconnection_connected(self);");
  2603. }
  2604. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2605. if (!SWIG_IsOK(res1)) {
  2606. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_connected" "', argument " "1"" of type '" "ESLconnection *""'");
  2607. }
  2608. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2609. result = (int)(arg1)->connected();
  2610. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2611. XSRETURN(argvi);
  2612. fail:
  2613. SWIG_croak_null();
  2614. }
  2615. }
  2616. XS(_wrap_ESLconnection_getInfo) {
  2617. {
  2618. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2619. ESLevent *result = 0 ;
  2620. void *argp1 = 0 ;
  2621. int res1 = 0 ;
  2622. int argvi = 0;
  2623. dXSARGS;
  2624. if ((items < 1) || (items > 1)) {
  2625. SWIG_croak("Usage: ESLconnection_getInfo(self);");
  2626. }
  2627. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2628. if (!SWIG_IsOK(res1)) {
  2629. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_getInfo" "', argument " "1"" of type '" "ESLconnection *""'");
  2630. }
  2631. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2632. result = (ESLevent *)(arg1)->getInfo();
  2633. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2634. XSRETURN(argvi);
  2635. fail:
  2636. SWIG_croak_null();
  2637. }
  2638. }
  2639. XS(_wrap_ESLconnection_send) {
  2640. {
  2641. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2642. char *arg2 = (char *) 0 ;
  2643. int result;
  2644. void *argp1 = 0 ;
  2645. int res1 = 0 ;
  2646. int res2 ;
  2647. char *buf2 = 0 ;
  2648. int alloc2 = 0 ;
  2649. int argvi = 0;
  2650. dXSARGS;
  2651. if ((items < 2) || (items > 2)) {
  2652. SWIG_croak("Usage: ESLconnection_send(self,cmd);");
  2653. }
  2654. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2655. if (!SWIG_IsOK(res1)) {
  2656. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_send" "', argument " "1"" of type '" "ESLconnection *""'");
  2657. }
  2658. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2659. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2660. if (!SWIG_IsOK(res2)) {
  2661. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_send" "', argument " "2"" of type '" "char const *""'");
  2662. }
  2663. arg2 = reinterpret_cast< char * >(buf2);
  2664. result = (int)(arg1)->send((char const *)arg2);
  2665. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2666. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2667. XSRETURN(argvi);
  2668. fail:
  2669. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2670. SWIG_croak_null();
  2671. }
  2672. }
  2673. XS(_wrap_ESLconnection_sendRecv) {
  2674. {
  2675. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2676. char *arg2 = (char *) 0 ;
  2677. ESLevent *result = 0 ;
  2678. void *argp1 = 0 ;
  2679. int res1 = 0 ;
  2680. int res2 ;
  2681. char *buf2 = 0 ;
  2682. int alloc2 = 0 ;
  2683. int argvi = 0;
  2684. dXSARGS;
  2685. if ((items < 2) || (items > 2)) {
  2686. SWIG_croak("Usage: ESLconnection_sendRecv(self,cmd);");
  2687. }
  2688. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2689. if (!SWIG_IsOK(res1)) {
  2690. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendRecv" "', argument " "1"" of type '" "ESLconnection *""'");
  2691. }
  2692. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2693. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2694. if (!SWIG_IsOK(res2)) {
  2695. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendRecv" "', argument " "2"" of type '" "char const *""'");
  2696. }
  2697. arg2 = reinterpret_cast< char * >(buf2);
  2698. result = (ESLevent *)(arg1)->sendRecv((char const *)arg2);
  2699. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2700. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2701. XSRETURN(argvi);
  2702. fail:
  2703. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2704. SWIG_croak_null();
  2705. }
  2706. }
  2707. XS(_wrap_ESLconnection_api) {
  2708. {
  2709. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2710. char *arg2 = (char *) 0 ;
  2711. char *arg3 = (char *) NULL ;
  2712. ESLevent *result = 0 ;
  2713. void *argp1 = 0 ;
  2714. int res1 = 0 ;
  2715. int res2 ;
  2716. char *buf2 = 0 ;
  2717. int alloc2 = 0 ;
  2718. int res3 ;
  2719. char *buf3 = 0 ;
  2720. int alloc3 = 0 ;
  2721. int argvi = 0;
  2722. dXSARGS;
  2723. if ((items < 2) || (items > 3)) {
  2724. SWIG_croak("Usage: ESLconnection_api(self,cmd,arg);");
  2725. }
  2726. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2727. if (!SWIG_IsOK(res1)) {
  2728. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_api" "', argument " "1"" of type '" "ESLconnection *""'");
  2729. }
  2730. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2731. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2732. if (!SWIG_IsOK(res2)) {
  2733. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_api" "', argument " "2"" of type '" "char const *""'");
  2734. }
  2735. arg2 = reinterpret_cast< char * >(buf2);
  2736. if (items > 2) {
  2737. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2738. if (!SWIG_IsOK(res3)) {
  2739. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_api" "', argument " "3"" of type '" "char const *""'");
  2740. }
  2741. arg3 = reinterpret_cast< char * >(buf3);
  2742. }
  2743. result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
  2744. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2745. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2746. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2747. XSRETURN(argvi);
  2748. fail:
  2749. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2750. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2751. SWIG_croak_null();
  2752. }
  2753. }
  2754. XS(_wrap_ESLconnection_bgapi) {
  2755. {
  2756. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2757. char *arg2 = (char *) 0 ;
  2758. char *arg3 = (char *) NULL ;
  2759. char *arg4 = (char *) NULL ;
  2760. ESLevent *result = 0 ;
  2761. void *argp1 = 0 ;
  2762. int res1 = 0 ;
  2763. int res2 ;
  2764. char *buf2 = 0 ;
  2765. int alloc2 = 0 ;
  2766. int res3 ;
  2767. char *buf3 = 0 ;
  2768. int alloc3 = 0 ;
  2769. int res4 ;
  2770. char *buf4 = 0 ;
  2771. int alloc4 = 0 ;
  2772. int argvi = 0;
  2773. dXSARGS;
  2774. if ((items < 2) || (items > 4)) {
  2775. SWIG_croak("Usage: ESLconnection_bgapi(self,cmd,arg,job_uuid);");
  2776. }
  2777. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2778. if (!SWIG_IsOK(res1)) {
  2779. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_bgapi" "', argument " "1"" of type '" "ESLconnection *""'");
  2780. }
  2781. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2782. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2783. if (!SWIG_IsOK(res2)) {
  2784. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_bgapi" "', argument " "2"" of type '" "char const *""'");
  2785. }
  2786. arg2 = reinterpret_cast< char * >(buf2);
  2787. if (items > 2) {
  2788. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2789. if (!SWIG_IsOK(res3)) {
  2790. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_bgapi" "', argument " "3"" of type '" "char const *""'");
  2791. }
  2792. arg3 = reinterpret_cast< char * >(buf3);
  2793. }
  2794. if (items > 3) {
  2795. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  2796. if (!SWIG_IsOK(res4)) {
  2797. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_bgapi" "', argument " "4"" of type '" "char const *""'");
  2798. }
  2799. arg4 = reinterpret_cast< char * >(buf4);
  2800. }
  2801. result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
  2802. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2803. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2804. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2805. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2806. XSRETURN(argvi);
  2807. fail:
  2808. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2809. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2810. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  2811. SWIG_croak_null();
  2812. }
  2813. }
  2814. XS(_wrap_ESLconnection_sendEvent) {
  2815. {
  2816. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2817. ESLevent *arg2 = (ESLevent *) 0 ;
  2818. ESLevent *result = 0 ;
  2819. void *argp1 = 0 ;
  2820. int res1 = 0 ;
  2821. void *argp2 = 0 ;
  2822. int res2 = 0 ;
  2823. int argvi = 0;
  2824. dXSARGS;
  2825. if ((items < 2) || (items > 2)) {
  2826. SWIG_croak("Usage: ESLconnection_sendEvent(self,send_me);");
  2827. }
  2828. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2829. if (!SWIG_IsOK(res1)) {
  2830. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  2831. }
  2832. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2833. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  2834. if (!SWIG_IsOK(res2)) {
  2835. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendEvent" "', argument " "2"" of type '" "ESLevent *""'");
  2836. }
  2837. arg2 = reinterpret_cast< ESLevent * >(argp2);
  2838. result = (ESLevent *)(arg1)->sendEvent(arg2);
  2839. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2840. XSRETURN(argvi);
  2841. fail:
  2842. SWIG_croak_null();
  2843. }
  2844. }
  2845. XS(_wrap_ESLconnection_sendMSG) {
  2846. {
  2847. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2848. ESLevent *arg2 = (ESLevent *) 0 ;
  2849. char *arg3 = (char *) NULL ;
  2850. int result;
  2851. void *argp1 = 0 ;
  2852. int res1 = 0 ;
  2853. void *argp2 = 0 ;
  2854. int res2 = 0 ;
  2855. int res3 ;
  2856. char *buf3 = 0 ;
  2857. int alloc3 = 0 ;
  2858. int argvi = 0;
  2859. dXSARGS;
  2860. if ((items < 2) || (items > 3)) {
  2861. SWIG_croak("Usage: ESLconnection_sendMSG(self,send_me,uuid);");
  2862. }
  2863. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2864. if (!SWIG_IsOK(res1)) {
  2865. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_sendMSG" "', argument " "1"" of type '" "ESLconnection *""'");
  2866. }
  2867. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2868. res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_ESLevent, 0 | 0 );
  2869. if (!SWIG_IsOK(res2)) {
  2870. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendMSG" "', argument " "2"" of type '" "ESLevent *""'");
  2871. }
  2872. arg2 = reinterpret_cast< ESLevent * >(argp2);
  2873. if (items > 2) {
  2874. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2875. if (!SWIG_IsOK(res3)) {
  2876. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_sendMSG" "', argument " "3"" of type '" "char const *""'");
  2877. }
  2878. arg3 = reinterpret_cast< char * >(buf3);
  2879. }
  2880. result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
  2881. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  2882. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2883. XSRETURN(argvi);
  2884. fail:
  2885. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2886. SWIG_croak_null();
  2887. }
  2888. }
  2889. XS(_wrap_ESLconnection_recvEvent) {
  2890. {
  2891. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2892. ESLevent *result = 0 ;
  2893. void *argp1 = 0 ;
  2894. int res1 = 0 ;
  2895. int argvi = 0;
  2896. dXSARGS;
  2897. if ((items < 1) || (items > 1)) {
  2898. SWIG_croak("Usage: ESLconnection_recvEvent(self);");
  2899. }
  2900. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2901. if (!SWIG_IsOK(res1)) {
  2902. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEvent" "', argument " "1"" of type '" "ESLconnection *""'");
  2903. }
  2904. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2905. result = (ESLevent *)(arg1)->recvEvent();
  2906. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2907. XSRETURN(argvi);
  2908. fail:
  2909. SWIG_croak_null();
  2910. }
  2911. }
  2912. XS(_wrap_ESLconnection_recvEventTimed) {
  2913. {
  2914. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2915. int arg2 ;
  2916. ESLevent *result = 0 ;
  2917. void *argp1 = 0 ;
  2918. int res1 = 0 ;
  2919. int val2 ;
  2920. int ecode2 = 0 ;
  2921. int argvi = 0;
  2922. dXSARGS;
  2923. if ((items < 2) || (items > 2)) {
  2924. SWIG_croak("Usage: ESLconnection_recvEventTimed(self,ms);");
  2925. }
  2926. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2927. if (!SWIG_IsOK(res1)) {
  2928. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_recvEventTimed" "', argument " "1"" of type '" "ESLconnection *""'");
  2929. }
  2930. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2931. ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
  2932. if (!SWIG_IsOK(ecode2)) {
  2933. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESLconnection_recvEventTimed" "', argument " "2"" of type '" "int""'");
  2934. }
  2935. arg2 = static_cast< int >(val2);
  2936. result = (ESLevent *)(arg1)->recvEventTimed(arg2);
  2937. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2938. XSRETURN(argvi);
  2939. fail:
  2940. SWIG_croak_null();
  2941. }
  2942. }
  2943. XS(_wrap_ESLconnection_filter) {
  2944. {
  2945. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2946. char *arg2 = (char *) 0 ;
  2947. char *arg3 = (char *) 0 ;
  2948. ESLevent *result = 0 ;
  2949. void *argp1 = 0 ;
  2950. int res1 = 0 ;
  2951. int res2 ;
  2952. char *buf2 = 0 ;
  2953. int alloc2 = 0 ;
  2954. int res3 ;
  2955. char *buf3 = 0 ;
  2956. int alloc3 = 0 ;
  2957. int argvi = 0;
  2958. dXSARGS;
  2959. if ((items < 3) || (items > 3)) {
  2960. SWIG_croak("Usage: ESLconnection_filter(self,header,value);");
  2961. }
  2962. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  2963. if (!SWIG_IsOK(res1)) {
  2964. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_filter" "', argument " "1"" of type '" "ESLconnection *""'");
  2965. }
  2966. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  2967. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  2968. if (!SWIG_IsOK(res2)) {
  2969. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_filter" "', argument " "2"" of type '" "char const *""'");
  2970. }
  2971. arg2 = reinterpret_cast< char * >(buf2);
  2972. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  2973. if (!SWIG_IsOK(res3)) {
  2974. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_filter" "', argument " "3"" of type '" "char const *""'");
  2975. }
  2976. arg3 = reinterpret_cast< char * >(buf3);
  2977. result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3);
  2978. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  2979. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2980. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2981. XSRETURN(argvi);
  2982. fail:
  2983. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  2984. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  2985. SWIG_croak_null();
  2986. }
  2987. }
  2988. XS(_wrap_ESLconnection_events) {
  2989. {
  2990. ESLconnection *arg1 = (ESLconnection *) 0 ;
  2991. char *arg2 = (char *) 0 ;
  2992. char *arg3 = (char *) 0 ;
  2993. int result;
  2994. void *argp1 = 0 ;
  2995. int res1 = 0 ;
  2996. int res2 ;
  2997. char *buf2 = 0 ;
  2998. int alloc2 = 0 ;
  2999. int res3 ;
  3000. char *buf3 = 0 ;
  3001. int alloc3 = 0 ;
  3002. int argvi = 0;
  3003. dXSARGS;
  3004. if ((items < 3) || (items > 3)) {
  3005. SWIG_croak("Usage: ESLconnection_events(self,etype,value);");
  3006. }
  3007. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3008. if (!SWIG_IsOK(res1)) {
  3009. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_events" "', argument " "1"" of type '" "ESLconnection *""'");
  3010. }
  3011. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3012. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3013. if (!SWIG_IsOK(res2)) {
  3014. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_events" "', argument " "2"" of type '" "char const *""'");
  3015. }
  3016. arg2 = reinterpret_cast< char * >(buf2);
  3017. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3018. if (!SWIG_IsOK(res3)) {
  3019. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_events" "', argument " "3"" of type '" "char const *""'");
  3020. }
  3021. arg3 = reinterpret_cast< char * >(buf3);
  3022. result = (int)(arg1)->events((char const *)arg2,(char const *)arg3);
  3023. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3024. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3025. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3026. XSRETURN(argvi);
  3027. fail:
  3028. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3029. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3030. SWIG_croak_null();
  3031. }
  3032. }
  3033. XS(_wrap_ESLconnection_execute) {
  3034. {
  3035. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3036. char *arg2 = (char *) 0 ;
  3037. char *arg3 = (char *) NULL ;
  3038. char *arg4 = (char *) NULL ;
  3039. ESLevent *result = 0 ;
  3040. void *argp1 = 0 ;
  3041. int res1 = 0 ;
  3042. int res2 ;
  3043. char *buf2 = 0 ;
  3044. int alloc2 = 0 ;
  3045. int res3 ;
  3046. char *buf3 = 0 ;
  3047. int alloc3 = 0 ;
  3048. int res4 ;
  3049. char *buf4 = 0 ;
  3050. int alloc4 = 0 ;
  3051. int argvi = 0;
  3052. dXSARGS;
  3053. if ((items < 2) || (items > 4)) {
  3054. SWIG_croak("Usage: ESLconnection_execute(self,app,arg,uuid);");
  3055. }
  3056. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3057. if (!SWIG_IsOK(res1)) {
  3058. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_execute" "', argument " "1"" of type '" "ESLconnection *""'");
  3059. }
  3060. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3061. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3062. if (!SWIG_IsOK(res2)) {
  3063. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_execute" "', argument " "2"" of type '" "char const *""'");
  3064. }
  3065. arg2 = reinterpret_cast< char * >(buf2);
  3066. if (items > 2) {
  3067. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3068. if (!SWIG_IsOK(res3)) {
  3069. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_execute" "', argument " "3"" of type '" "char const *""'");
  3070. }
  3071. arg3 = reinterpret_cast< char * >(buf3);
  3072. }
  3073. if (items > 3) {
  3074. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  3075. if (!SWIG_IsOK(res4)) {
  3076. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_execute" "', argument " "4"" of type '" "char const *""'");
  3077. }
  3078. arg4 = reinterpret_cast< char * >(buf4);
  3079. }
  3080. result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
  3081. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3082. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3083. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3084. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3085. XSRETURN(argvi);
  3086. fail:
  3087. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3088. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3089. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3090. SWIG_croak_null();
  3091. }
  3092. }
  3093. XS(_wrap_ESLconnection_executeAsync) {
  3094. {
  3095. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3096. char *arg2 = (char *) 0 ;
  3097. char *arg3 = (char *) NULL ;
  3098. char *arg4 = (char *) NULL ;
  3099. ESLevent *result = 0 ;
  3100. void *argp1 = 0 ;
  3101. int res1 = 0 ;
  3102. int res2 ;
  3103. char *buf2 = 0 ;
  3104. int alloc2 = 0 ;
  3105. int res3 ;
  3106. char *buf3 = 0 ;
  3107. int alloc3 = 0 ;
  3108. int res4 ;
  3109. char *buf4 = 0 ;
  3110. int alloc4 = 0 ;
  3111. int argvi = 0;
  3112. dXSARGS;
  3113. if ((items < 2) || (items > 4)) {
  3114. SWIG_croak("Usage: ESLconnection_executeAsync(self,app,arg,uuid);");
  3115. }
  3116. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3117. if (!SWIG_IsOK(res1)) {
  3118. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_executeAsync" "', argument " "1"" of type '" "ESLconnection *""'");
  3119. }
  3120. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3121. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3122. if (!SWIG_IsOK(res2)) {
  3123. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_executeAsync" "', argument " "2"" of type '" "char const *""'");
  3124. }
  3125. arg2 = reinterpret_cast< char * >(buf2);
  3126. if (items > 2) {
  3127. res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
  3128. if (!SWIG_IsOK(res3)) {
  3129. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_executeAsync" "', argument " "3"" of type '" "char const *""'");
  3130. }
  3131. arg3 = reinterpret_cast< char * >(buf3);
  3132. }
  3133. if (items > 3) {
  3134. res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
  3135. if (!SWIG_IsOK(res4)) {
  3136. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_executeAsync" "', argument " "4"" of type '" "char const *""'");
  3137. }
  3138. arg4 = reinterpret_cast< char * >(buf4);
  3139. }
  3140. result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
  3141. ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
  3142. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3143. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3144. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3145. XSRETURN(argvi);
  3146. fail:
  3147. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3148. if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  3149. if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  3150. SWIG_croak_null();
  3151. }
  3152. }
  3153. XS(_wrap_ESLconnection_setAsyncExecute) {
  3154. {
  3155. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3156. char *arg2 = (char *) 0 ;
  3157. int result;
  3158. void *argp1 = 0 ;
  3159. int res1 = 0 ;
  3160. int res2 ;
  3161. char *buf2 = 0 ;
  3162. int alloc2 = 0 ;
  3163. int argvi = 0;
  3164. dXSARGS;
  3165. if ((items < 2) || (items > 2)) {
  3166. SWIG_croak("Usage: ESLconnection_setAsyncExecute(self,val);");
  3167. }
  3168. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3169. if (!SWIG_IsOK(res1)) {
  3170. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setAsyncExecute" "', argument " "1"" of type '" "ESLconnection *""'");
  3171. }
  3172. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3173. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3174. if (!SWIG_IsOK(res2)) {
  3175. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setAsyncExecute" "', argument " "2"" of type '" "char const *""'");
  3176. }
  3177. arg2 = reinterpret_cast< char * >(buf2);
  3178. result = (int)(arg1)->setAsyncExecute((char const *)arg2);
  3179. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3180. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3181. XSRETURN(argvi);
  3182. fail:
  3183. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3184. SWIG_croak_null();
  3185. }
  3186. }
  3187. XS(_wrap_ESLconnection_setEventLock) {
  3188. {
  3189. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3190. char *arg2 = (char *) 0 ;
  3191. int result;
  3192. void *argp1 = 0 ;
  3193. int res1 = 0 ;
  3194. int res2 ;
  3195. char *buf2 = 0 ;
  3196. int alloc2 = 0 ;
  3197. int argvi = 0;
  3198. dXSARGS;
  3199. if ((items < 2) || (items > 2)) {
  3200. SWIG_croak("Usage: ESLconnection_setEventLock(self,val);");
  3201. }
  3202. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3203. if (!SWIG_IsOK(res1)) {
  3204. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_setEventLock" "', argument " "1"" of type '" "ESLconnection *""'");
  3205. }
  3206. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3207. res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
  3208. if (!SWIG_IsOK(res2)) {
  3209. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setEventLock" "', argument " "2"" of type '" "char const *""'");
  3210. }
  3211. arg2 = reinterpret_cast< char * >(buf2);
  3212. result = (int)(arg1)->setEventLock((char const *)arg2);
  3213. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3214. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3215. XSRETURN(argvi);
  3216. fail:
  3217. if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  3218. SWIG_croak_null();
  3219. }
  3220. }
  3221. XS(_wrap_ESLconnection_disconnect) {
  3222. {
  3223. ESLconnection *arg1 = (ESLconnection *) 0 ;
  3224. int result;
  3225. void *argp1 = 0 ;
  3226. int res1 = 0 ;
  3227. int argvi = 0;
  3228. dXSARGS;
  3229. if ((items < 1) || (items > 1)) {
  3230. SWIG_croak("Usage: ESLconnection_disconnect(self);");
  3231. }
  3232. res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 );
  3233. if (!SWIG_IsOK(res1)) {
  3234. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESLconnection_disconnect" "', argument " "1"" of type '" "ESLconnection *""'");
  3235. }
  3236. arg1 = reinterpret_cast< ESLconnection * >(argp1);
  3237. result = (int)(arg1)->disconnect();
  3238. ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
  3239. XSRETURN(argvi);
  3240. fail:
  3241. SWIG_croak_null();
  3242. }
  3243. }
  3244. XS(_wrap_eslSetLogLevel) {
  3245. {
  3246. int arg1 ;
  3247. int val1 ;
  3248. int ecode1 = 0 ;
  3249. int argvi = 0;
  3250. dXSARGS;
  3251. if ((items < 1) || (items > 1)) {
  3252. SWIG_croak("Usage: eslSetLogLevel(level);");
  3253. }
  3254. ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
  3255. if (!SWIG_IsOK(ecode1)) {
  3256. SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "eslSetLogLevel" "', argument " "1"" of type '" "int""'");
  3257. }
  3258. arg1 = static_cast< int >(val1);
  3259. eslSetLogLevel(arg1);
  3260. XSRETURN(argvi);
  3261. fail:
  3262. SWIG_croak_null();
  3263. }
  3264. }
  3265. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  3266. static swig_type_info _swigt__p_ESLconnection = {"_p_ESLconnection", "ESLconnection *", 0, 0, (void*)"ESL::ESLconnection", 0};
  3267. static swig_type_info _swigt__p_ESLevent = {"_p_ESLevent", "ESLevent *", 0, 0, (void*)"ESL::ESLevent", 0};
  3268. static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  3269. static swig_type_info _swigt__p_esl_event_t = {"_p_esl_event_t", "esl_event_t *", 0, 0, (void*)0, 0};
  3270. static swig_type_info _swigt__p_esl_priority_t = {"_p_esl_priority_t", "esl_priority_t *", 0, 0, (void*)0, 0};
  3271. static swig_type_info *swig_type_initial[] = {
  3272. &_swigt__p_ESLconnection,
  3273. &_swigt__p_ESLevent,
  3274. &_swigt__p_char,
  3275. &_swigt__p_esl_event_t,
  3276. &_swigt__p_esl_priority_t,
  3277. };
  3278. static swig_cast_info _swigc__p_ESLconnection[] = { {&_swigt__p_ESLconnection, 0, 0, 0},{0, 0, 0, 0}};
  3279. static swig_cast_info _swigc__p_ESLevent[] = { {&_swigt__p_ESLevent, 0, 0, 0},{0, 0, 0, 0}};
  3280. static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  3281. static swig_cast_info _swigc__p_esl_event_t[] = { {&_swigt__p_esl_event_t, 0, 0, 0},{0, 0, 0, 0}};
  3282. static swig_cast_info _swigc__p_esl_priority_t[] = { {&_swigt__p_esl_priority_t, 0, 0, 0},{0, 0, 0, 0}};
  3283. static swig_cast_info *swig_cast_initial[] = {
  3284. _swigc__p_ESLconnection,
  3285. _swigc__p_ESLevent,
  3286. _swigc__p_char,
  3287. _swigc__p_esl_event_t,
  3288. _swigc__p_esl_priority_t,
  3289. };
  3290. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  3291. static swig_constant_info swig_constants[] = {
  3292. {0,0,0,0,0,0}
  3293. };
  3294. #ifdef __cplusplus
  3295. }
  3296. #endif
  3297. static swig_variable_info swig_variables[] = {
  3298. {0,0,0,0}
  3299. };
  3300. static swig_command_info swig_commands[] = {
  3301. {"ESLc::ESLevent_event_set", _wrap_ESLevent_event_set},
  3302. {"ESLc::ESLevent_event_get", _wrap_ESLevent_event_get},
  3303. {"ESLc::ESLevent_serialized_string_set", _wrap_ESLevent_serialized_string_set},
  3304. {"ESLc::ESLevent_serialized_string_get", _wrap_ESLevent_serialized_string_get},
  3305. {"ESLc::ESLevent_mine_set", _wrap_ESLevent_mine_set},
  3306. {"ESLc::ESLevent_mine_get", _wrap_ESLevent_mine_get},
  3307. {"ESLc::new_ESLevent", _wrap_new_ESLevent},
  3308. {"ESLc::delete_ESLevent", _wrap_delete_ESLevent},
  3309. {"ESLc::ESLevent_serialize", _wrap_ESLevent_serialize},
  3310. {"ESLc::ESLevent_setPriority", _wrap_ESLevent_setPriority},
  3311. {"ESLc::ESLevent_getHeader", _wrap_ESLevent_getHeader},
  3312. {"ESLc::ESLevent_getBody", _wrap_ESLevent_getBody},
  3313. {"ESLc::ESLevent_getType", _wrap_ESLevent_getType},
  3314. {"ESLc::ESLevent_addBody", _wrap_ESLevent_addBody},
  3315. {"ESLc::ESLevent_addHeader", _wrap_ESLevent_addHeader},
  3316. {"ESLc::ESLevent_pushHeader", _wrap_ESLevent_pushHeader},
  3317. {"ESLc::ESLevent_unshiftHeader", _wrap_ESLevent_unshiftHeader},
  3318. {"ESLc::ESLevent_delHeader", _wrap_ESLevent_delHeader},
  3319. {"ESLc::ESLevent_firstHeader", _wrap_ESLevent_firstHeader},
  3320. {"ESLc::ESLevent_nextHeader", _wrap_ESLevent_nextHeader},
  3321. {"ESLc::new_ESLconnection", _wrap_new_ESLconnection},
  3322. {"ESLc::delete_ESLconnection", _wrap_delete_ESLconnection},
  3323. {"ESLc::ESLconnection_socketDescriptor", _wrap_ESLconnection_socketDescriptor},
  3324. {"ESLc::ESLconnection_connected", _wrap_ESLconnection_connected},
  3325. {"ESLc::ESLconnection_getInfo", _wrap_ESLconnection_getInfo},
  3326. {"ESLc::ESLconnection_send", _wrap_ESLconnection_send},
  3327. {"ESLc::ESLconnection_sendRecv", _wrap_ESLconnection_sendRecv},
  3328. {"ESLc::ESLconnection_api", _wrap_ESLconnection_api},
  3329. {"ESLc::ESLconnection_bgapi", _wrap_ESLconnection_bgapi},
  3330. {"ESLc::ESLconnection_sendEvent", _wrap_ESLconnection_sendEvent},
  3331. {"ESLc::ESLconnection_sendMSG", _wrap_ESLconnection_sendMSG},
  3332. {"ESLc::ESLconnection_recvEvent", _wrap_ESLconnection_recvEvent},
  3333. {"ESLc::ESLconnection_recvEventTimed", _wrap_ESLconnection_recvEventTimed},
  3334. {"ESLc::ESLconnection_filter", _wrap_ESLconnection_filter},
  3335. {"ESLc::ESLconnection_events", _wrap_ESLconnection_events},
  3336. {"ESLc::ESLconnection_execute", _wrap_ESLconnection_execute},
  3337. {"ESLc::ESLconnection_executeAsync", _wrap_ESLconnection_executeAsync},
  3338. {"ESLc::ESLconnection_setAsyncExecute", _wrap_ESLconnection_setAsyncExecute},
  3339. {"ESLc::ESLconnection_setEventLock", _wrap_ESLconnection_setEventLock},
  3340. {"ESLc::ESLconnection_disconnect", _wrap_ESLconnection_disconnect},
  3341. {"ESLc::eslSetLogLevel", _wrap_eslSetLogLevel},
  3342. {0,0}
  3343. };
  3344. /* -----------------------------------------------------------------------------
  3345. * Type initialization:
  3346. * This problem is tough by the requirement that no dynamic
  3347. * memory is used. Also, since swig_type_info structures store pointers to
  3348. * swig_cast_info structures and swig_cast_info structures store pointers back
  3349. * to swig_type_info structures, we need some lookup code at initialization.
  3350. * The idea is that swig generates all the structures that are needed.
  3351. * The runtime then collects these partially filled structures.
  3352. * The SWIG_InitializeModule function takes these initial arrays out of
  3353. * swig_module, and does all the lookup, filling in the swig_module.types
  3354. * array with the correct data and linking the correct swig_cast_info
  3355. * structures together.
  3356. *
  3357. * The generated swig_type_info structures are assigned staticly to an initial
  3358. * array. We just loop through that array, and handle each type individually.
  3359. * First we lookup if this type has been already loaded, and if so, use the
  3360. * loaded structure instead of the generated one. Then we have to fill in the
  3361. * cast linked list. The cast data is initially stored in something like a
  3362. * two-dimensional array. Each row corresponds to a type (there are the same
  3363. * number of rows as there are in the swig_type_initial array). Each entry in
  3364. * a column is one of the swig_cast_info structures for that type.
  3365. * The cast_initial array is actually an array of arrays, because each row has
  3366. * a variable number of columns. So to actually build the cast linked list,
  3367. * we find the array of casts associated with the type, and loop through it
  3368. * adding the casts to the list. The one last trick we need to do is making
  3369. * sure the type pointer in the swig_cast_info struct is correct.
  3370. *
  3371. * First off, we lookup the cast->type name to see if it is already loaded.
  3372. * There are three cases to handle:
  3373. * 1) If the cast->type has already been loaded AND the type we are adding
  3374. * casting info to has not been loaded (it is in this module), THEN we
  3375. * replace the cast->type pointer with the type pointer that has already
  3376. * been loaded.
  3377. * 2) If BOTH types (the one we are adding casting info to, and the
  3378. * cast->type) are loaded, THEN the cast info has already been loaded by
  3379. * the previous module so we just ignore it.
  3380. * 3) Finally, if cast->type has not already been loaded, then we add that
  3381. * swig_cast_info to the linked list (because the cast->type) pointer will
  3382. * be correct.
  3383. * ----------------------------------------------------------------------------- */
  3384. #ifdef __cplusplus
  3385. extern "C" {
  3386. #if 0
  3387. } /* c-mode */
  3388. #endif
  3389. #endif
  3390. #if 0
  3391. #define SWIGRUNTIME_DEBUG
  3392. #endif
  3393. SWIGRUNTIME void
  3394. SWIG_InitializeModule(void *clientdata) {
  3395. size_t i;
  3396. swig_module_info *module_head, *iter;
  3397. int found, init;
  3398. clientdata = clientdata;
  3399. /* check to see if the circular list has been setup, if not, set it up */
  3400. if (swig_module.next==0) {
  3401. /* Initialize the swig_module */
  3402. swig_module.type_initial = swig_type_initial;
  3403. swig_module.cast_initial = swig_cast_initial;
  3404. swig_module.next = &swig_module;
  3405. init = 1;
  3406. } else {
  3407. init = 0;
  3408. }
  3409. /* Try and load any already created modules */
  3410. module_head = SWIG_GetModule(clientdata);
  3411. if (!module_head) {
  3412. /* This is the first module loaded for this interpreter */
  3413. /* so set the swig module into the interpreter */
  3414. SWIG_SetModule(clientdata, &swig_module);
  3415. module_head = &swig_module;
  3416. } else {
  3417. /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  3418. found=0;
  3419. iter=module_head;
  3420. do {
  3421. if (iter==&swig_module) {
  3422. found=1;
  3423. break;
  3424. }
  3425. iter=iter->next;
  3426. } while (iter!= module_head);
  3427. /* if the is found in the list, then all is done and we may leave */
  3428. if (found) return;
  3429. /* otherwise we must add out module into the list */
  3430. swig_module.next = module_head->next;
  3431. module_head->next = &swig_module;
  3432. }
  3433. /* When multiple interpeters are used, a module could have already been initialized in
  3434. a different interpreter, but not yet have a pointer in this interpreter.
  3435. In this case, we do not want to continue adding types... everything should be
  3436. set up already */
  3437. if (init == 0) return;
  3438. /* Now work on filling in swig_module.types */
  3439. #ifdef SWIGRUNTIME_DEBUG
  3440. printf("SWIG_InitializeModule: size %d\n", swig_module.size);
  3441. #endif
  3442. for (i = 0; i < swig_module.size; ++i) {
  3443. swig_type_info *type = 0;
  3444. swig_type_info *ret;
  3445. swig_cast_info *cast;
  3446. #ifdef SWIGRUNTIME_DEBUG
  3447. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  3448. #endif
  3449. /* if there is another module already loaded */
  3450. if (swig_module.next != &swig_module) {
  3451. type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  3452. }
  3453. if (type) {
  3454. /* Overwrite clientdata field */
  3455. #ifdef SWIGRUNTIME_DEBUG
  3456. printf("SWIG_InitializeModule: found type %s\n", type->name);
  3457. #endif
  3458. if (swig_module.type_initial[i]->clientdata) {
  3459. type->clientdata = swig_module.type_initial[i]->clientdata;
  3460. #ifdef SWIGRUNTIME_DEBUG
  3461. printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  3462. #endif
  3463. }
  3464. } else {
  3465. type = swig_module.type_initial[i];
  3466. }
  3467. /* Insert casting types */
  3468. cast = swig_module.cast_initial[i];
  3469. while (cast->type) {
  3470. /* Don't need to add information already in the list */
  3471. ret = 0;
  3472. #ifdef SWIGRUNTIME_DEBUG
  3473. printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  3474. #endif
  3475. if (swig_module.next != &swig_module) {
  3476. ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  3477. #ifdef SWIGRUNTIME_DEBUG
  3478. if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  3479. #endif
  3480. }
  3481. if (ret) {
  3482. if (type == swig_module.type_initial[i]) {
  3483. #ifdef SWIGRUNTIME_DEBUG
  3484. printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  3485. #endif
  3486. cast->type = ret;
  3487. ret = 0;
  3488. } else {
  3489. /* Check for casting already in the list */
  3490. swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  3491. #ifdef SWIGRUNTIME_DEBUG
  3492. if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  3493. #endif
  3494. if (!ocast) ret = 0;
  3495. }
  3496. }
  3497. if (!ret) {
  3498. #ifdef SWIGRUNTIME_DEBUG
  3499. printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  3500. #endif
  3501. if (type->cast) {
  3502. type->cast->prev = cast;
  3503. cast->next = type->cast;
  3504. }
  3505. type->cast = cast;
  3506. }
  3507. cast++;
  3508. }
  3509. /* Set entry in modules->types array equal to the type */
  3510. swig_module.types[i] = type;
  3511. }
  3512. swig_module.types[i] = 0;
  3513. #ifdef SWIGRUNTIME_DEBUG
  3514. printf("**** SWIG_InitializeModule: Cast List ******\n");
  3515. for (i = 0; i < swig_module.size; ++i) {
  3516. int j = 0;
  3517. swig_cast_info *cast = swig_module.cast_initial[i];
  3518. printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
  3519. while (cast->type) {
  3520. printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  3521. cast++;
  3522. ++j;
  3523. }
  3524. printf("---- Total casts: %d\n",j);
  3525. }
  3526. printf("**** SWIG_InitializeModule: Cast List ******\n");
  3527. #endif
  3528. }
  3529. /* This function will propagate the clientdata field of type to
  3530. * any new swig_type_info structures that have been added into the list
  3531. * of equivalent types. It is like calling
  3532. * SWIG_TypeClientData(type, clientdata) a second time.
  3533. */
  3534. SWIGRUNTIME void
  3535. SWIG_PropagateClientData(void) {
  3536. size_t i;
  3537. swig_cast_info *equiv;
  3538. static int init_run = 0;
  3539. if (init_run) return;
  3540. init_run = 1;
  3541. for (i = 0; i < swig_module.size; i++) {
  3542. if (swig_module.types[i]->clientdata) {
  3543. equiv = swig_module.types[i]->cast;
  3544. while (equiv) {
  3545. if (!equiv->converter) {
  3546. if (equiv->type && !equiv->type->clientdata)
  3547. SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  3548. }
  3549. equiv = equiv->next;
  3550. }
  3551. }
  3552. }
  3553. }
  3554. #ifdef __cplusplus
  3555. #if 0
  3556. {
  3557. /* c-mode */
  3558. #endif
  3559. }
  3560. #endif
  3561. #ifdef __cplusplus
  3562. extern "C"
  3563. #endif
  3564. XS(SWIG_init) {
  3565. dXSARGS;
  3566. int i;
  3567. SWIG_InitializeModule(0);
  3568. /* Install commands */
  3569. for (i = 0; swig_commands[i].name; i++) {
  3570. newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
  3571. }
  3572. /* Install variables */
  3573. for (i = 0; swig_variables[i].name; i++) {
  3574. SV *sv;
  3575. sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
  3576. if (swig_variables[i].type) {
  3577. SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
  3578. } else {
  3579. sv_setiv(sv,(IV) 0);
  3580. }
  3581. swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
  3582. }
  3583. /* Install constant */
  3584. for (i = 0; swig_constants[i].type; i++) {
  3585. SV *sv;
  3586. sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
  3587. switch(swig_constants[i].type) {
  3588. case SWIG_INT:
  3589. sv_setiv(sv, (IV) swig_constants[i].lvalue);
  3590. break;
  3591. case SWIG_FLOAT:
  3592. sv_setnv(sv, (double) swig_constants[i].dvalue);
  3593. break;
  3594. case SWIG_STRING:
  3595. sv_setpv(sv, (char *) swig_constants[i].pvalue);
  3596. break;
  3597. case SWIG_POINTER:
  3598. SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
  3599. break;
  3600. case SWIG_BINARY:
  3601. SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
  3602. break;
  3603. default:
  3604. break;
  3605. }
  3606. SvREADONLY_on(sv);
  3607. }
  3608. SWIG_TypeClientData(SWIGTYPE_p_ESLevent, (void*) "ESL::ESLevent");
  3609. SWIG_TypeClientData(SWIGTYPE_p_ESLconnection, (void*) "ESL::ESLconnection");
  3610. ST(0) = &PL_sv_yes;
  3611. XSRETURN(1);
  3612. }