2
0

esl_wrap.cpp 135 KB

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