Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gv_lua.cpp
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.0
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9
10#define SWIG_VERSION 0x040200
11#define SWIGLUA
12#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
13#define SWIG_LUA_MODULE_GLOBAL
14
15/* -----------------------------------------------------------------------------
16 * This section contains generic SWIG labels for method/variable
17 * declarations/attributes, and other compiler dependent labels.
18 * ----------------------------------------------------------------------------- */
19
20/* template workaround for compilers that cannot correctly implement the C++ standard */
21#ifndef SWIGTEMPLATEDISAMBIGUATOR
22# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
23# define SWIGTEMPLATEDISAMBIGUATOR template
24# elif defined(__HP_aCC)
25/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
26/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
27# define SWIGTEMPLATEDISAMBIGUATOR template
28# else
29# define SWIGTEMPLATEDISAMBIGUATOR
30# endif
31#endif
32
33/* inline attribute */
34#ifndef SWIGINLINE
35# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
36# define SWIGINLINE inline
37# else
38# define SWIGINLINE
39# endif
40#endif
41
42/* attribute recognised by some compilers to avoid 'unused' warnings */
43#ifndef SWIGUNUSED
44# if defined(__GNUC__)
45# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
46# define SWIGUNUSED __attribute__ ((__unused__))
47# else
48# define SWIGUNUSED
49# endif
50# elif defined(__ICC)
51# define SWIGUNUSED __attribute__ ((__unused__))
52# else
53# define SWIGUNUSED
54# endif
55#endif
56
57#ifndef SWIG_MSC_UNSUPPRESS_4505
58# if defined(_MSC_VER)
59# pragma warning(disable : 4505) /* unreferenced local function has been removed */
60# endif
61#endif
62
63#ifndef SWIGUNUSEDPARM
64# ifdef __cplusplus
65# define SWIGUNUSEDPARM(p)
66# else
67# define SWIGUNUSEDPARM(p) p SWIGUNUSED
68# endif
69#endif
70
71/* internal SWIG method */
72#ifndef SWIGINTERN
73# define SWIGINTERN static SWIGUNUSED
74#endif
75
76/* internal inline SWIG method */
77#ifndef SWIGINTERNINLINE
78# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
79#endif
80
81/* exporting methods */
82#if defined(__GNUC__)
83# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
84# ifndef GCC_HASCLASSVISIBILITY
85# define GCC_HASCLASSVISIBILITY
86# endif
87# endif
88#endif
89
90#ifndef SWIGEXPORT
91# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
92# if defined(STATIC_LINKED)
93# define SWIGEXPORT
94# else
95# define SWIGEXPORT __declspec(dllexport)
96# endif
97# else
98# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
99# define SWIGEXPORT __attribute__ ((visibility("default")))
100# else
101# define SWIGEXPORT
102# endif
103# endif
104#endif
105
106/* calling conventions for Windows */
107#ifndef SWIGSTDCALL
108# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109# define SWIGSTDCALL __stdcall
110# else
111# define SWIGSTDCALL
112# endif
113#endif
114
115/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
116#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
117# define _CRT_SECURE_NO_DEPRECATE
118#endif
119
120/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
121#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
122# define _SCL_SECURE_NO_DEPRECATE
123#endif
124
125/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
126#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
127# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
128#endif
129
130/* Intel's compiler complains if a variable which was never initialised is
131 * cast to void, which is a common idiom which we use to indicate that we
132 * are aware a variable isn't used. So we just silence that warning.
133 * See: https://github.com/swig/swig/issues/192 for more discussion.
134 */
135#ifdef __INTEL_COMPILER
136# pragma warning disable 592
137#endif
138
139#if __cplusplus >=201103L
140# define SWIG_NULLPTR nullptr
141#else
142# define SWIG_NULLPTR NULL
143#endif
144
145/* -----------------------------------------------------------------------------
146 * swigrun.swg
147 *
148 * This file contains generic C API SWIG runtime support for pointer
149 * type checking.
150 * ----------------------------------------------------------------------------- */
151
152/* This should only be incremented when either the layout of swig_type_info changes,
153 or for whatever reason, the runtime changes incompatibly */
154#define SWIG_RUNTIME_VERSION "4"
155
156/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
157#ifdef SWIG_TYPE_TABLE
158# define SWIG_QUOTE_STRING(x) #x
159# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
160# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
161#else
162# define SWIG_TYPE_TABLE_NAME
163#endif
164
165/*
166 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
167 creating a static or dynamic library from the SWIG runtime code.
168 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
169
170 But only do this if strictly necessary, ie, if you have problems
171 with your compiler or suchlike.
172*/
173
174#ifndef SWIGRUNTIME
175# define SWIGRUNTIME SWIGINTERN
176#endif
177
178#ifndef SWIGRUNTIMEINLINE
179# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
180#endif
181
182/* Generic buffer size */
183#ifndef SWIG_BUFFER_SIZE
184# define SWIG_BUFFER_SIZE 1024
185#endif
186
187/* Flags for pointer conversions */
188#define SWIG_POINTER_DISOWN 0x1
189#define SWIG_CAST_NEW_MEMORY 0x2
190#define SWIG_POINTER_NO_NULL 0x4
191#define SWIG_POINTER_CLEAR 0x8
192#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
193
194/* Flags for new pointer objects */
195#define SWIG_POINTER_OWN 0x1
196
197
198/*
199 Flags/methods for returning states.
200
201 The SWIG conversion methods, as ConvertPtr, return an integer
202 that tells if the conversion was successful or not. And if not,
203 an error code can be returned (see swigerrors.swg for the codes).
204
205 Use the following macros/flags to set or process the returning
206 states.
207
208 In old versions of SWIG, code such as the following was usually written:
209
210 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
211 // success code
212 } else {
213 //fail code
214 }
215
216 Now you can be more explicit:
217
218 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
219 if (SWIG_IsOK(res)) {
220 // success code
221 } else {
222 // fail code
223 }
224
225 which is the same really, but now you can also do
226
227 Type *ptr;
228 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
229 if (SWIG_IsOK(res)) {
230 // success code
231 if (SWIG_IsNewObj(res) {
232 ...
233 delete *ptr;
234 } else {
235 ...
236 }
237 } else {
238 // fail code
239 }
240
241 I.e., now SWIG_ConvertPtr can return new objects and you can
242 identify the case and take care of the deallocation. Of course that
243 also requires SWIG_ConvertPtr to return new result values, such as
244
245 int SWIG_ConvertPtr(obj, ptr,...) {
246 if (<obj is ok>) {
247 if (<need new object>) {
248 *ptr = <ptr to new allocated object>;
249 return SWIG_NEWOBJ;
250 } else {
251 *ptr = <ptr to old object>;
252 return SWIG_OLDOBJ;
253 }
254 } else {
255 return SWIG_BADOBJ;
256 }
257 }
258
259 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
260 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
261 SWIG errors code.
262
263 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
264 allows returning the 'cast rank', for example, if you have this
265
266 int food(double)
267 int fooi(int);
268
269 and you call
270
271 food(1) // cast rank '1' (1 -> 1.0)
272 fooi(1) // cast rank '0'
273
274 just use the SWIG_AddCast()/SWIG_CheckState()
275*/
276
277#define SWIG_OK (0)
278/* Runtime errors are < 0 */
279#define SWIG_ERROR (-1)
280/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
281/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
282/* Errors < -200 are generic runtime specific errors */
283#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
284
285#define SWIG_IsOK(r) (r >= 0)
286#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
287
288/* The CastRankLimit says how many bits are used for the cast rank */
289#define SWIG_CASTRANKLIMIT (1 << 8)
290/* The NewMask denotes the object was created (using new/malloc) */
291#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
292/* The TmpMask is for in/out typemaps that use temporary objects */
293#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
294/* Simple returning values */
295#define SWIG_BADOBJ (SWIG_ERROR)
296#define SWIG_OLDOBJ (SWIG_OK)
297#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
298#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
299/* Check, add and del object mask methods */
300#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
301#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
302#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
303#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
304#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
305#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
306
307/* Cast-Rank Mode */
308#if defined(SWIG_CASTRANK_MODE)
309# ifndef SWIG_TypeRank
310# define SWIG_TypeRank unsigned long
311# endif
312# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
313# define SWIG_MAXCASTRANK (2)
314# endif
315# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
316# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
318 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
319}
321 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
322}
323#else /* no cast-rank mode */
324# define SWIG_AddCast(r) (r)
325# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
326#endif
327
328/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
329 * if you're missing it.
330 */
331#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
332 (defined __cplusplus && __cplusplus >= 201103L) || \
333 defined SWIG_HAVE_SNPRINTF) && \
334 !defined SWIG_NO_SNPRINTF
335# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
336# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
337#else
338/* Fallback versions ignore the buffer size, but most of our uses either have a
339 * fixed maximum possible size or dynamically allocate a buffer that's large
340 * enough.
341 */
342# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
343# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
344#endif
345
346#include <string.h>
347
348#ifdef __cplusplus
349extern "C" {
350#endif
351
352typedef void *(*swig_converter_func)(void *, int *);
353typedef struct swig_type_info *(*swig_dycast_func)(void **);
354
355/* Structure to store information on one type */
356typedef struct swig_type_info {
357 const char *name; /* mangled name of this type */
358 const char *str; /* human readable name of this type */
359 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
360 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
361 void *clientdata; /* language specific type data */
362 int owndata; /* flag if the structure owns the clientdata */
364
365/* Structure to store a type and conversion function used for casting */
366typedef struct swig_cast_info {
367 swig_type_info *type; /* pointer to type that is equivalent to this type */
368 swig_converter_func converter; /* function to cast the void pointers */
369 struct swig_cast_info *next; /* pointer to next cast in linked list */
370 struct swig_cast_info *prev; /* pointer to the previous cast */
372
373/* Structure used to store module information
374 * Each module generates one structure like this, and the runtime collects
375 * all of these structures and stores them in a circularly linked list.*/
376typedef struct swig_module_info {
377 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
378 size_t size; /* Number of types in this module */
379 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
380 swig_type_info **type_initial; /* Array of initially generated type structures */
381 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
382 void *clientdata; /* Language specific module data */
384
385/*
386 Compare two type names skipping the space characters, therefore
387 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
388
389 Return 0 when the two name types are equivalent, as in
390 strncmp, but skipping ' '.
391*/
392SWIGRUNTIME int
393SWIG_TypeNameComp(const char *f1, const char *l1,
394 const char *f2, const char *l2) {
395 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
396 while ((*f1 == ' ') && (f1 != l1)) ++f1;
397 while ((*f2 == ' ') && (f2 != l2)) ++f2;
398 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
399 }
400 return (int)((l1 - f1) - (l2 - f2));
401}
402
403/*
404 Check type equivalence in a name list like <name1>|<name2>|...
405 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
406*/
407SWIGRUNTIME int
408SWIG_TypeCmp(const char *nb, const char *tb) {
409 int equiv = 1;
410 const char* te = tb + strlen(tb);
411 const char* ne = nb;
412 while (equiv != 0 && *ne) {
413 for (nb = ne; *ne; ++ne) {
414 if (*ne == '|') break;
415 }
416 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
417 if (*ne) ++ne;
418 }
419 return equiv;
420}
421
422/*
423 Check type equivalence in a name list like <name1>|<name2>|...
424 Return 0 if not equal, 1 if equal
425*/
426SWIGRUNTIME int
427SWIG_TypeEquiv(const char *nb, const char *tb) {
428 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
429}
430
431/*
432 Check the typename
433*/
435SWIG_TypeCheck(const char *c, swig_type_info *ty) {
436 if (ty) {
437 swig_cast_info *iter = ty->cast;
438 while (iter) {
439 if (strcmp(iter->type->name, c) == 0) {
440 if (iter == ty->cast)
441 return iter;
442 /* Move iter to the top of the linked list */
443 iter->prev->next = iter->next;
444 if (iter->next)
445 iter->next->prev = iter->prev;
446 iter->next = ty->cast;
447 iter->prev = 0;
448 if (ty->cast) ty->cast->prev = iter;
449 ty->cast = iter;
450 return iter;
451 }
452 iter = iter->next;
453 }
454 }
455 return 0;
456}
457
458/*
459 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
460*/
463 if (ty) {
464 swig_cast_info *iter = ty->cast;
465 while (iter) {
466 if (iter->type == from) {
467 if (iter == ty->cast)
468 return iter;
469 /* Move iter to the top of the linked list */
470 iter->prev->next = iter->next;
471 if (iter->next)
472 iter->next->prev = iter->prev;
473 iter->next = ty->cast;
474 iter->prev = 0;
475 if (ty->cast) ty->cast->prev = iter;
476 ty->cast = iter;
477 return iter;
478 }
479 iter = iter->next;
480 }
481 }
482 return 0;
483}
484
485/*
486 Cast a pointer up an inheritance hierarchy
487*/
489SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
490 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
491}
492
493/*
494 Dynamic pointer casting. Down an inheritance hierarchy
495*/
498 swig_type_info *lastty = ty;
499 if (!ty || !ty->dcast) return ty;
500 while (ty && (ty->dcast)) {
501 ty = (*ty->dcast)(ptr);
502 if (ty) lastty = ty;
503 }
504 return lastty;
505}
506
507/*
508 Return the name associated with this type
509*/
510SWIGRUNTIMEINLINE const char *
512 return ty->name;
513}
514
515/*
516 Return the pretty name associated with this type,
517 that is an unmangled type name in a form presentable to the user.
518*/
519SWIGRUNTIME const char *
521 /* The "str" field contains the equivalent pretty names of the
522 type, separated by vertical-bar characters. Choose the last
523 name. It should be the most specific; a fully resolved name
524 but not necessarily with default template parameters expanded. */
525 if (!type) return NULL;
526 if (type->str != NULL) {
527 const char *last_name = type->str;
528 const char *s;
529 for (s = type->str; *s; s++)
530 if (*s == '|') last_name = s+1;
531 return last_name;
532 }
533 else
534 return type->name;
535}
536
537/*
538 Set the clientdata field for a type
539*/
540SWIGRUNTIME void
542 swig_cast_info *cast = ti->cast;
543 /* if (ti->clientdata == clientdata) return; */
545
546 while (cast) {
547 if (!cast->converter) {
548 swig_type_info *tc = cast->type;
549 if (!tc->clientdata) {
551 }
552 }
553 cast = cast->next;
554 }
555}
556SWIGRUNTIME void
561
562/*
563 Search for a swig_type_info structure only by mangled name
564 Search is a O(log #types)
565
566 We start searching at module start, and finish searching when start == end.
567 Note: if start == end at the beginning of the function, we go all the way around
568 the circular list.
569*/
572 swig_module_info *end,
573 const char *name) {
574 swig_module_info *iter = start;
575 do {
576 if (iter->size) {
577 size_t l = 0;
578 size_t r = iter->size - 1;
579 do {
580 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
581 size_t i = (l + r) >> 1;
582 const char *iname = iter->types[i]->name;
583 if (iname) {
584 int compare = strcmp(name, iname);
585 if (compare == 0) {
586 return iter->types[i];
587 } else if (compare < 0) {
588 if (i) {
589 r = i - 1;
590 } else {
591 break;
592 }
593 } else if (compare > 0) {
594 l = i + 1;
595 }
596 } else {
597 break; /* should never happen */
598 }
599 } while (l <= r);
600 }
601 iter = iter->next;
602 } while (iter != end);
603 return 0;
604}
605
606/*
607 Search for a swig_type_info structure for either a mangled name or a human readable name.
608 It first searches the mangled names of the types, which is a O(log #types)
609 If a type is not found it then searches the human readable names, which is O(#types).
610
611 We start searching at module start, and finish searching when start == end.
612 Note: if start == end at the beginning of the function, we go all the way around
613 the circular list.
614*/
617 swig_module_info *end,
618 const char *name) {
619 /* STEP 1: Search the name field using binary search */
620 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
621 if (ret) {
622 return ret;
623 } else {
624 /* STEP 2: If the type hasn't been found, do a complete search
625 of the str field (the human readable name) */
626 swig_module_info *iter = start;
627 do {
628 size_t i = 0;
629 for (; i < iter->size; ++i) {
630 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
631 return iter->types[i];
632 }
633 iter = iter->next;
634 } while (iter != end);
635 }
636
637 /* neither found a match */
638 return 0;
639}
640
641/*
642 Pack binary data into a string
643*/
644SWIGRUNTIME char *
645SWIG_PackData(char *c, void *ptr, size_t sz) {
646 static const char hex[17] = "0123456789abcdef";
647 const unsigned char *u = (unsigned char *) ptr;
648 const unsigned char *eu = u + sz;
649 for (; u != eu; ++u) {
650 unsigned char uu = *u;
651 *(c++) = hex[(uu & 0xf0) >> 4];
652 *(c++) = hex[uu & 0xf];
653 }
654 return c;
655}
656
657/*
658 Unpack binary data from a string
659*/
660SWIGRUNTIME const char *
661SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
662 unsigned char *u = (unsigned char *) ptr;
663 const unsigned char *eu = u + sz;
664 for (; u != eu; ++u) {
665 char d = *(c++);
666 unsigned char uu;
667 if ((d >= '0') && (d <= '9'))
668 uu = (unsigned char)((d - '0') << 4);
669 else if ((d >= 'a') && (d <= 'f'))
670 uu = (unsigned char)((d - ('a'-10)) << 4);
671 else
672 return (char *) 0;
673 d = *(c++);
674 if ((d >= '0') && (d <= '9'))
675 uu |= (unsigned char)(d - '0');
676 else if ((d >= 'a') && (d <= 'f'))
677 uu |= (unsigned char)(d - ('a'-10));
678 else
679 return (char *) 0;
680 *u = uu;
681 }
682 return c;
683}
684
685/*
686 Pack 'void *' into a string buffer.
687*/
688SWIGRUNTIME char *
689SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
690 char *r = buff;
691 if ((2*sizeof(void *) + 2) > bsz) return 0;
692 *(r++) = '_';
693 r = SWIG_PackData(r,&ptr,sizeof(void *));
694 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
695 strcpy(r,name);
696 return buff;
697}
698
699SWIGRUNTIME const char *
700SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
701 if (*c != '_') {
702 if (strcmp(c,"NULL") == 0) {
703 *ptr = (void *) 0;
704 return name;
705 } else {
706 return 0;
707 }
708 }
709 return SWIG_UnpackData(++c,ptr,sizeof(void *));
710}
711
712SWIGRUNTIME char *
713SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
714 char *r = buff;
715 size_t lname = (name ? strlen(name) : 0);
716 if ((2*sz + 2 + lname) > bsz) return 0;
717 *(r++) = '_';
718 r = SWIG_PackData(r,ptr,sz);
719 if (lname) {
720 strncpy(r,name,lname+1);
721 } else {
722 *r = 0;
723 }
724 return buff;
725}
726
727SWIGRUNTIME const char *
728SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
729 if (*c != '_') {
730 if (strcmp(c,"NULL") == 0) {
731 memset(ptr,0,sz);
732 return name;
733 } else {
734 return 0;
735 }
736 }
737 return SWIG_UnpackData(++c,ptr,sz);
738}
739
740#ifdef __cplusplus
741}
742#endif
743
744/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
745#define SWIG_UnknownError -1
746#define SWIG_IOError -2
747#define SWIG_RuntimeError -3
748#define SWIG_IndexError -4
749#define SWIG_TypeError -5
750#define SWIG_DivisionByZero -6
751#define SWIG_OverflowError -7
752#define SWIG_SyntaxError -8
753#define SWIG_ValueError -9
754#define SWIG_SystemError -10
755#define SWIG_AttributeError -11
756#define SWIG_MemoryError -12
757#define SWIG_NullReferenceError -13
758
759
760/* -----------------------------------------------------------------------------
761 * luarun.swg
762 *
763 * This file contains the runtime support for Lua modules
764 * and includes code for managing global variables and pointer
765 * type checking.
766 * ----------------------------------------------------------------------------- */
767
768#ifdef __cplusplus
769extern "C" {
770#endif
771
772#include "lua.h"
773#include "lauxlib.h"
774#include <stdlib.h> /* for malloc */
775#include <assert.h> /* for a few sanity tests */
776
777/* -----------------------------------------------------------------------------
778 * Lua flavors
779 * ----------------------------------------------------------------------------- */
780
781#define SWIG_LUA_FLAVOR_LUA 1
782#define SWIG_LUA_FLAVOR_ELUA 2
783#define SWIG_LUA_FLAVOR_ELUAC 3
784
785#if !defined(SWIG_LUA_TARGET)
786# error SWIG_LUA_TARGET not defined
787#endif
788
789#if defined(SWIG_LUA_ELUA_EMULATE)
790
791struct swig_elua_entry;
792
793typedef struct swig_elua_key {
794 int type;
795 union {
796 const char* strkey;
797 lua_Number numkey;
798 } key;
799} swig_elua_key;
800
801typedef struct swig_elua_val {
802 int type;
803 union {
804 lua_Number number;
805 const struct swig_elua_entry *table;
806 const char *string;
807 lua_CFunction function;
808 struct {
809 char member;
810 long lvalue;
811 void *pvalue;
812 swig_type_info **ptype;
813 } userdata;
814 } value;
815} swig_elua_val;
816
817typedef struct swig_elua_entry {
818 swig_elua_key key;
819 swig_elua_val value;
820} swig_elua_entry;
821
822#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
823#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
824#define LNILKEY {LUA_TNIL, {.strkey = 0} }
825
826#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
827#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
828#define LROVAL(x) {LUA_TTABLE, {.table = x} }
829#define LNILVAL {LUA_TNIL, {.string = 0} }
830#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
831
832#define LUA_REG_TYPE swig_elua_entry
833
834#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
835
836#define lua_pushrotable(L,p)\
837 lua_newtable(L);\
838 assert(p);\
839 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
840
841#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
842 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
843
844#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
845 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
846#endif
847
848#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
849# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
850# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
851# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
852# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
853 /* Those two types of constants are not supported in elua */
854
855#ifndef SWIG_LUA_CONSTTAB_POINTER
856#warning eLua does not support pointers as constants. By default, nil will be used as value
857#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
858#endif
859
860#ifndef SWIG_LUA_CONSTTAB_BINARY
861#warning eLua does not support pointers to member as constants. By default, nil will be used as value
862#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
863#endif
864#else /* SWIG_LUA_FLAVOR_LUA */
865# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
866# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
867# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
868# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
869# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
870 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
871# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
872 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
873#endif
874
875#ifndef SWIG_LUA_ELUA_EMULATE
876#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
877# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
878# define LSTRVAL LRO_STRVAL
879#endif
880#endif /* SWIG_LUA_ELUA_EMULATE*/
881
882#ifndef SWIG_LUA_ELUA_EMULATE
883#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
884
885#ifndef MIN_OPT_LEVEL
886#define MIN_OPT_LEVEL 2
887#endif
888
889#include "lrodefs.h"
890#include "lrotable.h"
891#endif
892#endif /* SWIG_LUA_ELUA_EMULATE*/
893/* -----------------------------------------------------------------------------
894 * compatibility defines
895 * ----------------------------------------------------------------------------- */
896
897/* History of Lua C API length functions: In Lua 5.0 (and before?)
898 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
899 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
900 this function was again renamed, to "lua_rawlen" (to emphasize that
901 it doesn't call the "__len" metamethod), and the compatibility
902 define of lua_strlen was removed. All SWIG uses have been updated
903 to "lua_rawlen", and we add our own defines of that here for older
904 versions of Lua. */
905#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
906# define lua_rawlen lua_strlen
907#elif LUA_VERSION_NUM == 501
908# define lua_rawlen lua_objlen
909#endif
910
911/* lua_tolstring() was added in Lua 5.1. It should be a little more
912 efficient than making two separate calls and it avoids problems with order
913 of evaluation so SWIG calls lua_tolstring() when it wants the length and
914 we provide a compatibility implementation for Lua 5.0. */
915#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
916static const char *(lua_tolstring)(lua_State *L, int idx, size_t *len) {
917 /* Call lua_tostring() first as it may convert the value from number to
918 string. */
919 const char *result = lua_tostring(L, idx);
920 if (len) *len = lua_strlen(L, idx);
921 return result;
922}
923#endif
924
925
926/* lua_pushglobaltable is the recommended "future-proof" way to get
927 the global table for Lua 5.2 and later. Here we define
928 lua_pushglobaltable ourselves for Lua versions before 5.2. */
929#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
930# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
931#endif
932
933/* lua_absindex was introduced in Lua 5.2 */
934#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
935# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
936#endif
937
938/* lua_rawsetp was introduced in Lua 5.2 */
939#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
940#define lua_rawsetp(L,index,ptr)\
941 lua_pushlightuserdata(L,(void*)(ptr));\
942 lua_insert(L,-2);\
943 lua_rawset(L,index);
944
945#define lua_rawgetp(L,index,ptr)\
946 lua_pushlightuserdata(L,(void*)(ptr));\
947 lua_rawget(L,index);
948
949#endif
950
951/* --------------------------------------------------------------------------
952 * Helper functions for error handling
953 * -------------------------------------------------------------------------- */
954
955/* Push the string STR on the Lua stack, like lua_pushstring, but
956 prefixed with the location of the innermost Lua call-point
957 (as formatted by luaL_where). */
958SWIGRUNTIME void
959SWIG_Lua_pusherrstring (lua_State *L, const char *str)
960{
961 luaL_where (L, 1);
962 lua_pushstring (L, str);
963 lua_concat (L, 2);
964}
965
966/* Push a formatted string generated from FMT and following args on
967 the Lua stack, like lua_pushfstring, but prefixed with the
968 location of the innermost Lua call-point (as formatted by luaL_where). */
969SWIGRUNTIME void
970SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
971{
972 va_list argp;
973 va_start(argp, fmt);
974 luaL_where(L, 1);
975 lua_pushvfstring(L, fmt, argp);
976 va_end(argp);
977 lua_concat(L, 2);
978}
979
980
981/* -----------------------------------------------------------------------------
982 * global swig types
983 * ----------------------------------------------------------------------------- */
984/* Constant table */
985#define SWIG_LUA_INT 1
986#define SWIG_LUA_FLOAT 2
987#define SWIG_LUA_STRING 3
988#define SWIG_LUA_POINTER 4
989#define SWIG_LUA_BINARY 5
990#define SWIG_LUA_CHAR 6
991
992/* Structure for variable linking table */
993typedef struct {
994 const char *name;
995 lua_CFunction get;
996 lua_CFunction set;
998
999#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
1000typedef const LUA_REG_TYPE swig_lua_method;
1001typedef const LUA_REG_TYPE swig_lua_const_info;
1002#else /* Normal lua */
1003typedef luaL_Reg swig_lua_method;
1004
1005/* Constant information structure */
1006typedef struct {
1007 int type;
1008 char *name;
1009 long lvalue;
1010 double dvalue;
1011 void *pvalue;
1012 swig_type_info **ptype;
1014
1015#endif
1016
1017typedef struct {
1018 const char *name;
1019 lua_CFunction getmethod;
1020 lua_CFunction setmethod;
1022
1023
1024struct swig_lua_class;
1025/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
1034
1035typedef struct swig_lua_class {
1036 const char *name; /* Name that this class has in Lua */
1037 const char *fqname; /* Fully qualified name - Scope + class name */
1039 lua_CFunction constructor;
1040 void (*destructor)(void *);
1044 swig_lua_method *metatable; /* 0 for -eluac */
1046 const char **base_names;
1048
1049/* this is the struct for wrapping all pointers in SwigLua
1050*/
1051typedef struct {
1053 int own; /* 1 if owned & must be destroyed */
1054 void *ptr;
1056
1057/* this is the struct for wrapping arbitrary packed binary data
1058(currently it is only used for member function pointers)
1059the data ordering is similar to swig_lua_userdata, but it is currently not possible
1060to tell the two structures apart within SWIG, other than by looking at the type
1061*/
1062typedef struct {
1064 int own; /* 1 if owned & must be destroyed */
1065 char data[1]; /* arbitrary amount of data */
1067
1068/* Common SWIG API */
1069#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1070#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1071#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1072/* for C++ member pointers, ie, member methods */
1073#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1074#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1075
1076/* Runtime API */
1077#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1078#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1079#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1080
1081/* Contract support */
1082#define SWIG_contract_assert(expr, msg) \
1083 do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)
1084
1085
1086/* helper #defines */
1087#define SWIG_fail {goto fail;}
1088#define SWIG_fail_arg(func_name,argnum,type) \
1089 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1090 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1091 goto fail;}
1092#define SWIG_fail_ptr(func_name,argnum,type) \
1093 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1094#define SWIG_check_num_args(func_name,a,b) \
1095 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1096 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1097 goto fail;}
1098
1099
1100#define SWIG_Lua_get_table(L,n) \
1101 (lua_pushstring(L, n), lua_rawget(L,-2))
1102
1103#define SWIG_Lua_add_function(L,n,f) \
1104 (lua_pushstring(L, n), \
1105 lua_pushcfunction(L, f), \
1106 lua_rawset(L,-3))
1107
1108#define SWIG_Lua_add_boolean(L,n,b) \
1109 (lua_pushstring(L, n), \
1110 lua_pushboolean(L, b), \
1111 lua_rawset(L,-3))
1112
1113/* special helper for allowing 'nil' for usertypes */
1114#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1115
1116#ifdef __cplusplus
1117/* Special helper for member function pointers
1118it gets the address, casts it, then dereferences it */
1119/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1120#endif
1121
1122/* storing/access of swig_module_info */
1125 swig_module_info *ret = 0;
1126 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1127 lua_rawget(L,LUA_REGISTRYINDEX);
1128 if (lua_islightuserdata(L,-1))
1129 ret=(swig_module_info*)lua_touserdata(L,-1);
1130 lua_pop(L,1); /* tidy */
1131 return ret;
1132}
1133
1134SWIGRUNTIME void
1136 /* add this all into the Lua registry: */
1137 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1138 lua_pushlightuserdata(L,(void*)module);
1139 lua_rawset(L,LUA_REGISTRYINDEX);
1140}
1141
1142/* -----------------------------------------------------------------------------
1143 * global variable support code: modules
1144 * ----------------------------------------------------------------------------- */
1145
1146/* this function is called when trying to set an immutable.
1147default action is to print an error.
1148This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1150{
1151/* there should be 1 param passed in: the new value */
1152#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1153 lua_pop(L,1); /* remove it */
1154 luaL_error(L,"This variable is immutable");
1155#endif
1156 return 0; /* should not return anything */
1157}
1158
1159#ifdef SWIG_LUA_ELUA_EMULATE
1160
1161SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1162SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1163static int swig_lua_elua_emulate_unique_key;
1164
1165/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1166SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1167{
1168 int i, table_parsed, parsed_tables_array, target_table;
1169 assert(lua_istable(L,-1));
1170 target_table = lua_gettop(L);
1171 /* Get the registry where we put all parsed tables to avoid loops */
1172 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1173 if(lua_isnil(L,-1)) {
1174 lua_pop(L,1);
1175 lua_newtable(L);
1176 lua_pushvalue(L,-1);
1177 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1178 }
1179 parsed_tables_array = lua_gettop(L);
1180 lua_pushvalue(L,target_table);
1181 lua_rawsetp(L, parsed_tables_array, table);
1182 table_parsed = 0;
1183 const int SWIGUNUSED pairs_start = lua_gettop(L);
1184 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1185 {
1186 const swig_elua_entry *entry = table + i;
1187 int is_metatable = 0;
1188 switch(entry->key.type) {
1189 case LUA_TSTRING:
1190 lua_pushstring(L,entry->key.key.strkey);
1191 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1192 is_metatable = 1;
1193 break;
1194 case LUA_TNUMBER:
1195 lua_pushnumber(L,entry->key.key.numkey);
1196 break;
1197 case LUA_TNIL:
1198 lua_pushnil(L);
1199 break;
1200 default:
1201 assert(0);
1202 }
1203 switch(entry->value.type) {
1204 case LUA_TSTRING:
1205 lua_pushstring(L,entry->value.value.string);
1206 break;
1207 case LUA_TNUMBER:
1208 lua_pushnumber(L,entry->value.value.number);
1209 break;
1210 case LUA_TFUNCTION:
1211 lua_pushcfunction(L,entry->value.value.function);
1212 break;
1213 case LUA_TTABLE:
1214 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1215 table_parsed = !lua_isnil(L,-1);
1216 if(!table_parsed) {
1217 lua_pop(L,1); /*remove nil */
1218 lua_newtable(L);
1219 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1220 }
1221 if(is_metatable) {
1222 assert(lua_istable(L,-1));
1223 lua_pushvalue(L,-1);
1224 lua_setmetatable(L,target_table);
1225 }
1226
1227 break;
1228 case LUA_TUSERDATA:
1229 if(entry->value.value.userdata.member)
1230 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1231 entry->value.value.userdata.lvalue,
1232 *(entry->value.value.userdata.ptype));
1233 else
1234 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1235 *(entry->value.value.userdata.ptype),0);
1236 break;
1237 case LUA_TNIL:
1238 lua_pushnil(L);
1239 break;
1240 default:
1241 assert(0);
1242 }
1243 assert(lua_gettop(L) == pairs_start + 2);
1244 lua_rawset(L,target_table);
1245 }
1246 lua_pop(L,1); /* Removing parsed tables storage */
1247 assert(lua_gettop(L) == target_table);
1248}
1249
1250SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1251{
1252 lua_pushnil(L);
1253 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1254}
1255
1257
1258SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1259{
1260 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1262 lua_getfield(L,-1,"lua_getmetatable");
1263 lua_remove(L,-2); /* remove the registry*/
1264 assert(!lua_isnil(L,-1));
1265 lua_pushvalue(L,1);
1266 assert(lua_gettop(L) == 3); /* object | function | object again */
1267 lua_call(L,1,1);
1268 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1269 return 1;
1270 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1271 assert(lua_gettop(L) == 2);
1272 if(lua_istable(L,-2)) {
1273 lua_pop(L,1); /*remove the nil*/
1274 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1275 }
1276 assert(lua_gettop(L) == 2);
1277 return 1;
1278
1279fail:
1280 lua_error(L);
1281 return 0;
1282}
1283
1284SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1285{
1288 lua_pushstring(L,"lua_getmetatable");
1289 lua_getfield(L,-2,"getmetatable");
1290 assert(!lua_isnil(L,-1));
1291 lua_rawset(L,-4);
1292 lua_pushstring(L, "getmetatable");
1293 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1294 lua_rawset(L,-3);
1295 lua_pop(L,2);
1296
1297}
1298/* END OF REMOVE */
1299
1300#endif
1301/* -----------------------------------------------------------------------------
1302 * global variable support code: namespaces and modules (which are the same thing)
1303 * ----------------------------------------------------------------------------- */
1304
1306{
1307/* there should be 2 params passed in
1308 (1) table (not the meta table)
1309 (2) string name of the attribute
1310*/
1311 assert(lua_istable(L,-2)); /* just in case */
1312 lua_getmetatable(L,-2);
1313 assert(lua_istable(L,-1));
1314 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1315 assert(lua_istable(L,-1));
1316 /* look for the key in the .get table */
1317 lua_pushvalue(L,2); /* key */
1318 lua_rawget(L,-2);
1319 lua_remove(L,-2); /* stack tidy, remove .get table */
1320 if (lua_iscfunction(L,-1))
1321 { /* found it so call the fn & return its value */
1322 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1323 lua_remove(L,-2); /* stack tidy, remove metatable */
1324 return 1;
1325 }
1326 lua_pop(L,1); /* remove whatever was there */
1327 /* ok, so try the .fn table */
1328 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1329 assert(lua_istable(L,-1)); /* just in case */
1330 lua_pushvalue(L,2); /* key */
1331 lua_rawget(L,-2); /* look for the fn */
1332 lua_remove(L,-2); /* stack tidy, remove .fn table */
1333 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1334 { /* found it so return the fn & let lua call it */
1335 lua_remove(L,-2); /* stack tidy, remove metatable */
1336 return 1;
1337 }
1338 lua_pop(L,1); /* remove whatever was there */
1339 return 0;
1340}
1341
1343{
1344/* there should be 3 params passed in
1345 (1) table (not the meta table)
1346 (2) string name of the attribute
1347 (3) any for the new value
1348*/
1349
1350 assert(lua_istable(L,1));
1351 lua_getmetatable(L,1); /* get the meta table */
1352 assert(lua_istable(L,-1));
1353
1354 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1355 if (lua_istable(L,-1))
1356 {
1357 /* look for the key in the .set table */
1358 lua_pushvalue(L,2); /* key */
1359 lua_rawget(L,-2);
1360 if (lua_iscfunction(L,-1))
1361 { /* found it so call the fn & return its value */
1362 lua_pushvalue(L,3); /* value */
1363 lua_call(L,1,0);
1364 return 0;
1365 }
1366 lua_pop(L,1); /* remove the value */
1367 }
1368 lua_pop(L,1); /* remove the value .set table */
1369 lua_pop(L,1); /* remote metatable */
1370 lua_rawset(L,-3);
1371 return 0;
1372}
1373
1374#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1375SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1376SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1377SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1378
1379/* helper function - register namespace methods and attributes into namespace */
1381{
1382 int i;
1383 /* There must be namespace table (not metatable) at the top of the stack */
1384 assert(lua_istable(L,-1));
1386
1387 /* add methods to the namespace/module table */
1388 for(i=0;ns->ns_methods[i].name;i++){
1389 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1390 }
1391 lua_getmetatable(L,-1);
1392
1393 /* add fns */
1394 for(i=0;ns->ns_attributes[i].name;i++){
1396 }
1397
1398 /* clear stack - remove metatble */
1399 lua_pop(L,1);
1400 return 0;
1401}
1402
1403/* Register all classes in the namespace */
1405{
1406 swig_lua_class **classes;
1407
1408 /* There must be a module/namespace table at the top of the stack */
1409 assert(lua_istable(L,-1));
1410
1411 classes = ns->ns_classes;
1412
1413 if( classes != 0 ) {
1414 while(*classes != 0) {
1415 SWIG_Lua_class_register(L, *classes);
1416 classes++;
1417 }
1418 }
1419}
1420
1421/* Helper function. Creates namespace table and adds it to module table
1422 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1423 when function is called).
1424 Function always returns newly registered table on top of the stack.
1425*/
1427{
1428 swig_lua_namespace **sub_namespace;
1429 /* 1 argument - table on the top of the stack */
1430 const int SWIGUNUSED begin = lua_gettop(L);
1431 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1432 lua_checkstack(L,5);
1433 lua_newtable(L); /* namespace itself */
1434 lua_newtable(L); /* metatable for namespace */
1435
1436 /* add a table called ".get" */
1437 lua_pushstring(L,".get");
1438 lua_newtable(L);
1439 lua_rawset(L,-3);
1440 /* add a table called ".set" */
1441 lua_pushstring(L,".set");
1442 lua_newtable(L);
1443 lua_rawset(L,-3);
1444 /* add a table called ".fn" */
1445 lua_pushstring(L,".fn");
1446 lua_newtable(L);
1447 lua_rawset(L,-3);
1448
1449 /* add accessor fns for using the .get,.set&.fn */
1452
1453 lua_setmetatable(L,-2); /* set metatable */
1454
1455 /* Register all functions, variables etc */
1457 /* Register classes */
1459
1460 sub_namespace = ns->ns_namespaces;
1461 if( sub_namespace != 0) {
1462 while(*sub_namespace != 0) {
1463 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1464 lua_pop(L,1); /* removing sub-namespace table */
1465 sub_namespace++;
1466 }
1467 }
1468
1469 if (reg) {
1470 lua_pushstring(L,ns->name);
1471 lua_pushvalue(L,-2);
1472 lua_rawset(L,-4); /* add namespace to module table */
1473 }
1474 assert(lua_gettop(L) == begin+1);
1475}
1476#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1477
1478/* -----------------------------------------------------------------------------
1479 * global variable support code: classes
1480 * ----------------------------------------------------------------------------- */
1481
1482SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1483
1484typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1485
1487 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1488{
1489 /* first_arg - position of the object in stack. Everything that is above are arguments
1490 * and is passed to every evocation of the func */
1491 int last_arg = lua_gettop(L);/* position of last argument */
1492 int original_metatable = last_arg + 1;
1493 size_t bases_count;
1494 int result = SWIG_ERROR;
1495 int bases_table;
1496 (void)swig_type;
1497 lua_getmetatable(L,first_arg);
1498
1499 /* initialise base search */
1500#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1501 SWIG_Lua_get_table(L,".bases");
1502 assert(lua_istable(L,-1));
1503 bases_count = lua_rawlen(L,-1);
1504 bases_table = lua_gettop(L);
1505#else
1506 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1507 (void)bases_table;
1508 assert(swig_type!=0);
1509 swig_module_info *module=SWIG_GetModule(L);
1510 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1511 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1512 bases_count = 0;
1513 for(;base_names[bases_count];
1514 bases_count++);/* get length of bases */
1515#endif
1516
1517 if(ret)
1518 *ret = 0;
1519 if(bases_count>0)
1520 {
1521 int to_remove;
1522 size_t i;
1523 int j;
1524 int subcall_last_arg;
1525 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1526 int valid = 1;
1527 swig_type_info *base_swig_type = 0;
1528 for(j=first_arg;j<=last_arg;j++)
1529 lua_pushvalue(L,j);
1530 subcall_last_arg = lua_gettop(L);
1531
1532 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1533 for(i=0;i<bases_count;i++) {
1534 /* Iteration through class bases */
1535#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1536 lua_rawgeti(L,bases_table,i+1);
1537 base_swig_type = 0;
1538 if(lua_isnil(L,-1)) {
1539 valid = 0;
1540 lua_pop(L,1);
1541 } else {
1542 valid = 1;
1543 }
1544#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1545 swig_lua_class *base_class = bases[i];
1546 if(!base_class) {
1547 valid = 0;
1548 } else {
1549 valid = 1;
1551 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1552 assert(base_swig_type != 0);
1553 }
1554#endif
1555
1556 if(!valid)
1557 continue;
1558 assert(lua_isuserdata(L, subcall_first_arg));
1559 assert(lua_istable(L,-1));
1560 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1561 assert(lua_gettop(L) == subcall_last_arg);
1562 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1563 if(result != SWIG_ERROR) {
1564 break;
1565 }
1566 }
1567 /* Restore original metatable */
1568 lua_pushvalue(L,original_metatable);
1569 lua_setmetatable(L,first_arg);
1570 /* Clear - remove everything between last_arg and subcall_last_arg including */
1571 to_remove = subcall_last_arg - last_arg;
1572 for(j=0;j<to_remove;j++)
1573 lua_remove(L,last_arg+1);
1574 } else {
1575 /* Remove everything after last_arg */
1576 lua_pop(L, lua_gettop(L) - last_arg);
1577 }
1578 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1579 return result;
1580}
1581
1582/* The class.get method helper, performs the lookup of class attributes.
1583 * It returns an error code. Number of function return values is passed inside 'ret'.
1584 * first_arg is not used in this function because function always has 2 arguments.
1585 */
1586SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1587{
1588/* there should be 2 params passed in
1589 (1) userdata (not the meta table)
1590 (2) string name of the attribute
1591*/
1592 int bases_search_result;
1593 int substack_start = lua_gettop(L)-2;
1594 assert(first_arg == substack_start+1);
1595 lua_checkstack(L,5);
1596 assert(lua_isuserdata(L,-2)); /* just in case */
1597 lua_getmetatable(L,-2); /* get the meta table */
1598 assert(lua_istable(L,-1)); /* just in case */
1599 /* NEW: looks for the __getitem() fn
1600 this is a user provided get fn */
1601 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1602 if (lua_iscfunction(L,-1)) /* if it's there */
1603 { /* found it so call the fn & return its value */
1604 lua_pushvalue(L,substack_start+1); /* the userdata */
1605 lua_pushvalue(L,substack_start+2); /* the parameter */
1606 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1607 lua_remove(L,-2); /* stack tidy, remove metatable */
1608 if(ret) *ret = 1;
1609 return SWIG_OK;
1610 }
1611 lua_pop(L,1);
1612 /* Remove the metatable */
1613 lua_pop(L,1);
1614 /* Search in base classes */
1615 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1616 return bases_search_result; /* sorry not known */
1617}
1618
1619
1620/* The class.get method helper, performs the lookup of class attributes.
1621 * It returns an error code. Number of function return values is passed inside 'ret'.
1622 * first_arg is not used in this function because function always has 2 arguments.
1623 */
1624SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1625{
1626/* there should be 2 params passed in
1627 (1) userdata (not the meta table)
1628 (2) string name of the attribute
1629*/
1630 int bases_search_result;
1631 int substack_start = lua_gettop(L)-2;
1632 assert(first_arg == substack_start+1);
1633 lua_checkstack(L,5);
1634 assert(lua_isuserdata(L,-2)); /* just in case */
1635 lua_getmetatable(L,-2); /* get the meta table */
1636 assert(lua_istable(L,-1)); /* just in case */
1637 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1638 assert(lua_istable(L,-1)); /* just in case */
1639 /* look for the key in the .get table */
1640 lua_pushvalue(L,substack_start+2); /* key */
1641 lua_rawget(L,-2);
1642 lua_remove(L,-2); /* stack tidy, remove .get table */
1643 if (lua_iscfunction(L,-1))
1644 { /* found it so call the fn & return its value */
1645 lua_pushvalue(L,substack_start+1); /* the userdata */
1646 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1647 lua_remove(L,-2); /* stack tidy, remove metatable */
1648 if(ret)
1649 *ret = 1;
1650 return SWIG_OK;
1651 }
1652 lua_pop(L,1); /* remove whatever was there */
1653 /* ok, so try the .fn table */
1654 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1655 assert(lua_istable(L,-1)); /* just in case */
1656 lua_pushvalue(L,substack_start+2); /* key */
1657 lua_rawget(L,-2); /* look for the fn */
1658 lua_remove(L,-2); /* stack tidy, remove .fn table */
1659 if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
1660 { /* found it so return the fn & let lua call it */
1661 lua_remove(L,-2); /* stack tidy, remove metatable */
1662 if(ret)
1663 *ret = 1;
1664 return SWIG_OK;
1665 }
1666 lua_pop(L,1); /* remove whatever was there */
1667 /* Remove the metatable */
1668 lua_pop(L,1);
1669 /* Search in base classes */
1670 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1671 return bases_search_result; /* sorry not known */
1672}
1673
1674/* the class.get method, performs the lookup of class attributes
1675 */
1677{
1678/* there should be 2 params passed in
1679 (1) userdata (not the meta table)
1680 (2) string name of the attribute
1681*/
1682 int result;
1683 swig_lua_userdata *usr;
1685 int ret = 0;
1686 assert(lua_isuserdata(L,1));
1687 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1688 type = usr->type;
1689 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1690 if(result == SWIG_OK)
1691 return ret;
1692
1693 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1694 if(result == SWIG_OK)
1695 return ret;
1696
1697 return 0;
1698}
1699
1700/* helper for the class.set method, performs the lookup of class attributes
1701 * It returns error code. Number of function return values is passed inside 'ret'
1702 */
1703SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1704{
1705/* there should be 3 params passed in
1706 (1) table (not the meta table)
1707 (2) string name of the attribute
1708 (3) any for the new value
1709 */
1710
1711 int bases_search_result;
1712 int substack_start = lua_gettop(L) - 3;
1713 lua_checkstack(L,5);
1714 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1715 lua_getmetatable(L,substack_start+1); /* get the meta table */
1716 assert(lua_istable(L,-1)); /* just in case */
1717 if(ret)
1718 *ret = 0; /* it is setter - number of return values is always 0 */
1719
1720 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1721 if (lua_istable(L,-1))
1722 {
1723 /* look for the key in the .set table */
1724 lua_pushvalue(L,substack_start+2); /* key */
1725 lua_rawget(L,-2);
1726 lua_remove(L,-2); /* tidy stack, remove .set table */
1727 if (lua_iscfunction(L,-1))
1728 { /* found it so call the fn & return its value */
1729 lua_pushvalue(L,substack_start+1); /* userdata */
1730 lua_pushvalue(L,substack_start+3); /* value */
1731 lua_call(L,2,0);
1732 lua_remove(L,substack_start+4); /*remove metatable*/
1733 return SWIG_OK;
1734 }
1735 lua_pop(L,1); /* remove the value */
1736 } else {
1737 lua_pop(L,1); /* remove the answer for .set table request*/
1738 }
1739 /* NEW: looks for the __setitem() fn
1740 this is a user provided set fn */
1741 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1742 if (lua_iscfunction(L,-1)) /* if it's there */
1743 { /* found it so call the fn & return its value */
1744 lua_pushvalue(L,substack_start+1); /* the userdata */
1745 lua_pushvalue(L,substack_start+2); /* the parameter */
1746 lua_pushvalue(L,substack_start+3); /* the value */
1747 lua_call(L,3,0); /* 3 values in ,0 out */
1748 lua_remove(L,-2); /* stack tidy, remove metatable */
1749 return SWIG_OK;
1750 }
1751 lua_pop(L,1); /* remove value */
1752
1753 lua_pop(L,1); /* remove metatable */
1754 /* Search among bases */
1755 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1756 if(ret)
1757 assert(*ret == 0);
1758 assert(lua_gettop(L) == substack_start + 3);
1759 return bases_search_result;
1760}
1761
1762/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1763 * handles return values.
1764 */
1766{
1767/* There should be 3 params passed in
1768 (1) table (not the meta table)
1769 (2) string name of the attribute
1770 (3) any for the new value
1771 */
1772 int ret = 0;
1773 int result;
1774 swig_lua_userdata *usr;
1776 assert(lua_isuserdata(L,1));
1777 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1778 type = usr->type;
1779 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1780 if(result != SWIG_OK) {
1781 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1782 lua_error(L);
1783 } else {
1784 assert(ret==0);
1785 }
1786 return 0;
1787}
1788
1789/* the class.destruct method called by the interpreter */
1791{
1792/* there should be 1 params passed in
1793 (1) userdata (not the meta table) */
1794 swig_lua_userdata *usr;
1795 swig_lua_class *clss;
1796 assert(lua_isuserdata(L,-1)); /* just in case */
1797 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1798 /* if must be destroyed & has a destructor */
1799 if (usr->own) /* if must be destroyed */
1800 {
1801 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1802 if (clss && clss->destructor) /* there is a destroy fn */
1803 {
1804 clss->destructor(usr->ptr); /* bye bye */
1805 }
1806 }
1807 return 0;
1808}
1809
1810/* the class.__tostring method called by the interpreter and print */
1812{
1813/* there should be 1 param passed in
1814 (1) userdata (not the metatable) */
1815 swig_lua_userdata* userData;
1816 assert(lua_isuserdata(L,1)); /* just in case */
1817 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1818
1819 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1820 return 1;
1821}
1822
1823/* to manually disown some userdata */
1825{
1826/* there should be 1 params passed in
1827 (1) userdata (not the meta table) */
1828 swig_lua_userdata *usr;
1829 assert(lua_isuserdata(L,-1)); /* just in case */
1830 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1831
1832 usr->own = 0; /* clear our ownership */
1833 return 0;
1834}
1835
1836/* lua callable function to compare userdata's value
1837the issue is that two userdata may point to the same thing
1838but to lua, they are different objects */
1840{
1841 int result;
1842 swig_lua_userdata *usr1,*usr2;
1843 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1844 return 0; /* nil reply */
1845 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1846 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1847 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1848 result=(usr1->ptr==usr2->ptr);
1849 lua_pushboolean(L,result);
1850 return 1;
1851}
1852
1853/* populate table at the top of the stack with metamethods that ought to be inherited */
1855{
1856 SWIG_Lua_add_boolean(L, "__add", 1);
1857 SWIG_Lua_add_boolean(L, "__sub", 1);
1858 SWIG_Lua_add_boolean(L, "__mul", 1);
1859 SWIG_Lua_add_boolean(L, "__div", 1);
1860 SWIG_Lua_add_boolean(L, "__mod", 1);
1861 SWIG_Lua_add_boolean(L, "__pow", 1);
1862 SWIG_Lua_add_boolean(L, "__unm", 1);
1863 SWIG_Lua_add_boolean(L, "__len", 1 );
1864 SWIG_Lua_add_boolean(L, "__concat", 1 );
1865 SWIG_Lua_add_boolean(L, "__eq", 1);
1866 SWIG_Lua_add_boolean(L, "__lt", 1);
1867 SWIG_Lua_add_boolean(L, "__le", 1);
1868 SWIG_Lua_add_boolean(L, "__call", 1);
1869 SWIG_Lua_add_boolean(L, "__tostring", 1);
1870 SWIG_Lua_add_boolean(L, "__gc", 0);
1871}
1872
1873/* creates the swig registry */
1875{
1876 /* create main SWIG registry table */
1877 lua_pushstring(L,"SWIG");
1878 lua_newtable(L);
1879 /* populate it with some predefined data */
1880
1881 /* .library table. Placeholder */
1882 lua_pushstring(L,".library");
1883 lua_newtable(L);
1884 {
1885 /* list of metamethods that class inherits from its bases */
1886 lua_pushstring(L,"inheritable_metamethods");
1887 lua_newtable(L);
1888 /* populate with list of metamethods */
1890 lua_rawset(L,-3);
1891 }
1892 lua_rawset(L,-3);
1893
1894 lua_rawset(L,LUA_REGISTRYINDEX);
1895}
1896
1897/* gets the swig registry (or creates it) */
1899{
1900 /* add this all into the swig registry: */
1901 lua_pushstring(L,"SWIG");
1902 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1903 if (!lua_istable(L,-1)) /* not there */
1904 { /* must be first time, so add it */
1905 lua_pop(L,1); /* remove the result */
1907 /* then get it */
1908 lua_pushstring(L,"SWIG");
1909 lua_rawget(L,LUA_REGISTRYINDEX);
1910 }
1911}
1912
1914{
1916 lua_pushstring(L, ".library");
1917 lua_rawget(L,-2);
1918 assert( !lua_isnil(L,-1) );
1919 lua_pushstring(L, "inheritable_metamethods");
1920 lua_rawget(L,-2);
1921
1922 /* Remove class registry and library table */
1923 lua_remove(L,-2);
1924 lua_remove(L,-2);
1925}
1926
1927/* Helper function to get the classes metatable from the register */
1928SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
1929{
1930 SWIG_Lua_get_class_registry(L); /* get the registry */
1931 lua_pushstring(L,cname); /* get the name */
1932 lua_rawget(L,-2); /* get it */
1933 lua_remove(L,-2); /* tidy up (remove registry) */
1934}
1935
1936/* Set up the base classes pointers.
1937Each class structure has a list of pointers to the base class structures.
1938This function fills them.
1939It cannot be done at compile time, as this will not work with hireachies
1940spread over more than one swig file.
1941Therefore it must be done at runtime, querying the SWIG type system.
1942*/
1944{
1945 int i=0;
1946 swig_module_info *module=SWIG_GetModule(L);
1947 for(i=0;clss->base_names[i];i++)
1948 {
1949 if (clss->bases[i]==0) /* not found yet */
1950 {
1951 /* lookup and cache the base class */
1952 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1953 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1954 }
1955 }
1956}
1957
1958#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1959/* Merges two tables */
1960SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
1961{
1962 /* iterating */
1963 lua_pushnil(L);
1964 while (lua_next(L,source) != 0) {
1965 /* -1 - value, -2 - index */
1966 /* have to copy to assign */
1967 lua_pushvalue(L,-2); /* copy of index */
1968 lua_pushvalue(L,-2); /* copy of value */
1969 lua_rawset(L, target);
1970 lua_pop(L,1);
1971 /* only key is left */
1972 }
1973}
1974
1975/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
1976SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
1977{
1978 /* push original[name], then base[name] */
1979 lua_pushstring(L,name);
1980 lua_rawget(L,original);
1981 int original_table = lua_gettop(L);
1982 lua_pushstring(L,name);
1983 lua_rawget(L,base);
1984 int base_table = lua_gettop(L);
1985 SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
1986 /* clearing stack */
1987 lua_pop(L,2);
1988}
1989
1990/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
1991SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
1992{
1993 /* There is one parameter - original, i.e. 'derived' class metatable */
1994 assert(lua_istable(L,-1));
1995 int original = lua_gettop(L);
1997 int base = lua_gettop(L);
1998 SWIG_Lua_merge_tables(L, ".fn", original, base );
1999 SWIG_Lua_merge_tables(L, ".set", original, base );
2000 SWIG_Lua_merge_tables(L, ".get", original, base );
2001 lua_pop(L,1);
2002}
2003
2004/* Function squashes all symbols from 'clss' bases into itself */
2005SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
2006{
2007 int i;
2009 for(i=0;clss->base_names[i];i++)
2010 {
2011 if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
2012 continue;
2013 /* Thing is: all bases are already registered. Thus they have already executed
2014 * this function. So we just need to squash them into us, because their bases
2015 * are already squashed into them. No need for recursion here!
2016 */
2017 SWIG_Lua_class_squash_base(L, clss->bases[i]);
2018 }
2019 lua_pop(L,1); /*tidy stack*/
2020}
2021#endif
2022
2023#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
2024/* helper add a variable to a registered class */
2025SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
2026{
2027 assert(lua_istable(L,-1)); /* just in case */
2028 SWIG_Lua_get_table(L,".get"); /* find the .get table */
2029 assert(lua_istable(L,-1)); /* just in case */
2030 SWIG_Lua_add_function(L,name,getFn);
2031 lua_pop(L,1); /* tidy stack (remove table) */
2032 if (setFn)
2033 {
2034 SWIG_Lua_get_table(L,".set"); /* find the .set table */
2035 assert(lua_istable(L,-1)); /* just in case */
2036 SWIG_Lua_add_function(L,name,setFn);
2037 lua_pop(L,1); /* tidy stack (remove table) */
2038 }
2039}
2040
2041/* helper to recursively add class static details (static attributes, operations and constants) */
2043{
2044 int i = 0;
2045 /* The class namespace table must be on the top of the stack */
2046 assert(lua_istable(L,-1));
2047 /* call all the base classes first: we can then override these later: */
2048 for(i=0;clss->bases[i];i++)
2049 {
2051 }
2052
2054}
2055
2056SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2057
2058/* helper to recursively add class details (attributes & operations) */
2060{
2061 int i;
2062 size_t bases_count = 0;
2063 /* Add bases to .bases table */
2064 SWIG_Lua_get_table(L,".bases");
2065 assert(lua_istable(L,-1)); /* just in case */
2066 for(i=0;clss->bases[i];i++)
2067 {
2069 /* Base class must be already registered */
2070 assert(lua_istable(L,-1));
2071 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2072 bases_count++;
2073 }
2074 assert(lua_rawlen(L,-1) == bases_count);
2075 lua_pop(L,1); /* remove .bases table */
2076 /* add attributes */
2077 for(i=0;clss->attributes[i].name;i++){
2079 }
2080 /* add methods to the metatable */
2081 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2082 assert(lua_istable(L,-1)); /* just in case */
2083 for(i=0;clss->methods[i].name;i++){
2084 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2085 }
2086 lua_pop(L,1); /* tidy stack (remove table) */
2087 /* add operator overloads
2088 This adds methods from metatable array to metatable. Can mess up garbage
2089 collectind if someone defines __gc method
2090 */
2091 if(clss->metatable) {
2092 for(i=0;clss->metatable[i].name;i++) {
2093 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2094 }
2095 }
2096
2097#if !defined(SWIG_LUA_SQUASH_BASES)
2098 /* Adding metamethods that are defined in base classes. If bases were squashed
2099 * then it is obviously unnecessary
2100 */
2102#endif
2103}
2104
2105/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2106 for the following issue: Lua runtime checks for metamethod existence with rawget function
2107 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2108 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2109 in metatable and not in object).
2110 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2111 are automatically given a special proxy __x that calls the real __x method.
2112 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2113 those changes must be reflected in all descendants.
2114*/
2115
2116SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2117
2118/* The real function that resolves a metamethod.
2119 * Function searches given class and all its bases (recursively) for first instance of something that is
2120 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
2121 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2122 * answer.
2123 * Returns 1 if found, 0 otherwise.
2124 * clss is class which metatable we will search for method
2125 * metamethod_name_idx is index in L where metamethod name (as string) lies
2126 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
2127 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2128 * SWIG_Lua_resolve_metamethod
2129 * */
2130SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2131 int skip_check)
2132{
2133 /* This function is called recursively */
2134 int result = 0;
2135 int i = 0;
2136
2137 if (!skip_check) {
2139 lua_pushvalue(L, metamethod_name_idx);
2140 lua_rawget(L,-2);
2141 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2142 * this isn't the function we are looking for :)
2143 * lua_tocfunction will return NULL if not cfunction
2144 */
2145 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2146 lua_remove(L,-2); /* removing class metatable */
2147 return 1;
2148 }
2149 lua_pop(L,2); /* remove class metatable and query result */
2150 }
2151
2152 /* Forwarding calls to bases */
2153 for(i=0;clss->bases[i];i++)
2154 {
2155 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2156 if (result)
2157 break;
2158 }
2159
2160 return result;
2161}
2162
2163/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2164 * and calls it */
2166{
2167 int numargs;
2168 int metamethod_name_idx;
2169 const swig_lua_class* clss;
2170 int result;
2171
2172 lua_checkstack(L,5);
2173 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2174
2175 /* Get upvalues from closure */
2176 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2177 metamethod_name_idx = lua_gettop(L);
2178
2179 lua_pushvalue(L, lua_upvalueindex(2));
2180 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2181 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2182
2183 /* Actual work */
2184 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2185 if (!result) {
2186 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2187 lua_error(L);
2188 return 0;
2189 }
2190
2191 lua_remove(L,-2); /* remove metamethod key */
2192 lua_insert(L,1); /* move function to correct position */
2193 lua_call(L, numargs, LUA_MULTRET);
2194 return lua_gettop(L); /* return all results */
2195}
2196
2197
2198/* If given metamethod must be present in given class, then creates appropriate proxy
2199 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2200 * if method is defined in the class metatable itself
2201 */
2202SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2203{
2204 int key_index;
2205 int success = 0;
2206 int i = 0;
2207
2208 /* metamethod name - on the top of the stack */
2209 assert(lua_isstring(L,-1));
2210
2211 key_index = lua_gettop(L);
2212
2213 /* Check whether method is already defined in metatable */
2214 lua_pushvalue(L,key_index); /* copy of the key */
2215 lua_gettable(L,metatable_index);
2216 if( !lua_isnil(L,-1) ) {
2217 lua_pop(L,1);
2218 return -1;
2219 }
2220 lua_pop(L,1);
2221
2222 /* Iterating over immediate bases */
2223 for(i=0;clss->bases[i];i++)
2224 {
2225 const swig_lua_class *base = clss->bases[i];
2227 lua_pushvalue(L, key_index);
2228 lua_rawget(L, -2);
2229 if( !lua_isnil(L,-1) ) {
2230 lua_pushvalue(L, key_index);
2231
2232 /* Add proxy function */
2233 lua_pushvalue(L, key_index); /* first closure value is function name */
2234 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2235 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2236
2237 lua_rawset(L, metatable_index);
2238 success = 1;
2239 }
2240 lua_pop(L,1); /* remove function or nil */
2241 lua_pop(L,1); /* remove base class metatable */
2242
2243 if( success )
2244 break;
2245 }
2246
2247 return success;
2248}
2249
2251{
2252 int metatable_index;
2253 int metamethods_info_index;
2254 int tostring_undefined;
2255 int eq_undefined = 0;
2256
2258 metatable_index = lua_gettop(L);
2260 assert(lua_istable(L,-1));
2261 metamethods_info_index = lua_gettop(L);
2262 lua_pushnil(L); /* first key */
2263 while(lua_next(L, metamethods_info_index) != 0 ) {
2264 /* key at index -2, value at index -1 */
2265 const int is_inheritable = lua_toboolean(L,-2);
2266 lua_pop(L,1); /* remove value - we don't need it anymore */
2267
2268 if(is_inheritable) { /* if metamethod is inheritable */
2269 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2270 }
2271 }
2272
2273 lua_pop(L,1); /* remove inheritable metamethods table */
2274
2275 /* Special handling for __tostring method */
2276 lua_pushstring(L, "__tostring");
2277 lua_pushvalue(L,-1);
2278 lua_rawget(L,metatable_index);
2279 tostring_undefined = lua_isnil(L,-1);
2280 lua_pop(L,1);
2281 if( tostring_undefined ) {
2282 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2283 lua_rawset(L, metatable_index);
2284 } else {
2285 lua_pop(L,1); /* remove copy of the key */
2286 }
2287
2288 /* Special handling for __eq method */
2289 lua_pushstring(L, "__eq");
2290 lua_pushvalue(L,-1);
2291 lua_rawget(L,metatable_index);
2292 eq_undefined = lua_isnil(L,-1);
2293 lua_pop(L,1);
2294 if( eq_undefined ) {
2295 lua_pushcfunction(L, SWIG_Lua_class_equal);
2296 lua_rawset(L, metatable_index);
2297 } else {
2298 lua_pop(L,1); /* remove copy of the key */
2299 }
2300 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2301 * a __getitem/__setitem method should be defined
2302 */
2303 lua_pop(L,1); /* pop class metatable */
2304}
2305
2306/* Register class static methods,attributes etc as well as constructor proxy */
2308{
2309 const int SWIGUNUSED begin = lua_gettop(L);
2310 lua_checkstack(L,5); /* just in case */
2311 assert(lua_istable(L,-1)); /* just in case */
2312 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2313
2315
2316 assert(lua_istable(L,-1)); /* just in case */
2317
2318 /* add its constructor to module with the name of the class
2319 so you can do MyClass(...) as well as new_MyClass(...)
2320 BUT only if a constructor is defined
2321 (this overcomes the problem of pure virtual classes without constructors)*/
2322 if (clss->constructor)
2323 {
2324 lua_getmetatable(L,-1);
2325 assert(lua_istable(L,-1)); /* just in case */
2326 SWIG_Lua_add_function(L,"__call", clss->constructor);
2327 lua_pop(L,1);
2328 }
2329
2330 assert(lua_istable(L,-1)); /* just in case */
2332
2333 /* clear stack */
2334 lua_pop(L,1);
2335 assert( lua_gettop(L) == begin );
2336}
2337
2338/* Performs the instance (non-static) class registration process. Metatable for class is created
2339 * and added to the class registry.
2340 */
2342{
2343 const int SWIGUNUSED begin = lua_gettop(L);
2344 int i;
2345 /* if name already there (class is already registered) then do nothing */
2346 SWIG_Lua_get_class_registry(L); /* get the registry */
2347 lua_pushstring(L,clss->fqname); /* get the name */
2348 lua_rawget(L,-2);
2349 if(!lua_isnil(L,-1)) {
2350 lua_pop(L,2);
2351 assert(lua_gettop(L)==begin);
2352 return;
2353 }
2354 lua_pop(L,2); /* tidy stack */
2355 /* Recursively initialize all bases */
2356 for(i=0;clss->bases[i];i++)
2357 {
2359 }
2360 /* Again, get registry and push name */
2361 SWIG_Lua_get_class_registry(L); /* get the registry */
2362 lua_pushstring(L,clss->fqname); /* get the name */
2363 lua_newtable(L); /* create the metatable */
2364#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2365 /* If squashing is requested, then merges all bases metatable into this one.
2366 * It would get us all special methods: __getitem, __add etc.
2367 * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
2368 */
2369 {
2370 int new_metatable_index = lua_absindex(L,-1);
2371 for(i=0;clss->bases[i];i++)
2372 {
2373 int base_metatable;
2375 base_metatable = lua_absindex(L,-1);
2376 SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
2377 lua_pop(L,1);
2378 }
2379 }
2380 /* And now we will overwrite all incorrectly set data */
2381#endif
2382 /* add string of class name called ".type" */
2383 lua_pushstring(L,".type");
2384 lua_pushstring(L,clss->fqname);
2385 lua_rawset(L,-3);
2386 /* add a table called bases */
2387 lua_pushstring(L,".bases");
2388 lua_newtable(L);
2389 lua_rawset(L,-3);
2390 /* add a table called ".get" */
2391 lua_pushstring(L,".get");
2392 lua_newtable(L);
2393 lua_rawset(L,-3);
2394 /* add a table called ".set" */
2395 lua_pushstring(L,".set");
2396 lua_newtable(L);
2397 lua_rawset(L,-3);
2398 /* add a table called ".fn" */
2399 lua_pushstring(L,".fn");
2400 lua_newtable(L);
2401 /* add manual disown method */
2403 lua_rawset(L,-3);
2404 /* add accessor fns for using the .get,.set&.fn */
2408 /* add it */
2409 lua_rawset(L,-3); /* metatable into registry */
2410 lua_pop(L,1); /* tidy stack (remove registry) */
2411 assert(lua_gettop(L) == begin);
2412
2413#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2414 /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
2415 SWIG_Lua_class_squash_bases(L,clss);
2416#endif
2418 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2419 lua_pop(L,1); /* tidy stack (remove class metatable) */
2420 assert( lua_gettop(L) == begin );
2421}
2422
2424{
2425 int SWIGUNUSED begin;
2426 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2429
2430 /* Add links from static part to instance part and vice versa */
2431 /* [SWIG registry] [Module]
2432 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2433 * ".get" ----> ... | | getmetatable()----|
2434 * ".set" ----> ... | | |
2435 * ".static" --------------)----------------/ [static part metatable]
2436 * | ".get" --> ...
2437 * | ".set" --> ....
2438 * |=============================== ".instance"
2439 */
2440 begin = lua_gettop(L);
2441 lua_pushstring(L,clss->cls_static->name);
2442 lua_rawget(L,-2); /* get class static table */
2443 assert(lua_istable(L,-1));
2444 lua_getmetatable(L,-1);
2445 assert(lua_istable(L,-1)); /* get class static metatable */
2446 lua_pushstring(L,".instance"); /* prepare key */
2447
2448 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2449 assert(lua_istable(L,-1));
2450 lua_pushstring(L,".static"); /* prepare key */
2451 lua_pushvalue(L, -4); /* push static class TABLE */
2452 assert(lua_istable(L,-1));
2453 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2454 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2455 lua_pop(L,2);
2456 assert(lua_gettop(L) == begin);
2457}
2458#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2459
2460#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2462{
2463 const int SWIGUNUSED begin = lua_gettop(L);
2464 int i;
2465 /* if name already there (class is already registered) then do nothing */
2466 SWIG_Lua_get_class_registry(L); /* get the registry */
2467 lua_pushstring(L,clss->fqname); /* get the name */
2468 lua_rawget(L,-2);
2469 if(!lua_isnil(L,-1)) {
2470 lua_pop(L,2);
2471 assert(lua_gettop(L)==begin);
2472 return;
2473 }
2474 lua_pop(L,2); /* tidy stack */
2475 /* Recursively initialize all bases */
2476 for(i=0;clss->bases[i];i++)
2477 {
2479 }
2480 /* Again, get registry and push name */
2481 SWIG_Lua_get_class_registry(L); /* get the registry */
2482 lua_pushstring(L,clss->fqname); /* get the name */
2483 assert(clss->metatable);
2484 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2485 lua_rawset(L,-3);
2486 lua_pop(L,1);
2487 assert(lua_gettop(L) == begin);
2488}
2489#endif /* elua && eluac */
2490
2491/* -----------------------------------------------------------------------------
2492 * Class/structure conversion fns
2493 * ----------------------------------------------------------------------------- */
2494
2495/* helper to add metatable to new lua object */
2497{
2498 if (type->clientdata) /* there is clientdata: so add the metatable */
2499 {
2500 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname);
2501 if (lua_istable(L,-1))
2502 {
2503 lua_setmetatable(L,-2);
2504 }
2505 else
2506 {
2507 lua_pop(L,1);
2508 }
2509 }
2510}
2511
2512/* pushes a new object into the lua stack */
2513SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2514{
2515 swig_lua_userdata *usr;
2516 if (!ptr){
2517 lua_pushnil(L);
2518 return;
2519 }
2520 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2521 usr->ptr=ptr; /* set the ptr */
2522 usr->type=type;
2523 usr->own=own;
2524#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2525 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2526#endif
2527}
2528
2529/* takes a object from the lua stack & converts it into an object of the correct type
2530 (if possible) */
2531SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2532{
2533 int ret = SWIG_ERROR;
2534 swig_lua_userdata *usr;
2535 swig_cast_info *cast;
2536 /* special case: lua nil => NULL pointer */
2537 if (lua_isnil(L,index))
2538 {
2539 *ptr=0;
2541 }
2542 if (lua_islightuserdata(L,index))
2543 {
2544 *ptr=lua_touserdata(L,index);
2546 }
2547 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2548 if (usr)
2549 {
2550 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2551 {
2553 }
2554 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2555 {
2556 usr->own = 0;
2557 }
2558 if (!type) /* special cast void*, no casting fn */
2559 {
2560 *ptr=usr->ptr;
2561 ret = SWIG_OK;
2562 }
2563 else
2564 {
2565 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2566 if (cast)
2567 {
2568 int newmemory = 0;
2569 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2570 assert(!newmemory); /* newmemory handling not yet implemented */
2571 ret = SWIG_OK;
2572 }
2573 }
2574 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2575 {
2576 usr->ptr = 0;
2577 }
2578 }
2579 return ret;
2580}
2581
2583 int argnum,const char *func_name){
2584 void *result = 0;
2585 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2586 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2587 func_name,(type && type->str)?type->str:"void*",argnum);
2588 }
2589 return result;
2590}
2591
2592/* pushes a packed userdata. user for member fn pointers only */
2593SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2594{
2595 swig_lua_rawdata *raw;
2596 assert(ptr); /* not acceptable to pass in a NULL value */
2597 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2598 raw->type=type;
2599 raw->own=0;
2600 memcpy(raw->data,ptr,size); /* copy the data */
2601 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2602}
2603
2604/* converts a packed userdata. user for member fn pointers only */
2605SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2606{
2607 swig_lua_rawdata *raw;
2608 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2609 if (!raw) return SWIG_ERROR; /* error */
2610 if (type==0 || type==raw->type) /* void* or identical type */
2611 {
2612 memcpy(ptr,raw->data,size); /* copy it */
2613 return SWIG_OK; /* ok */
2614 }
2615 return SWIG_ERROR; /* error */
2616}
2617
2618/* a function to get the typestring of a piece of data */
2619SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2620{
2621 swig_lua_userdata *usr;
2622 if (lua_isuserdata(L,tp))
2623 {
2624 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2625 if (usr && usr->type && usr->type->str)
2626 return usr->type->str;
2627 return "userdata (unknown type)";
2628 }
2629 return lua_typename(L,lua_type(L,tp));
2630}
2631
2632/* lua callable function to get the userdata's type */
2634{
2635 lua_pushstring(L,SWIG_Lua_typename(L,1));
2636 return 1;
2637}
2638
2639/* -----------------------------------------------------------------------------
2640 * global variable support code: class/struct typemap functions
2641 * ----------------------------------------------------------------------------- */
2642
2643#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2644/* Install Constants */
2645SWIGINTERN void
2646SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]) {
2647 int i;
2648 for (i = 0; constants[i].type; i++) {
2649 switch(constants[i].type) {
2650 case SWIG_LUA_INT:
2651 lua_pushstring(L,constants[i].name);
2652 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2653 lua_rawset(L,-3);
2654 break;
2655 case SWIG_LUA_FLOAT:
2656 lua_pushstring(L,constants[i].name);
2657 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2658 lua_rawset(L,-3);
2659 break;
2660 case SWIG_LUA_CHAR:
2661 lua_pushstring(L,constants[i].name);
2662 {
2663 char c = (char)constants[i].lvalue;
2664 lua_pushlstring(L,&c,1);
2665 }
2666 lua_rawset(L,-3);
2667 break;
2668 case SWIG_LUA_STRING:
2669 lua_pushstring(L,constants[i].name);
2670 lua_pushstring(L,(char *) constants[i].pvalue);
2671 lua_rawset(L,-3);
2672 break;
2673 case SWIG_LUA_POINTER:
2674 lua_pushstring(L,constants[i].name);
2675 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2676 lua_rawset(L,-3);
2677 break;
2678 case SWIG_LUA_BINARY:
2679 lua_pushstring(L,constants[i].name);
2680 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2681 lua_rawset(L,-3);
2682 break;
2683 default:
2684 break;
2685 }
2686 }
2687}
2688#endif
2689
2690/* -----------------------------------------------------------------------------
2691 * executing lua code from within the wrapper
2692 * ----------------------------------------------------------------------------- */
2693
2694#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2695#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2696#endif
2697/* Executes a C string in Lua which is a really simple way of calling lua from C
2698Unfortunately lua keeps changing its APIs, so we need a conditional compile
2699In lua 5.0.X it's lua_dostring()
2700In lua 5.1.X it's luaL_dostring()
2701*/
2702SWIGINTERN int
2703SWIG_Lua_dostring(lua_State *L, const char *str) {
2704 int ok,top;
2705 if (str==0 || str[0]==0) return 0; /* nothing to do */
2706 top=lua_gettop(L); /* save stack */
2707#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
2708 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
2709#else
2710 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
2711#endif
2712 if (ok!=0) {
2713 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2714 }
2715 lua_settop(L,top); /* restore the stack */
2716 return ok;
2717}
2718
2719#ifdef __cplusplus
2720}
2721#endif
2722
2723/* ------------------------------ end luarun.swg ------------------------------ */
2724
2725
2726/* -------- TYPES TABLE (BEGIN) -------- */
2727
2728#define SWIGTYPE_p_Agedge_t swig_types[0]
2729#define SWIGTYPE_p_Agnode_t swig_types[1]
2730#define SWIGTYPE_p_Agraph_t swig_types[2]
2731#define SWIGTYPE_p_Agsym_t swig_types[3]
2732#define SWIGTYPE_p_FILE swig_types[4]
2734static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
2735#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2736#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2737
2738/* -------- TYPES TABLE (END) -------- */
2739
2740#define SWIG_name "gv"
2741#define SWIG_init luaopen_gv
2742#define SWIG_init_user luaopen_gv_user
2743
2744#define SWIG_LUACODE luaopen_gv_luacode
2745
2746#ifdef __cplusplus
2747#include <utility>
2748/* SwigValueWrapper is described in swig.swg */
2749template<typename T> class SwigValueWrapper {
2750 struct SwigSmartPointer {
2751 T *ptr;
2752 SwigSmartPointer(T *p) : ptr(p) { }
2753 ~SwigSmartPointer() { delete ptr; }
2754 SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
2755 void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
2756 } pointer;
2757 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
2758 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
2759public:
2760 SwigValueWrapper() : pointer(0) { }
2761 SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
2762#if __cplusplus >=201103L
2763 SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
2764 operator T&&() const { return std::move(*pointer.ptr); }
2765#else
2766 operator T&() const { return *pointer.ptr; }
2767#endif
2768 T *operator&() const { return pointer.ptr; }
2769 static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
2770};
2771
2772/*
2773 * SwigValueInit() is a generic initialisation solution as the following approach:
2774 *
2775 * T c_result = T();
2776 *
2777 * doesn't compile for all types for example:
2778 *
2779 * unsigned int c_result = unsigned int();
2780 */
2781template <typename T> T SwigValueInit() {
2782 return T();
2783}
2784
2785#if __cplusplus >=201103L
2786# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
2787#else
2788# define SWIG_STD_MOVE(OBJ) OBJ
2789#endif
2790
2791#endif
2792
2793
2794namespace swig {
2795typedef struct{} LANGUAGE_OBJ;
2796}
2797
2798
2799#include <gvc/gvc.h>
2800
2802/*** New empty graph */
2803extern Agraph_t *graph(char *name);
2804extern Agraph_t *digraph(char *name);
2805extern Agraph_t *strictgraph(char *name);
2806extern Agraph_t *strictdigraph(char *name);
2807/*** New graph from a dot-syntax string or file */
2808extern Agraph_t *readstring(char *string);
2809extern Agraph_t *read(const char *filename);
2810extern Agraph_t *read(FILE *f);
2811/*** Add new subgraph to existing graph */
2812extern Agraph_t *graph(Agraph_t *g, char *name);
2813
2815/*** Add new node to existing graph */
2816extern Agnode_t *node(Agraph_t *g, char *name);
2817
2819/*** Add new edge between existing nodes */
2820extern Agedge_t *edge(Agnode_t *t, Agnode_t *h);
2821/*** Add a new edge between an existing tail node, and a named head node which will be induced in the graph if it doesn't already exist */
2822extern Agedge_t *edge(Agnode_t *t, char *hname);
2823/*** Add a new edge between an existing head node, and a named tail node which will be induced in the graph if it doesn't already exist */
2824extern Agedge_t *edge(char *tname, Agnode_t *h);
2825/*** Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist */
2826extern Agedge_t *edge(Agraph_t *g, char *tname, char *hname);
2827
2829/*** Set value of named attribute of graph/node/edge - creating attribute if necessary */
2830extern char *setv(Agraph_t *g, char *attr, char *val);
2831extern char *setv(Agnode_t *n, char *attr, char *val);
2832extern char *setv(Agedge_t *e, char *attr, char *val);
2833
2834/*** Set value of existing attribute of graph/node/edge (using attribute handle) */
2835extern char *setv(Agraph_t *g, Agsym_t *a, char *val);
2836extern char *setv(Agnode_t *n, Agsym_t *a, char *val);
2837extern char *setv(Agedge_t *e, Agsym_t *a, char *val);
2838
2840/*** Get value of named attribute of graph/node/edge */
2841extern char *getv(Agraph_t *g, char *attr);
2842extern char *getv(Agnode_t *n, char *attr);
2843extern char *getv(Agedge_t *e, char *attr);
2844
2845/*** Get value of attribute of graph/node/edge (using attribute handle) */
2846extern char *getv(Agraph_t *g, Agsym_t *a);
2847extern char *getv(Agnode_t *n, Agsym_t *a);
2848extern char *getv(Agedge_t *e, Agsym_t *a);
2849
2851extern char *nameof(Agraph_t *g);
2852extern char *nameof(Agnode_t *n);
2853extern char *nameof(Agsym_t *a);
2854
2856extern Agraph_t *findsubg(Agraph_t *g, char *name);
2857extern Agnode_t *findnode(Agraph_t *g, char *name);
2858extern Agedge_t *findedge(Agnode_t *t, Agnode_t *h);
2859
2861extern Agsym_t *findattr(Agraph_t *g, char *name);
2862extern Agsym_t *findattr(Agnode_t *n, char *name);
2863extern Agsym_t *findattr(Agedge_t *e, char *name);
2864
2866extern Agnode_t *headof(Agedge_t *e);
2867extern Agnode_t *tailof(Agedge_t *e);
2868extern Agraph_t *graphof(Agraph_t *g);
2869extern Agraph_t *graphof(Agedge_t *e);
2870extern Agraph_t *graphof(Agnode_t *n);
2871extern Agraph_t *rootof(Agraph_t *g);
2872
2874extern Agnode_t *protonode(Agraph_t *g);
2875extern Agedge_t *protoedge(Agraph_t *g);
2876
2878/*** Iteration termination tests */
2879extern bool ok(Agraph_t *g);
2880extern bool ok(Agnode_t *n);
2881extern bool ok(Agedge_t *e);
2882extern bool ok(Agsym_t *a);
2883
2884/*** Iterate over subgraphs of a graph */
2885extern Agraph_t *firstsubg(Agraph_t *g);
2886extern Agraph_t *nextsubg(Agraph_t *g, Agraph_t *sg);
2887
2888/*** Iterate over supergraphs of a graph (obscure and rarely useful) */
2889extern Agraph_t *firstsupg(Agraph_t *g);
2890extern Agraph_t *nextsupg(Agraph_t *g, Agraph_t *sg);
2891
2892/*** Iterate over edges of a graph */
2893extern Agedge_t *firstedge(Agraph_t *g);
2894extern Agedge_t *nextedge(Agraph_t *g, Agedge_t *e);
2895
2896/*** Iterate over outedges of a graph */
2897extern Agedge_t *firstout(Agraph_t *g);
2898extern Agedge_t *nextout(Agraph_t *g, Agedge_t *e);
2899
2900/*** Iterate over edges of a node */
2901extern Agedge_t *firstedge(Agnode_t *n);
2902extern Agedge_t *nextedge(Agnode_t *n, Agedge_t *e);
2903
2904/*** Iterate over out-edges of a node */
2905extern Agedge_t *firstout(Agnode_t *n);
2906extern Agedge_t *nextout(Agnode_t *n, Agedge_t *e);
2907
2908/*** Iterate over head nodes reachable from out-edges of a node */
2909extern Agnode_t *firsthead(Agnode_t *n);
2910extern Agnode_t *nexthead(Agnode_t *n, Agnode_t *h);
2911
2912/*** Iterate over in-edges of a graph */
2913extern Agedge_t *firstin(Agraph_t *g);
2914extern Agedge_t *nextin(Agnode_t *n, Agedge_t *e);
2915
2916/*** Iterate over in-edges of a node */
2917extern Agedge_t *firstin(Agnode_t *n);
2918extern Agedge_t *nextin(Agraph_t *g, Agedge_t *e);
2919
2920/*** Iterate over tail nodes reachable from in-edges of a node */
2921extern Agnode_t *firsttail(Agnode_t *n);
2922extern Agnode_t *nexttail(Agnode_t *n, Agnode_t *t);
2923
2924/*** Iterate over nodes of a graph */
2925extern Agnode_t *firstnode(Agraph_t *g);
2926extern Agnode_t *nextnode(Agraph_t *g, Agnode_t *n);
2927
2928/*** Iterate over nodes of an edge */
2929extern Agnode_t *firstnode(Agedge_t *e);
2930extern Agnode_t *nextnode(Agedge_t *e, Agnode_t *n);
2931
2932/*** Iterate over attributes of a graph */
2933extern Agsym_t *firstattr(Agraph_t *g);
2934extern Agsym_t *nextattr(Agraph_t *g, Agsym_t *a);
2935
2936/*** Iterate over attributes of an edge */
2937extern Agsym_t *firstattr(Agedge_t *e);
2938extern Agsym_t *nextattr(Agedge_t *e, Agsym_t *a);
2939
2940/*** Iterate over attributes of a node */
2941extern Agsym_t *firstattr(Agnode_t *n);
2942extern Agsym_t *nextattr(Agnode_t *n, Agsym_t *a);
2943
2945extern bool rm(Agraph_t *g);
2946extern bool rm(Agnode_t *n);
2947extern bool rm(Agedge_t *e);
2948
2950/*** Annotate a graph with layout attributes and values using a specific layout engine */
2951extern bool layout(Agraph_t *g, const char *engine);
2952
2954/*** Render a layout into attributes of the graph */
2955extern bool render(Agraph_t *g);
2956/*** Render a layout to stdout */
2957extern bool render(Agraph_t *g, const char *format);
2958/*** Render to an open file */
2959extern bool render(Agraph_t *g, const char *format, FILE *fout);
2960/*** Render a layout to an unopened file by name */
2961extern bool render(Agraph_t *g, const char *format, const char *filename);
2962/*** Render to a string result */
2963#ifdef SWIGJAVA
2964extern char* renderresult(Agraph_t *ing, const char *format);
2965#else
2966extern void renderresult(Agraph_t *g, const char *format, char *outdata);
2967/*** Render to an open channel */
2968extern bool renderchannel(Agraph_t *g, const char *format, const char *channelname);
2969#endif
2970/*** Render a layout to a malloc'ed string, to be free'd by the caller */
2971/*** (deprecated - too easy to leak memory) */
2972/*** (still needed for "eval [gv::renderdata $G tk]" ) */
2973extern char* renderdata(Agraph_t *g, const char *format);
2974
2975/*** Writing graph back to file */
2976extern bool write(Agraph_t *g, const char *filename);
2977extern bool write(Agraph_t *g, FILE *f);
2978
2979/*** Graph transformation tools */
2980extern bool tred(Agraph_t *g);
2981
2982
2983
2984SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
2985 int ret = lua_isstring(L, idx);
2986 if (!ret)
2987 ret = lua_isnil(L, idx);
2988 return ret;
2989}
2990
2991#ifdef __cplusplus
2992extern "C" {
2993#endif
2994static int _wrap_graph__SWIG_0(lua_State* L) {
2995 {
2996 int SWIG_arg = 0;
2997 char *arg1 = (char *) 0 ;
2998 Agraph_t *result = 0 ;
2999
3000 SWIG_check_num_args("graph",1,1)
3001 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("graph",1,"char *");
3002 arg1 = (char *)lua_tostring(L, 1);
3003 result = (Agraph_t *)graph(arg1);
3004 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3005 return SWIG_arg;
3006
3007 fail: SWIGUNUSED;
3008 }
3009 lua_error(L);
3010 return 0;
3011}
3012
3013
3014static int _wrap_digraph(lua_State* L) {
3015 {
3016 int SWIG_arg = 0;
3017 char *arg1 = (char *) 0 ;
3018 Agraph_t *result = 0 ;
3019
3020 SWIG_check_num_args("digraph",1,1)
3021 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("digraph",1,"char *");
3022 arg1 = (char *)lua_tostring(L, 1);
3023 result = (Agraph_t *)digraph(arg1);
3024 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3025 return SWIG_arg;
3026
3027 fail: SWIGUNUSED;
3028 }
3029 lua_error(L);
3030 return 0;
3031}
3032
3033
3034static int _wrap_strictgraph(lua_State* L) {
3035 {
3036 int SWIG_arg = 0;
3037 char *arg1 = (char *) 0 ;
3038 Agraph_t *result = 0 ;
3039
3040 SWIG_check_num_args("strictgraph",1,1)
3041 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("strictgraph",1,"char *");
3042 arg1 = (char *)lua_tostring(L, 1);
3043 result = (Agraph_t *)strictgraph(arg1);
3044 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3045 return SWIG_arg;
3046
3047 fail: SWIGUNUSED;
3048 }
3049 lua_error(L);
3050 return 0;
3051}
3052
3053
3054static int _wrap_strictdigraph(lua_State* L) {
3055 {
3056 int SWIG_arg = 0;
3057 char *arg1 = (char *) 0 ;
3058 Agraph_t *result = 0 ;
3059
3060 SWIG_check_num_args("strictdigraph",1,1)
3061 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("strictdigraph",1,"char *");
3062 arg1 = (char *)lua_tostring(L, 1);
3063 result = (Agraph_t *)strictdigraph(arg1);
3064 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3065 return SWIG_arg;
3066
3067 fail: SWIGUNUSED;
3068 }
3069 lua_error(L);
3070 return 0;
3071}
3072
3073
3074static int _wrap_readstring(lua_State* L) {
3075 {
3076 int SWIG_arg = 0;
3077 char *arg1 = (char *) 0 ;
3078 Agraph_t *result = 0 ;
3079
3080 SWIG_check_num_args("readstring",1,1)
3081 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("readstring",1,"char *");
3082 arg1 = (char *)lua_tostring(L, 1);
3083 result = (Agraph_t *)readstring(arg1);
3084 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3085 return SWIG_arg;
3086
3087 fail: SWIGUNUSED;
3088 }
3089 lua_error(L);
3090 return 0;
3091}
3092
3093
3094static int _wrap_read__SWIG_0(lua_State* L) {
3095 {
3096 int SWIG_arg = 0;
3097 char *arg1 = (char *) 0 ;
3098 Agraph_t *result = 0 ;
3099
3100 SWIG_check_num_args("read",1,1)
3101 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("read",1,"char const *");
3102 arg1 = (char *)lua_tostring(L, 1);
3103 result = (Agraph_t *)read((char const *)arg1);
3104 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3105 return SWIG_arg;
3106
3107 fail: SWIGUNUSED;
3108 }
3109 lua_error(L);
3110 return 0;
3111}
3112
3113
3114static int _wrap_read__SWIG_1(lua_State* L) {
3115 {
3116 int SWIG_arg = 0;
3117 FILE *arg1 = (FILE *) 0 ;
3118 Agraph_t *result = 0 ;
3119
3120 SWIG_check_num_args("read",1,1)
3121 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("read",1,"FILE *");
3122
3123 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FILE,0))){
3125 }
3126
3127 result = (Agraph_t *)read(arg1);
3128 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3129 return SWIG_arg;
3130
3131 fail: SWIGUNUSED;
3132 }
3133 lua_error(L);
3134 return 0;
3135}
3136
3137
3138static int _wrap_read(lua_State* L) {
3139 int argc;
3140 int argv[2]={
3141 1,2
3142 };
3143
3144 argc = lua_gettop(L);
3145 if (argc == 1) {
3146 int _v = 0;
3147 {
3148 void *ptr;
3149 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
3150 _v = 0;
3151 } else {
3152 _v = 1;
3153 }
3154 }
3155 if (_v) {
3156 return _wrap_read__SWIG_1(L);
3157 }
3158 }
3159 if (argc == 1) {
3160 int _v = 0;
3161 {
3162 _v = SWIG_lua_isnilstring(L,argv[0]);
3163 }
3164 if (_v) {
3165 return _wrap_read__SWIG_0(L);
3166 }
3167 }
3168
3169 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'read'\n"
3170 " Possible C/C++ prototypes are:\n"
3171 " read(char const *)\n"
3172 " read(FILE *)\n");
3173 lua_error(L);return 0;
3174}
3175
3176
3177static int _wrap_graph__SWIG_1(lua_State* L) {
3178 {
3179 int SWIG_arg = 0;
3180 Agraph_t *arg1 = (Agraph_t *) 0 ;
3181 char *arg2 = (char *) 0 ;
3182 Agraph_t *result = 0 ;
3183
3184 SWIG_check_num_args("graph",2,2)
3185 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graph",1,"Agraph_t *");
3186 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("graph",2,"char *");
3187
3188 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3190 }
3191
3192 arg2 = (char *)lua_tostring(L, 2);
3193 result = (Agraph_t *)graph(arg1,arg2);
3194 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3195 return SWIG_arg;
3196
3197 fail: SWIGUNUSED;
3198 }
3199 lua_error(L);
3200 return 0;
3201}
3202
3203
3204static int _wrap_graph(lua_State* L) {
3205 int argc;
3206 int argv[3]={
3207 1,2,3
3208 };
3209
3210 argc = lua_gettop(L);
3211 if (argc == 1) {
3212 int _v = 0;
3213 {
3214 _v = SWIG_lua_isnilstring(L,argv[0]);
3215 }
3216 if (_v) {
3217 return _wrap_graph__SWIG_0(L);
3218 }
3219 }
3220 if (argc == 2) {
3221 int _v = 0;
3222 {
3223 void *ptr;
3224 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3225 _v = 0;
3226 } else {
3227 _v = 1;
3228 }
3229 }
3230 if (_v) {
3231 {
3232 _v = SWIG_lua_isnilstring(L,argv[1]);
3233 }
3234 if (_v) {
3235 return _wrap_graph__SWIG_1(L);
3236 }
3237 }
3238 }
3239
3240 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'graph'\n"
3241 " Possible C/C++ prototypes are:\n"
3242 " graph(char *)\n"
3243 " graph(Agraph_t *,char *)\n");
3244 lua_error(L);return 0;
3245}
3246
3247
3248static int _wrap_node(lua_State* L) {
3249 {
3250 int SWIG_arg = 0;
3251 Agraph_t *arg1 = (Agraph_t *) 0 ;
3252 char *arg2 = (char *) 0 ;
3253 Agnode_t *result = 0 ;
3254
3255 SWIG_check_num_args("node",2,2)
3256 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("node",1,"Agraph_t *");
3257 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("node",2,"char *");
3258
3259 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3261 }
3262
3263 arg2 = (char *)lua_tostring(L, 2);
3264 result = (Agnode_t *)node(arg1,arg2);
3265 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
3266 return SWIG_arg;
3267
3268 fail: SWIGUNUSED;
3269 }
3270 lua_error(L);
3271 return 0;
3272}
3273
3274
3275static int _wrap_edge__SWIG_0(lua_State* L) {
3276 {
3277 int SWIG_arg = 0;
3278 Agnode_t *arg1 = (Agnode_t *) 0 ;
3279 Agnode_t *arg2 = (Agnode_t *) 0 ;
3280 Agedge_t *result = 0 ;
3281
3282 SWIG_check_num_args("edge",2,2)
3283 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agnode_t *");
3284 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("edge",2,"Agnode_t *");
3285
3286 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3288 }
3289
3290
3291 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
3293 }
3294
3295 result = (Agedge_t *)edge(arg1,arg2);
3296 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3297 return SWIG_arg;
3298
3299 fail: SWIGUNUSED;
3300 }
3301 lua_error(L);
3302 return 0;
3303}
3304
3305
3306static int _wrap_edge__SWIG_1(lua_State* L) {
3307 {
3308 int SWIG_arg = 0;
3309 Agnode_t *arg1 = (Agnode_t *) 0 ;
3310 char *arg2 = (char *) 0 ;
3311 Agedge_t *result = 0 ;
3312
3313 SWIG_check_num_args("edge",2,2)
3314 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agnode_t *");
3315 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("edge",2,"char *");
3316
3317 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3319 }
3320
3321 arg2 = (char *)lua_tostring(L, 2);
3322 result = (Agedge_t *)edge(arg1,arg2);
3323 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3324 return SWIG_arg;
3325
3326 fail: SWIGUNUSED;
3327 }
3328 lua_error(L);
3329 return 0;
3330}
3331
3332
3333static int _wrap_edge__SWIG_2(lua_State* L) {
3334 {
3335 int SWIG_arg = 0;
3336 char *arg1 = (char *) 0 ;
3337 Agnode_t *arg2 = (Agnode_t *) 0 ;
3338 Agedge_t *result = 0 ;
3339
3340 SWIG_check_num_args("edge",2,2)
3341 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("edge",1,"char *");
3342 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("edge",2,"Agnode_t *");
3343 arg1 = (char *)lua_tostring(L, 1);
3344
3345 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
3347 }
3348
3349 result = (Agedge_t *)edge(arg1,arg2);
3350 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3351 return SWIG_arg;
3352
3353 fail: SWIGUNUSED;
3354 }
3355 lua_error(L);
3356 return 0;
3357}
3358
3359
3360static int _wrap_edge__SWIG_3(lua_State* L) {
3361 {
3362 int SWIG_arg = 0;
3363 Agraph_t *arg1 = (Agraph_t *) 0 ;
3364 char *arg2 = (char *) 0 ;
3365 char *arg3 = (char *) 0 ;
3366 Agedge_t *result = 0 ;
3367
3368 SWIG_check_num_args("edge",3,3)
3369 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agraph_t *");
3370 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("edge",2,"char *");
3371 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("edge",3,"char *");
3372
3373 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3375 }
3376
3377 arg2 = (char *)lua_tostring(L, 2);
3378 arg3 = (char *)lua_tostring(L, 3);
3379 result = (Agedge_t *)edge(arg1,arg2,arg3);
3380 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3381 return SWIG_arg;
3382
3383 fail: SWIGUNUSED;
3384 }
3385 lua_error(L);
3386 return 0;
3387}
3388
3389
3390static int _wrap_edge(lua_State* L) {
3391 int argc;
3392 int argv[4]={
3393 1,2,3,4
3394 };
3395
3396 argc = lua_gettop(L);
3397 if (argc == 2) {
3398 int _v = 0;
3399 {
3400 void *ptr;
3401 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3402 _v = 0;
3403 } else {
3404 _v = 1;
3405 }
3406 }
3407 if (_v) {
3408 {
3409 void *ptr;
3410 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3411 _v = 0;
3412 } else {
3413 _v = 1;
3414 }
3415 }
3416 if (_v) {
3417 return _wrap_edge__SWIG_0(L);
3418 }
3419 }
3420 }
3421 if (argc == 2) {
3422 int _v = 0;
3423 {
3424 void *ptr;
3425 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3426 _v = 0;
3427 } else {
3428 _v = 1;
3429 }
3430 }
3431 if (_v) {
3432 {
3433 _v = SWIG_lua_isnilstring(L,argv[1]);
3434 }
3435 if (_v) {
3436 return _wrap_edge__SWIG_1(L);
3437 }
3438 }
3439 }
3440 if (argc == 2) {
3441 int _v = 0;
3442 {
3443 _v = SWIG_lua_isnilstring(L,argv[0]);
3444 }
3445 if (_v) {
3446 {
3447 void *ptr;
3448 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3449 _v = 0;
3450 } else {
3451 _v = 1;
3452 }
3453 }
3454 if (_v) {
3455 return _wrap_edge__SWIG_2(L);
3456 }
3457 }
3458 }
3459 if (argc == 3) {
3460 int _v = 0;
3461 {
3462 void *ptr;
3463 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3464 _v = 0;
3465 } else {
3466 _v = 1;
3467 }
3468 }
3469 if (_v) {
3470 {
3471 _v = SWIG_lua_isnilstring(L,argv[1]);
3472 }
3473 if (_v) {
3474 {
3475 _v = SWIG_lua_isnilstring(L,argv[2]);
3476 }
3477 if (_v) {
3478 return _wrap_edge__SWIG_3(L);
3479 }
3480 }
3481 }
3482 }
3483
3484 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'edge'\n"
3485 " Possible C/C++ prototypes are:\n"
3486 " edge(Agnode_t *,Agnode_t *)\n"
3487 " edge(Agnode_t *,char *)\n"
3488 " edge(char *,Agnode_t *)\n"
3489 " edge(Agraph_t *,char *,char *)\n");
3490 lua_error(L);return 0;
3491}
3492
3493
3494static int _wrap_setv__SWIG_0(lua_State* L) {
3495 {
3496 int SWIG_arg = 0;
3497 Agraph_t *arg1 = (Agraph_t *) 0 ;
3498 char *arg2 = (char *) 0 ;
3499 char *arg3 = (char *) 0 ;
3500 char *result = 0 ;
3501
3502 SWIG_check_num_args("setv",3,3)
3503 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agraph_t *");
3504 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3505 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3506
3507 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3509 }
3510
3511 arg2 = (char *)lua_tostring(L, 2);
3512 arg3 = (char *)lua_tostring(L, 3);
3513 result = (char *)setv(arg1,arg2,arg3);
3514 lua_pushstring(L,(const char *)result); SWIG_arg++;
3515 return SWIG_arg;
3516
3517 fail: SWIGUNUSED;
3518 }
3519 lua_error(L);
3520 return 0;
3521}
3522
3523
3524static int _wrap_setv__SWIG_1(lua_State* L) {
3525 {
3526 int SWIG_arg = 0;
3527 Agnode_t *arg1 = (Agnode_t *) 0 ;
3528 char *arg2 = (char *) 0 ;
3529 char *arg3 = (char *) 0 ;
3530 char *result = 0 ;
3531
3532 SWIG_check_num_args("setv",3,3)
3533 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agnode_t *");
3534 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3535 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3536
3537 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3539 }
3540
3541 arg2 = (char *)lua_tostring(L, 2);
3542 arg3 = (char *)lua_tostring(L, 3);
3543 result = (char *)setv(arg1,arg2,arg3);
3544 lua_pushstring(L,(const char *)result); SWIG_arg++;
3545 return SWIG_arg;
3546
3547 fail: SWIGUNUSED;
3548 }
3549 lua_error(L);
3550 return 0;
3551}
3552
3553
3554static int _wrap_setv__SWIG_2(lua_State* L) {
3555 {
3556 int SWIG_arg = 0;
3557 Agedge_t *arg1 = (Agedge_t *) 0 ;
3558 char *arg2 = (char *) 0 ;
3559 char *arg3 = (char *) 0 ;
3560 char *result = 0 ;
3561
3562 SWIG_check_num_args("setv",3,3)
3563 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agedge_t *");
3564 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3565 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3566
3567 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3569 }
3570
3571 arg2 = (char *)lua_tostring(L, 2);
3572 arg3 = (char *)lua_tostring(L, 3);
3573 result = (char *)setv(arg1,arg2,arg3);
3574 lua_pushstring(L,(const char *)result); SWIG_arg++;
3575 return SWIG_arg;
3576
3577 fail: SWIGUNUSED;
3578 }
3579 lua_error(L);
3580 return 0;
3581}
3582
3583
3584static int _wrap_setv__SWIG_3(lua_State* L) {
3585 {
3586 int SWIG_arg = 0;
3587 Agraph_t *arg1 = (Agraph_t *) 0 ;
3588 Agsym_t *arg2 = (Agsym_t *) 0 ;
3589 char *arg3 = (char *) 0 ;
3590 char *result = 0 ;
3591
3592 SWIG_check_num_args("setv",3,3)
3593 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agraph_t *");
3594 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3595 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3596
3597 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3599 }
3600
3601
3602 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3604 }
3605
3606 arg3 = (char *)lua_tostring(L, 3);
3607 result = (char *)setv(arg1,arg2,arg3);
3608 lua_pushstring(L,(const char *)result); SWIG_arg++;
3609 return SWIG_arg;
3610
3611 fail: SWIGUNUSED;
3612 }
3613 lua_error(L);
3614 return 0;
3615}
3616
3617
3618static int _wrap_setv__SWIG_4(lua_State* L) {
3619 {
3620 int SWIG_arg = 0;
3621 Agnode_t *arg1 = (Agnode_t *) 0 ;
3622 Agsym_t *arg2 = (Agsym_t *) 0 ;
3623 char *arg3 = (char *) 0 ;
3624 char *result = 0 ;
3625
3626 SWIG_check_num_args("setv",3,3)
3627 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agnode_t *");
3628 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3629 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3630
3631 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3633 }
3634
3635
3636 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3638 }
3639
3640 arg3 = (char *)lua_tostring(L, 3);
3641 result = (char *)setv(arg1,arg2,arg3);
3642 lua_pushstring(L,(const char *)result); SWIG_arg++;
3643 return SWIG_arg;
3644
3645 fail: SWIGUNUSED;
3646 }
3647 lua_error(L);
3648 return 0;
3649}
3650
3651
3652static int _wrap_setv__SWIG_5(lua_State* L) {
3653 {
3654 int SWIG_arg = 0;
3655 Agedge_t *arg1 = (Agedge_t *) 0 ;
3656 Agsym_t *arg2 = (Agsym_t *) 0 ;
3657 char *arg3 = (char *) 0 ;
3658 char *result = 0 ;
3659
3660 SWIG_check_num_args("setv",3,3)
3661 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agedge_t *");
3662 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3663 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3664
3665 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3667 }
3668
3669
3670 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3672 }
3673
3674 arg3 = (char *)lua_tostring(L, 3);
3675 result = (char *)setv(arg1,arg2,arg3);
3676 lua_pushstring(L,(const char *)result); SWIG_arg++;
3677 return SWIG_arg;
3678
3679 fail: SWIGUNUSED;
3680 }
3681 lua_error(L);
3682 return 0;
3683}
3684
3685
3686static int _wrap_setv(lua_State* L) {
3687 int argc;
3688 int argv[4]={
3689 1,2,3,4
3690 };
3691
3692 argc = lua_gettop(L);
3693 if (argc == 3) {
3694 int _v = 0;
3695 {
3696 void *ptr;
3697 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3698 _v = 0;
3699 } else {
3700 _v = 1;
3701 }
3702 }
3703 if (_v) {
3704 {
3705 void *ptr;
3706 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3707 _v = 0;
3708 } else {
3709 _v = 1;
3710 }
3711 }
3712 if (_v) {
3713 {
3714 _v = SWIG_lua_isnilstring(L,argv[2]);
3715 }
3716 if (_v) {
3717 return _wrap_setv__SWIG_3(L);
3718 }
3719 }
3720 }
3721 }
3722 if (argc == 3) {
3723 int _v = 0;
3724 {
3725 void *ptr;
3726 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3727 _v = 0;
3728 } else {
3729 _v = 1;
3730 }
3731 }
3732 if (_v) {
3733 {
3734 void *ptr;
3735 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3736 _v = 0;
3737 } else {
3738 _v = 1;
3739 }
3740 }
3741 if (_v) {
3742 {
3743 _v = SWIG_lua_isnilstring(L,argv[2]);
3744 }
3745 if (_v) {
3746 return _wrap_setv__SWIG_4(L);
3747 }
3748 }
3749 }
3750 }
3751 if (argc == 3) {
3752 int _v = 0;
3753 {
3754 void *ptr;
3755 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
3756 _v = 0;
3757 } else {
3758 _v = 1;
3759 }
3760 }
3761 if (_v) {
3762 {
3763 void *ptr;
3764 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3765 _v = 0;
3766 } else {
3767 _v = 1;
3768 }
3769 }
3770 if (_v) {
3771 {
3772 _v = SWIG_lua_isnilstring(L,argv[2]);
3773 }
3774 if (_v) {
3775 return _wrap_setv__SWIG_5(L);
3776 }
3777 }
3778 }
3779 }
3780 if (argc == 3) {
3781 int _v = 0;
3782 {
3783 void *ptr;
3784 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3785 _v = 0;
3786 } else {
3787 _v = 1;
3788 }
3789 }
3790 if (_v) {
3791 {
3792 _v = SWIG_lua_isnilstring(L,argv[1]);
3793 }
3794 if (_v) {
3795 {
3796 _v = SWIG_lua_isnilstring(L,argv[2]);
3797 }
3798 if (_v) {
3799 return _wrap_setv__SWIG_0(L);
3800 }
3801 }
3802 }
3803 }
3804 if (argc == 3) {
3805 int _v = 0;
3806 {
3807 void *ptr;
3808 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3809 _v = 0;
3810 } else {
3811 _v = 1;
3812 }
3813 }
3814 if (_v) {
3815 {
3816 _v = SWIG_lua_isnilstring(L,argv[1]);
3817 }
3818 if (_v) {
3819 {
3820 _v = SWIG_lua_isnilstring(L,argv[2]);
3821 }
3822 if (_v) {
3823 return _wrap_setv__SWIG_1(L);
3824 }
3825 }
3826 }
3827 }
3828 if (argc == 3) {
3829 int _v = 0;
3830 {
3831 void *ptr;
3832 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
3833 _v = 0;
3834 } else {
3835 _v = 1;
3836 }
3837 }
3838 if (_v) {
3839 {
3840 _v = SWIG_lua_isnilstring(L,argv[1]);
3841 }
3842 if (_v) {
3843 {
3844 _v = SWIG_lua_isnilstring(L,argv[2]);
3845 }
3846 if (_v) {
3847 return _wrap_setv__SWIG_2(L);
3848 }
3849 }
3850 }
3851 }
3852
3853 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'setv'\n"
3854 " Possible C/C++ prototypes are:\n"
3855 " setv(Agraph_t *,char *,char *)\n"
3856 " setv(Agnode_t *,char *,char *)\n"
3857 " setv(Agedge_t *,char *,char *)\n"
3858 " setv(Agraph_t *,Agsym_t *,char *)\n"
3859 " setv(Agnode_t *,Agsym_t *,char *)\n"
3860 " setv(Agedge_t *,Agsym_t *,char *)\n");
3861 lua_error(L);return 0;
3862}
3863
3864
3865static int _wrap_getv__SWIG_0(lua_State* L) {
3866 {
3867 int SWIG_arg = 0;
3868 Agraph_t *arg1 = (Agraph_t *) 0 ;
3869 char *arg2 = (char *) 0 ;
3870 char *result = 0 ;
3871
3872 SWIG_check_num_args("getv",2,2)
3873 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agraph_t *");
3874 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3875
3876 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3878 }
3879
3880 arg2 = (char *)lua_tostring(L, 2);
3881 result = (char *)getv(arg1,arg2);
3882 lua_pushstring(L,(const char *)result); SWIG_arg++;
3883 return SWIG_arg;
3884
3885 fail: SWIGUNUSED;
3886 }
3887 lua_error(L);
3888 return 0;
3889}
3890
3891
3892static int _wrap_getv__SWIG_1(lua_State* L) {
3893 {
3894 int SWIG_arg = 0;
3895 Agnode_t *arg1 = (Agnode_t *) 0 ;
3896 char *arg2 = (char *) 0 ;
3897 char *result = 0 ;
3898
3899 SWIG_check_num_args("getv",2,2)
3900 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agnode_t *");
3901 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3902
3903 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3905 }
3906
3907 arg2 = (char *)lua_tostring(L, 2);
3908 result = (char *)getv(arg1,arg2);
3909 lua_pushstring(L,(const char *)result); SWIG_arg++;
3910 return SWIG_arg;
3911
3912 fail: SWIGUNUSED;
3913 }
3914 lua_error(L);
3915 return 0;
3916}
3917
3918
3919static int _wrap_getv__SWIG_2(lua_State* L) {
3920 {
3921 int SWIG_arg = 0;
3922 Agedge_t *arg1 = (Agedge_t *) 0 ;
3923 char *arg2 = (char *) 0 ;
3924 char *result = 0 ;
3925
3926 SWIG_check_num_args("getv",2,2)
3927 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agedge_t *");
3928 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3929
3930 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3932 }
3933
3934 arg2 = (char *)lua_tostring(L, 2);
3935 result = (char *)getv(arg1,arg2);
3936 lua_pushstring(L,(const char *)result); SWIG_arg++;
3937 return SWIG_arg;
3938
3939 fail: SWIGUNUSED;
3940 }
3941 lua_error(L);
3942 return 0;
3943}
3944
3945
3946static int _wrap_getv__SWIG_3(lua_State* L) {
3947 {
3948 int SWIG_arg = 0;
3949 Agraph_t *arg1 = (Agraph_t *) 0 ;
3950 Agsym_t *arg2 = (Agsym_t *) 0 ;
3951 char *result = 0 ;
3952
3953 SWIG_check_num_args("getv",2,2)
3954 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agraph_t *");
3955 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
3956
3957 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3959 }
3960
3961
3962 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3964 }
3965
3966 result = (char *)getv(arg1,arg2);
3967 lua_pushstring(L,(const char *)result); SWIG_arg++;
3968 return SWIG_arg;
3969
3970 fail: SWIGUNUSED;
3971 }
3972 lua_error(L);
3973 return 0;
3974}
3975
3976
3977static int _wrap_getv__SWIG_4(lua_State* L) {
3978 {
3979 int SWIG_arg = 0;
3980 Agnode_t *arg1 = (Agnode_t *) 0 ;
3981 Agsym_t *arg2 = (Agsym_t *) 0 ;
3982 char *result = 0 ;
3983
3984 SWIG_check_num_args("getv",2,2)
3985 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agnode_t *");
3986 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
3987
3988 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3990 }
3991
3992
3993 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3995 }
3996
3997 result = (char *)getv(arg1,arg2);
3998 lua_pushstring(L,(const char *)result); SWIG_arg++;
3999 return SWIG_arg;
4000
4001 fail: SWIGUNUSED;
4002 }
4003 lua_error(L);
4004 return 0;
4005}
4006
4007
4008static int _wrap_getv__SWIG_5(lua_State* L) {
4009 {
4010 int SWIG_arg = 0;
4011 Agedge_t *arg1 = (Agedge_t *) 0 ;
4012 Agsym_t *arg2 = (Agsym_t *) 0 ;
4013 char *result = 0 ;
4014
4015 SWIG_check_num_args("getv",2,2)
4016 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agedge_t *");
4017 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
4018
4019 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4021 }
4022
4023
4024 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
4026 }
4027
4028 result = (char *)getv(arg1,arg2);
4029 lua_pushstring(L,(const char *)result); SWIG_arg++;
4030 return SWIG_arg;
4031
4032 fail: SWIGUNUSED;
4033 }
4034 lua_error(L);
4035 return 0;
4036}
4037
4038
4039static int _wrap_getv(lua_State* L) {
4040 int argc;
4041 int argv[3]={
4042 1,2,3
4043 };
4044
4045 argc = lua_gettop(L);
4046 if (argc == 2) {
4047 int _v = 0;
4048 {
4049 void *ptr;
4050 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4051 _v = 0;
4052 } else {
4053 _v = 1;
4054 }
4055 }
4056 if (_v) {
4057 {
4058 void *ptr;
4059 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4060 _v = 0;
4061 } else {
4062 _v = 1;
4063 }
4064 }
4065 if (_v) {
4066 return _wrap_getv__SWIG_3(L);
4067 }
4068 }
4069 }
4070 if (argc == 2) {
4071 int _v = 0;
4072 {
4073 void *ptr;
4074 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4075 _v = 0;
4076 } else {
4077 _v = 1;
4078 }
4079 }
4080 if (_v) {
4081 {
4082 void *ptr;
4083 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4084 _v = 0;
4085 } else {
4086 _v = 1;
4087 }
4088 }
4089 if (_v) {
4090 return _wrap_getv__SWIG_4(L);
4091 }
4092 }
4093 }
4094 if (argc == 2) {
4095 int _v = 0;
4096 {
4097 void *ptr;
4098 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4099 _v = 0;
4100 } else {
4101 _v = 1;
4102 }
4103 }
4104 if (_v) {
4105 {
4106 void *ptr;
4107 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4108 _v = 0;
4109 } else {
4110 _v = 1;
4111 }
4112 }
4113 if (_v) {
4114 return _wrap_getv__SWIG_5(L);
4115 }
4116 }
4117 }
4118 if (argc == 2) {
4119 int _v = 0;
4120 {
4121 void *ptr;
4122 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4123 _v = 0;
4124 } else {
4125 _v = 1;
4126 }
4127 }
4128 if (_v) {
4129 {
4130 _v = SWIG_lua_isnilstring(L,argv[1]);
4131 }
4132 if (_v) {
4133 return _wrap_getv__SWIG_0(L);
4134 }
4135 }
4136 }
4137 if (argc == 2) {
4138 int _v = 0;
4139 {
4140 void *ptr;
4141 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4142 _v = 0;
4143 } else {
4144 _v = 1;
4145 }
4146 }
4147 if (_v) {
4148 {
4149 _v = SWIG_lua_isnilstring(L,argv[1]);
4150 }
4151 if (_v) {
4152 return _wrap_getv__SWIG_1(L);
4153 }
4154 }
4155 }
4156 if (argc == 2) {
4157 int _v = 0;
4158 {
4159 void *ptr;
4160 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4161 _v = 0;
4162 } else {
4163 _v = 1;
4164 }
4165 }
4166 if (_v) {
4167 {
4168 _v = SWIG_lua_isnilstring(L,argv[1]);
4169 }
4170 if (_v) {
4171 return _wrap_getv__SWIG_2(L);
4172 }
4173 }
4174 }
4175
4176 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'getv'\n"
4177 " Possible C/C++ prototypes are:\n"
4178 " getv(Agraph_t *,char *)\n"
4179 " getv(Agnode_t *,char *)\n"
4180 " getv(Agedge_t *,char *)\n"
4181 " getv(Agraph_t *,Agsym_t *)\n"
4182 " getv(Agnode_t *,Agsym_t *)\n"
4183 " getv(Agedge_t *,Agsym_t *)\n");
4184 lua_error(L);return 0;
4185}
4186
4187
4188static int _wrap_nameof__SWIG_0(lua_State* L) {
4189 {
4190 int SWIG_arg = 0;
4191 Agraph_t *arg1 = (Agraph_t *) 0 ;
4192 char *result = 0 ;
4193
4194 SWIG_check_num_args("nameof",1,1)
4195 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agraph_t *");
4196
4197 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4199 }
4200
4201 result = (char *)nameof(arg1);
4202 lua_pushstring(L,(const char *)result); SWIG_arg++;
4203 return SWIG_arg;
4204
4205 fail: SWIGUNUSED;
4206 }
4207 lua_error(L);
4208 return 0;
4209}
4210
4211
4212static int _wrap_nameof__SWIG_1(lua_State* L) {
4213 {
4214 int SWIG_arg = 0;
4215 Agnode_t *arg1 = (Agnode_t *) 0 ;
4216 char *result = 0 ;
4217
4218 SWIG_check_num_args("nameof",1,1)
4219 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agnode_t *");
4220
4221 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4223 }
4224
4225 result = (char *)nameof(arg1);
4226 lua_pushstring(L,(const char *)result); SWIG_arg++;
4227 return SWIG_arg;
4228
4229 fail: SWIGUNUSED;
4230 }
4231 lua_error(L);
4232 return 0;
4233}
4234
4235
4236static int _wrap_nameof__SWIG_2(lua_State* L) {
4237 {
4238 int SWIG_arg = 0;
4239 Agsym_t *arg1 = (Agsym_t *) 0 ;
4240 char *result = 0 ;
4241
4242 SWIG_check_num_args("nameof",1,1)
4243 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agsym_t *");
4244
4245 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agsym_t,0))){
4247 }
4248
4249 result = (char *)nameof(arg1);
4250 lua_pushstring(L,(const char *)result); SWIG_arg++;
4251 return SWIG_arg;
4252
4253 fail: SWIGUNUSED;
4254 }
4255 lua_error(L);
4256 return 0;
4257}
4258
4259
4260static int _wrap_nameof(lua_State* L) {
4261 int argc;
4262 int argv[2]={
4263 1,2
4264 };
4265
4266 argc = lua_gettop(L);
4267 if (argc == 1) {
4268 int _v = 0;
4269 {
4270 void *ptr;
4271 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4272 _v = 0;
4273 } else {
4274 _v = 1;
4275 }
4276 }
4277 if (_v) {
4278 return _wrap_nameof__SWIG_0(L);
4279 }
4280 }
4281 if (argc == 1) {
4282 int _v = 0;
4283 {
4284 void *ptr;
4285 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4286 _v = 0;
4287 } else {
4288 _v = 1;
4289 }
4290 }
4291 if (_v) {
4292 return _wrap_nameof__SWIG_1(L);
4293 }
4294 }
4295 if (argc == 1) {
4296 int _v = 0;
4297 {
4298 void *ptr;
4299 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4300 _v = 0;
4301 } else {
4302 _v = 1;
4303 }
4304 }
4305 if (_v) {
4306 return _wrap_nameof__SWIG_2(L);
4307 }
4308 }
4309
4310 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nameof'\n"
4311 " Possible C/C++ prototypes are:\n"
4312 " nameof(Agraph_t *)\n"
4313 " nameof(Agnode_t *)\n"
4314 " nameof(Agsym_t *)\n");
4315 lua_error(L);return 0;
4316}
4317
4318
4319static int _wrap_findsubg(lua_State* L) {
4320 {
4321 int SWIG_arg = 0;
4322 Agraph_t *arg1 = (Agraph_t *) 0 ;
4323 char *arg2 = (char *) 0 ;
4324 Agraph_t *result = 0 ;
4325
4326 SWIG_check_num_args("findsubg",2,2)
4327 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findsubg",1,"Agraph_t *");
4328 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findsubg",2,"char *");
4329
4330 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4331 SWIG_fail_ptr("findsubg",1,SWIGTYPE_p_Agraph_t);
4332 }
4333
4334 arg2 = (char *)lua_tostring(L, 2);
4335 result = (Agraph_t *)findsubg(arg1,arg2);
4336 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4337 return SWIG_arg;
4338
4339 fail: SWIGUNUSED;
4340 }
4341 lua_error(L);
4342 return 0;
4343}
4344
4345
4346static int _wrap_findnode(lua_State* L) {
4347 {
4348 int SWIG_arg = 0;
4349 Agraph_t *arg1 = (Agraph_t *) 0 ;
4350 char *arg2 = (char *) 0 ;
4351 Agnode_t *result = 0 ;
4352
4353 SWIG_check_num_args("findnode",2,2)
4354 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findnode",1,"Agraph_t *");
4355 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findnode",2,"char *");
4356
4357 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4358 SWIG_fail_ptr("findnode",1,SWIGTYPE_p_Agraph_t);
4359 }
4360
4361 arg2 = (char *)lua_tostring(L, 2);
4362 result = (Agnode_t *)findnode(arg1,arg2);
4363 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4364 return SWIG_arg;
4365
4366 fail: SWIGUNUSED;
4367 }
4368 lua_error(L);
4369 return 0;
4370}
4371
4372
4373static int _wrap_findedge(lua_State* L) {
4374 {
4375 int SWIG_arg = 0;
4376 Agnode_t *arg1 = (Agnode_t *) 0 ;
4377 Agnode_t *arg2 = (Agnode_t *) 0 ;
4378 Agedge_t *result = 0 ;
4379
4380 SWIG_check_num_args("findedge",2,2)
4381 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findedge",1,"Agnode_t *");
4382 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("findedge",2,"Agnode_t *");
4383
4384 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4385 SWIG_fail_ptr("findedge",1,SWIGTYPE_p_Agnode_t);
4386 }
4387
4388
4389 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
4390 SWIG_fail_ptr("findedge",2,SWIGTYPE_p_Agnode_t);
4391 }
4392
4393 result = (Agedge_t *)findedge(arg1,arg2);
4394 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
4395 return SWIG_arg;
4396
4397 fail: SWIGUNUSED;
4398 }
4399 lua_error(L);
4400 return 0;
4401}
4402
4403
4404static int _wrap_findattr__SWIG_0(lua_State* L) {
4405 {
4406 int SWIG_arg = 0;
4407 Agraph_t *arg1 = (Agraph_t *) 0 ;
4408 char *arg2 = (char *) 0 ;
4409 Agsym_t *result = 0 ;
4410
4411 SWIG_check_num_args("findattr",2,2)
4412 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agraph_t *");
4413 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4414
4415 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4416 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agraph_t);
4417 }
4418
4419 arg2 = (char *)lua_tostring(L, 2);
4420 result = (Agsym_t *)findattr(arg1,arg2);
4421 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4422 return SWIG_arg;
4423
4424 fail: SWIGUNUSED;
4425 }
4426 lua_error(L);
4427 return 0;
4428}
4429
4430
4431static int _wrap_findattr__SWIG_1(lua_State* L) {
4432 {
4433 int SWIG_arg = 0;
4434 Agnode_t *arg1 = (Agnode_t *) 0 ;
4435 char *arg2 = (char *) 0 ;
4436 Agsym_t *result = 0 ;
4437
4438 SWIG_check_num_args("findattr",2,2)
4439 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agnode_t *");
4440 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4441
4442 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4443 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agnode_t);
4444 }
4445
4446 arg2 = (char *)lua_tostring(L, 2);
4447 result = (Agsym_t *)findattr(arg1,arg2);
4448 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4449 return SWIG_arg;
4450
4451 fail: SWIGUNUSED;
4452 }
4453 lua_error(L);
4454 return 0;
4455}
4456
4457
4458static int _wrap_findattr__SWIG_2(lua_State* L) {
4459 {
4460 int SWIG_arg = 0;
4461 Agedge_t *arg1 = (Agedge_t *) 0 ;
4462 char *arg2 = (char *) 0 ;
4463 Agsym_t *result = 0 ;
4464
4465 SWIG_check_num_args("findattr",2,2)
4466 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agedge_t *");
4467 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4468
4469 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4470 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agedge_t);
4471 }
4472
4473 arg2 = (char *)lua_tostring(L, 2);
4474 result = (Agsym_t *)findattr(arg1,arg2);
4475 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4476 return SWIG_arg;
4477
4478 fail: SWIGUNUSED;
4479 }
4480 lua_error(L);
4481 return 0;
4482}
4483
4484
4485static int _wrap_findattr(lua_State* L) {
4486 int argc;
4487 int argv[3]={
4488 1,2,3
4489 };
4490
4491 argc = lua_gettop(L);
4492 if (argc == 2) {
4493 int _v = 0;
4494 {
4495 void *ptr;
4496 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4497 _v = 0;
4498 } else {
4499 _v = 1;
4500 }
4501 }
4502 if (_v) {
4503 {
4504 _v = SWIG_lua_isnilstring(L,argv[1]);
4505 }
4506 if (_v) {
4507 return _wrap_findattr__SWIG_0(L);
4508 }
4509 }
4510 }
4511 if (argc == 2) {
4512 int _v = 0;
4513 {
4514 void *ptr;
4515 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4516 _v = 0;
4517 } else {
4518 _v = 1;
4519 }
4520 }
4521 if (_v) {
4522 {
4523 _v = SWIG_lua_isnilstring(L,argv[1]);
4524 }
4525 if (_v) {
4526 return _wrap_findattr__SWIG_1(L);
4527 }
4528 }
4529 }
4530 if (argc == 2) {
4531 int _v = 0;
4532 {
4533 void *ptr;
4534 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4535 _v = 0;
4536 } else {
4537 _v = 1;
4538 }
4539 }
4540 if (_v) {
4541 {
4542 _v = SWIG_lua_isnilstring(L,argv[1]);
4543 }
4544 if (_v) {
4545 return _wrap_findattr__SWIG_2(L);
4546 }
4547 }
4548 }
4549
4550 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'findattr'\n"
4551 " Possible C/C++ prototypes are:\n"
4552 " findattr(Agraph_t *,char *)\n"
4553 " findattr(Agnode_t *,char *)\n"
4554 " findattr(Agedge_t *,char *)\n");
4555 lua_error(L);return 0;
4556}
4557
4558
4559static int _wrap_headof(lua_State* L) {
4560 {
4561 int SWIG_arg = 0;
4562 Agedge_t *arg1 = (Agedge_t *) 0 ;
4563 Agnode_t *result = 0 ;
4564
4565 SWIG_check_num_args("headof",1,1)
4566 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("headof",1,"Agedge_t *");
4567
4568 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4570 }
4571
4572 result = (Agnode_t *)headof(arg1);
4573 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4574 return SWIG_arg;
4575
4576 fail: SWIGUNUSED;
4577 }
4578 lua_error(L);
4579 return 0;
4580}
4581
4582
4583static int _wrap_tailof(lua_State* L) {
4584 {
4585 int SWIG_arg = 0;
4586 Agedge_t *arg1 = (Agedge_t *) 0 ;
4587 Agnode_t *result = 0 ;
4588
4589 SWIG_check_num_args("tailof",1,1)
4590 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tailof",1,"Agedge_t *");
4591
4592 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4594 }
4595
4596 result = (Agnode_t *)tailof(arg1);
4597 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4598 return SWIG_arg;
4599
4600 fail: SWIGUNUSED;
4601 }
4602 lua_error(L);
4603 return 0;
4604}
4605
4606
4607static int _wrap_graphof__SWIG_0(lua_State* L) {
4608 {
4609 int SWIG_arg = 0;
4610 Agraph_t *arg1 = (Agraph_t *) 0 ;
4611 Agraph_t *result = 0 ;
4612
4613 SWIG_check_num_args("graphof",1,1)
4614 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agraph_t *");
4615
4616 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4618 }
4619
4620 result = (Agraph_t *)graphof(arg1);
4621 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4622 return SWIG_arg;
4623
4624 fail: SWIGUNUSED;
4625 }
4626 lua_error(L);
4627 return 0;
4628}
4629
4630
4631static int _wrap_graphof__SWIG_1(lua_State* L) {
4632 {
4633 int SWIG_arg = 0;
4634 Agedge_t *arg1 = (Agedge_t *) 0 ;
4635 Agraph_t *result = 0 ;
4636
4637 SWIG_check_num_args("graphof",1,1)
4638 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agedge_t *");
4639
4640 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4642 }
4643
4644 result = (Agraph_t *)graphof(arg1);
4645 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4646 return SWIG_arg;
4647
4648 fail: SWIGUNUSED;
4649 }
4650 lua_error(L);
4651 return 0;
4652}
4653
4654
4655static int _wrap_graphof__SWIG_2(lua_State* L) {
4656 {
4657 int SWIG_arg = 0;
4658 Agnode_t *arg1 = (Agnode_t *) 0 ;
4659 Agraph_t *result = 0 ;
4660
4661 SWIG_check_num_args("graphof",1,1)
4662 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agnode_t *");
4663
4664 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4666 }
4667
4668 result = (Agraph_t *)graphof(arg1);
4669 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4670 return SWIG_arg;
4671
4672 fail: SWIGUNUSED;
4673 }
4674 lua_error(L);
4675 return 0;
4676}
4677
4678
4679static int _wrap_graphof(lua_State* L) {
4680 int argc;
4681 int argv[2]={
4682 1,2
4683 };
4684
4685 argc = lua_gettop(L);
4686 if (argc == 1) {
4687 int _v = 0;
4688 {
4689 void *ptr;
4690 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4691 _v = 0;
4692 } else {
4693 _v = 1;
4694 }
4695 }
4696 if (_v) {
4697 return _wrap_graphof__SWIG_0(L);
4698 }
4699 }
4700 if (argc == 1) {
4701 int _v = 0;
4702 {
4703 void *ptr;
4704 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4705 _v = 0;
4706 } else {
4707 _v = 1;
4708 }
4709 }
4710 if (_v) {
4711 return _wrap_graphof__SWIG_1(L);
4712 }
4713 }
4714 if (argc == 1) {
4715 int _v = 0;
4716 {
4717 void *ptr;
4718 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4719 _v = 0;
4720 } else {
4721 _v = 1;
4722 }
4723 }
4724 if (_v) {
4725 return _wrap_graphof__SWIG_2(L);
4726 }
4727 }
4728
4729 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'graphof'\n"
4730 " Possible C/C++ prototypes are:\n"
4731 " graphof(Agraph_t *)\n"
4732 " graphof(Agedge_t *)\n"
4733 " graphof(Agnode_t *)\n");
4734 lua_error(L);return 0;
4735}
4736
4737
4738static int _wrap_rootof(lua_State* L) {
4739 {
4740 int SWIG_arg = 0;
4741 Agraph_t *arg1 = (Agraph_t *) 0 ;
4742 Agraph_t *result = 0 ;
4743
4744 SWIG_check_num_args("rootof",1,1)
4745 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rootof",1,"Agraph_t *");
4746
4747 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4749 }
4750
4751 result = (Agraph_t *)rootof(arg1);
4752 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4753 return SWIG_arg;
4754
4755 fail: SWIGUNUSED;
4756 }
4757 lua_error(L);
4758 return 0;
4759}
4760
4761
4762static int _wrap_protonode(lua_State* L) {
4763 {
4764 int SWIG_arg = 0;
4765 Agraph_t *arg1 = (Agraph_t *) 0 ;
4766 Agnode_t *result = 0 ;
4767
4768 SWIG_check_num_args("protonode",1,1)
4769 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("protonode",1,"Agraph_t *");
4770
4771 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4772 SWIG_fail_ptr("protonode",1,SWIGTYPE_p_Agraph_t);
4773 }
4774
4775 result = (Agnode_t *)protonode(arg1);
4776 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4777 return SWIG_arg;
4778
4779 fail: SWIGUNUSED;
4780 }
4781 lua_error(L);
4782 return 0;
4783}
4784
4785
4786static int _wrap_protoedge(lua_State* L) {
4787 {
4788 int SWIG_arg = 0;
4789 Agraph_t *arg1 = (Agraph_t *) 0 ;
4790 Agedge_t *result = 0 ;
4791
4792 SWIG_check_num_args("protoedge",1,1)
4793 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("protoedge",1,"Agraph_t *");
4794
4795 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4796 SWIG_fail_ptr("protoedge",1,SWIGTYPE_p_Agraph_t);
4797 }
4798
4799 result = (Agedge_t *)protoedge(arg1);
4800 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
4801 return SWIG_arg;
4802
4803 fail: SWIGUNUSED;
4804 }
4805 lua_error(L);
4806 return 0;
4807}
4808
4809
4810static int _wrap_ok__SWIG_0(lua_State* L) {
4811 {
4812 int SWIG_arg = 0;
4813 Agraph_t *arg1 = (Agraph_t *) 0 ;
4814 bool result;
4815
4816 SWIG_check_num_args("ok",1,1)
4817 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agraph_t *");
4818
4819 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4821 }
4822
4823 result = (bool)ok(arg1);
4824 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4825 return SWIG_arg;
4826
4827 fail: SWIGUNUSED;
4828 }
4829 lua_error(L);
4830 return 0;
4831}
4832
4833
4834static int _wrap_ok__SWIG_1(lua_State* L) {
4835 {
4836 int SWIG_arg = 0;
4837 Agnode_t *arg1 = (Agnode_t *) 0 ;
4838 bool result;
4839
4840 SWIG_check_num_args("ok",1,1)
4841 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agnode_t *");
4842
4843 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4845 }
4846
4847 result = (bool)ok(arg1);
4848 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4849 return SWIG_arg;
4850
4851 fail: SWIGUNUSED;
4852 }
4853 lua_error(L);
4854 return 0;
4855}
4856
4857
4858static int _wrap_ok__SWIG_2(lua_State* L) {
4859 {
4860 int SWIG_arg = 0;
4861 Agedge_t *arg1 = (Agedge_t *) 0 ;
4862 bool result;
4863
4864 SWIG_check_num_args("ok",1,1)
4865 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agedge_t *");
4866
4867 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4869 }
4870
4871 result = (bool)ok(arg1);
4872 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4873 return SWIG_arg;
4874
4875 fail: SWIGUNUSED;
4876 }
4877 lua_error(L);
4878 return 0;
4879}
4880
4881
4882static int _wrap_ok__SWIG_3(lua_State* L) {
4883 {
4884 int SWIG_arg = 0;
4885 Agsym_t *arg1 = (Agsym_t *) 0 ;
4886 bool result;
4887
4888 SWIG_check_num_args("ok",1,1)
4889 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agsym_t *");
4890
4891 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agsym_t,0))){
4893 }
4894
4895 result = (bool)ok(arg1);
4896 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4897 return SWIG_arg;
4898
4899 fail: SWIGUNUSED;
4900 }
4901 lua_error(L);
4902 return 0;
4903}
4904
4905
4906static int _wrap_ok(lua_State* L) {
4907 int argc;
4908 int argv[2]={
4909 1,2
4910 };
4911
4912 argc = lua_gettop(L);
4913 if (argc == 1) {
4914 int _v = 0;
4915 {
4916 void *ptr;
4917 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4918 _v = 0;
4919 } else {
4920 _v = 1;
4921 }
4922 }
4923 if (_v) {
4924 return _wrap_ok__SWIG_0(L);
4925 }
4926 }
4927 if (argc == 1) {
4928 int _v = 0;
4929 {
4930 void *ptr;
4931 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4932 _v = 0;
4933 } else {
4934 _v = 1;
4935 }
4936 }
4937 if (_v) {
4938 return _wrap_ok__SWIG_1(L);
4939 }
4940 }
4941 if (argc == 1) {
4942 int _v = 0;
4943 {
4944 void *ptr;
4945 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4946 _v = 0;
4947 } else {
4948 _v = 1;
4949 }
4950 }
4951 if (_v) {
4952 return _wrap_ok__SWIG_2(L);
4953 }
4954 }
4955 if (argc == 1) {
4956 int _v = 0;
4957 {
4958 void *ptr;
4959 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4960 _v = 0;
4961 } else {
4962 _v = 1;
4963 }
4964 }
4965 if (_v) {
4966 return _wrap_ok__SWIG_3(L);
4967 }
4968 }
4969
4970 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'ok'\n"
4971 " Possible C/C++ prototypes are:\n"
4972 " ok(Agraph_t *)\n"
4973 " ok(Agnode_t *)\n"
4974 " ok(Agedge_t *)\n"
4975 " ok(Agsym_t *)\n");
4976 lua_error(L);return 0;
4977}
4978
4979
4980static int _wrap_firstsubg(lua_State* L) {
4981 {
4982 int SWIG_arg = 0;
4983 Agraph_t *arg1 = (Agraph_t *) 0 ;
4984 Agraph_t *result = 0 ;
4985
4986 SWIG_check_num_args("firstsubg",1,1)
4987 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstsubg",1,"Agraph_t *");
4988
4989 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4990 SWIG_fail_ptr("firstsubg",1,SWIGTYPE_p_Agraph_t);
4991 }
4992
4993 result = (Agraph_t *)firstsubg(arg1);
4994 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4995 return SWIG_arg;
4996
4997 fail: SWIGUNUSED;
4998 }
4999 lua_error(L);
5000 return 0;
5001}
5002
5003
5004static int _wrap_nextsubg(lua_State* L) {
5005 {
5006 int SWIG_arg = 0;
5007 Agraph_t *arg1 = (Agraph_t *) 0 ;
5008 Agraph_t *arg2 = (Agraph_t *) 0 ;
5009 Agraph_t *result = 0 ;
5010
5011 SWIG_check_num_args("nextsubg",2,2)
5012 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextsubg",1,"Agraph_t *");
5013 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextsubg",2,"Agraph_t *");
5014
5015 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5016 SWIG_fail_ptr("nextsubg",1,SWIGTYPE_p_Agraph_t);
5017 }
5018
5019
5020 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agraph_t,0))){
5021 SWIG_fail_ptr("nextsubg",2,SWIGTYPE_p_Agraph_t);
5022 }
5023
5024 result = (Agraph_t *)nextsubg(arg1,arg2);
5025 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5026 return SWIG_arg;
5027
5028 fail: SWIGUNUSED;
5029 }
5030 lua_error(L);
5031 return 0;
5032}
5033
5034
5035static int _wrap_firstsupg(lua_State* L) {
5036 {
5037 int SWIG_arg = 0;
5038 Agraph_t *arg1 = (Agraph_t *) 0 ;
5039 Agraph_t *result = 0 ;
5040
5041 SWIG_check_num_args("firstsupg",1,1)
5042 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstsupg",1,"Agraph_t *");
5043
5044 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5045 SWIG_fail_ptr("firstsupg",1,SWIGTYPE_p_Agraph_t);
5046 }
5047
5048 result = (Agraph_t *)firstsupg(arg1);
5049 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5050 return SWIG_arg;
5051
5052 fail: SWIGUNUSED;
5053 }
5054 lua_error(L);
5055 return 0;
5056}
5057
5058
5059static int _wrap_nextsupg(lua_State* L) {
5060 {
5061 int SWIG_arg = 0;
5062 Agraph_t *arg1 = (Agraph_t *) 0 ;
5063 Agraph_t *arg2 = (Agraph_t *) 0 ;
5064 Agraph_t *result = 0 ;
5065
5066 SWIG_check_num_args("nextsupg",2,2)
5067 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextsupg",1,"Agraph_t *");
5068 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextsupg",2,"Agraph_t *");
5069
5070 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5071 SWIG_fail_ptr("nextsupg",1,SWIGTYPE_p_Agraph_t);
5072 }
5073
5074
5075 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agraph_t,0))){
5076 SWIG_fail_ptr("nextsupg",2,SWIGTYPE_p_Agraph_t);
5077 }
5078
5079 result = (Agraph_t *)nextsupg(arg1,arg2);
5080 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5081 return SWIG_arg;
5082
5083 fail: SWIGUNUSED;
5084 }
5085 lua_error(L);
5086 return 0;
5087}
5088
5089
5090static int _wrap_firstedge__SWIG_0(lua_State* L) {
5091 {
5092 int SWIG_arg = 0;
5093 Agraph_t *arg1 = (Agraph_t *) 0 ;
5094 Agedge_t *result = 0 ;
5095
5096 SWIG_check_num_args("firstedge",1,1)
5097 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstedge",1,"Agraph_t *");
5098
5099 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5100 SWIG_fail_ptr("firstedge",1,SWIGTYPE_p_Agraph_t);
5101 }
5102
5103 result = (Agedge_t *)firstedge(arg1);
5104 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5105 return SWIG_arg;
5106
5107 fail: SWIGUNUSED;
5108 }
5109 lua_error(L);
5110 return 0;
5111}
5112
5113
5114static int _wrap_nextedge__SWIG_0(lua_State* L) {
5115 {
5116 int SWIG_arg = 0;
5117 Agraph_t *arg1 = (Agraph_t *) 0 ;
5118 Agedge_t *arg2 = (Agedge_t *) 0 ;
5119 Agedge_t *result = 0 ;
5120
5121 SWIG_check_num_args("nextedge",2,2)
5122 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextedge",1,"Agraph_t *");
5123 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextedge",2,"Agedge_t *");
5124
5125 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5126 SWIG_fail_ptr("nextedge",1,SWIGTYPE_p_Agraph_t);
5127 }
5128
5129
5130 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5131 SWIG_fail_ptr("nextedge",2,SWIGTYPE_p_Agedge_t);
5132 }
5133
5134 result = (Agedge_t *)nextedge(arg1,arg2);
5135 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5136 return SWIG_arg;
5137
5138 fail: SWIGUNUSED;
5139 }
5140 lua_error(L);
5141 return 0;
5142}
5143
5144
5145static int _wrap_firstout__SWIG_0(lua_State* L) {
5146 {
5147 int SWIG_arg = 0;
5148 Agraph_t *arg1 = (Agraph_t *) 0 ;
5149 Agedge_t *result = 0 ;
5150
5151 SWIG_check_num_args("firstout",1,1)
5152 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstout",1,"Agraph_t *");
5153
5154 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5155 SWIG_fail_ptr("firstout",1,SWIGTYPE_p_Agraph_t);
5156 }
5157
5158 result = (Agedge_t *)firstout(arg1);
5159 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5160 return SWIG_arg;
5161
5162 fail: SWIGUNUSED;
5163 }
5164 lua_error(L);
5165 return 0;
5166}
5167
5168
5169static int _wrap_nextout__SWIG_0(lua_State* L) {
5170 {
5171 int SWIG_arg = 0;
5172 Agraph_t *arg1 = (Agraph_t *) 0 ;
5173 Agedge_t *arg2 = (Agedge_t *) 0 ;
5174 Agedge_t *result = 0 ;
5175
5176 SWIG_check_num_args("nextout",2,2)
5177 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextout",1,"Agraph_t *");
5178 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextout",2,"Agedge_t *");
5179
5180 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5182 }
5183
5184
5185 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5187 }
5188
5189 result = (Agedge_t *)nextout(arg1,arg2);
5190 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5191 return SWIG_arg;
5192
5193 fail: SWIGUNUSED;
5194 }
5195 lua_error(L);
5196 return 0;
5197}
5198
5199
5200static int _wrap_firstedge__SWIG_1(lua_State* L) {
5201 {
5202 int SWIG_arg = 0;
5203 Agnode_t *arg1 = (Agnode_t *) 0 ;
5204 Agedge_t *result = 0 ;
5205
5206 SWIG_check_num_args("firstedge",1,1)
5207 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstedge",1,"Agnode_t *");
5208
5209 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5210 SWIG_fail_ptr("firstedge",1,SWIGTYPE_p_Agnode_t);
5211 }
5212
5213 result = (Agedge_t *)firstedge(arg1);
5214 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5215 return SWIG_arg;
5216
5217 fail: SWIGUNUSED;
5218 }
5219 lua_error(L);
5220 return 0;
5221}
5222
5223
5224static int _wrap_firstedge(lua_State* L) {
5225 int argc;
5226 int argv[2]={
5227 1,2
5228 };
5229
5230 argc = lua_gettop(L);
5231 if (argc == 1) {
5232 int _v = 0;
5233 {
5234 void *ptr;
5235 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5236 _v = 0;
5237 } else {
5238 _v = 1;
5239 }
5240 }
5241 if (_v) {
5242 return _wrap_firstedge__SWIG_0(L);
5243 }
5244 }
5245 if (argc == 1) {
5246 int _v = 0;
5247 {
5248 void *ptr;
5249 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5250 _v = 0;
5251 } else {
5252 _v = 1;
5253 }
5254 }
5255 if (_v) {
5256 return _wrap_firstedge__SWIG_1(L);
5257 }
5258 }
5259
5260 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstedge'\n"
5261 " Possible C/C++ prototypes are:\n"
5262 " firstedge(Agraph_t *)\n"
5263 " firstedge(Agnode_t *)\n");
5264 lua_error(L);return 0;
5265}
5266
5267
5268static int _wrap_nextedge__SWIG_1(lua_State* L) {
5269 {
5270 int SWIG_arg = 0;
5271 Agnode_t *arg1 = (Agnode_t *) 0 ;
5272 Agedge_t *arg2 = (Agedge_t *) 0 ;
5273 Agedge_t *result = 0 ;
5274
5275 SWIG_check_num_args("nextedge",2,2)
5276 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextedge",1,"Agnode_t *");
5277 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextedge",2,"Agedge_t *");
5278
5279 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5280 SWIG_fail_ptr("nextedge",1,SWIGTYPE_p_Agnode_t);
5281 }
5282
5283
5284 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5285 SWIG_fail_ptr("nextedge",2,SWIGTYPE_p_Agedge_t);
5286 }
5287
5288 result = (Agedge_t *)nextedge(arg1,arg2);
5289 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5290 return SWIG_arg;
5291
5292 fail: SWIGUNUSED;
5293 }
5294 lua_error(L);
5295 return 0;
5296}
5297
5298
5299static int _wrap_nextedge(lua_State* L) {
5300 int argc;
5301 int argv[3]={
5302 1,2,3
5303 };
5304
5305 argc = lua_gettop(L);
5306 if (argc == 2) {
5307 int _v = 0;
5308 {
5309 void *ptr;
5310 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5311 _v = 0;
5312 } else {
5313 _v = 1;
5314 }
5315 }
5316 if (_v) {
5317 {
5318 void *ptr;
5319 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5320 _v = 0;
5321 } else {
5322 _v = 1;
5323 }
5324 }
5325 if (_v) {
5326 return _wrap_nextedge__SWIG_0(L);
5327 }
5328 }
5329 }
5330 if (argc == 2) {
5331 int _v = 0;
5332 {
5333 void *ptr;
5334 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5335 _v = 0;
5336 } else {
5337 _v = 1;
5338 }
5339 }
5340 if (_v) {
5341 {
5342 void *ptr;
5343 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5344 _v = 0;
5345 } else {
5346 _v = 1;
5347 }
5348 }
5349 if (_v) {
5350 return _wrap_nextedge__SWIG_1(L);
5351 }
5352 }
5353 }
5354
5355 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextedge'\n"
5356 " Possible C/C++ prototypes are:\n"
5357 " nextedge(Agraph_t *,Agedge_t *)\n"
5358 " nextedge(Agnode_t *,Agedge_t *)\n");
5359 lua_error(L);return 0;
5360}
5361
5362
5363static int _wrap_firstout__SWIG_1(lua_State* L) {
5364 {
5365 int SWIG_arg = 0;
5366 Agnode_t *arg1 = (Agnode_t *) 0 ;
5367 Agedge_t *result = 0 ;
5368
5369 SWIG_check_num_args("firstout",1,1)
5370 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstout",1,"Agnode_t *");
5371
5372 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5373 SWIG_fail_ptr("firstout",1,SWIGTYPE_p_Agnode_t);
5374 }
5375
5376 result = (Agedge_t *)firstout(arg1);
5377 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5378 return SWIG_arg;
5379
5380 fail: SWIGUNUSED;
5381 }
5382 lua_error(L);
5383 return 0;
5384}
5385
5386
5387static int _wrap_firstout(lua_State* L) {
5388 int argc;
5389 int argv[2]={
5390 1,2
5391 };
5392
5393 argc = lua_gettop(L);
5394 if (argc == 1) {
5395 int _v = 0;
5396 {
5397 void *ptr;
5398 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5399 _v = 0;
5400 } else {
5401 _v = 1;
5402 }
5403 }
5404 if (_v) {
5405 return _wrap_firstout__SWIG_0(L);
5406 }
5407 }
5408 if (argc == 1) {
5409 int _v = 0;
5410 {
5411 void *ptr;
5412 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5413 _v = 0;
5414 } else {
5415 _v = 1;
5416 }
5417 }
5418 if (_v) {
5419 return _wrap_firstout__SWIG_1(L);
5420 }
5421 }
5422
5423 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstout'\n"
5424 " Possible C/C++ prototypes are:\n"
5425 " firstout(Agraph_t *)\n"
5426 " firstout(Agnode_t *)\n");
5427 lua_error(L);return 0;
5428}
5429
5430
5431static int _wrap_nextout__SWIG_1(lua_State* L) {
5432 {
5433 int SWIG_arg = 0;
5434 Agnode_t *arg1 = (Agnode_t *) 0 ;
5435 Agedge_t *arg2 = (Agedge_t *) 0 ;
5436 Agedge_t *result = 0 ;
5437
5438 SWIG_check_num_args("nextout",2,2)
5439 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextout",1,"Agnode_t *");
5440 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextout",2,"Agedge_t *");
5441
5442 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5444 }
5445
5446
5447 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5449 }
5450
5451 result = (Agedge_t *)nextout(arg1,arg2);
5452 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5453 return SWIG_arg;
5454
5455 fail: SWIGUNUSED;
5456 }
5457 lua_error(L);
5458 return 0;
5459}
5460
5461
5462static int _wrap_nextout(lua_State* L) {
5463 int argc;
5464 int argv[3]={
5465 1,2,3
5466 };
5467
5468 argc = lua_gettop(L);
5469 if (argc == 2) {
5470 int _v = 0;
5471 {
5472 void *ptr;
5473 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5474 _v = 0;
5475 } else {
5476 _v = 1;
5477 }
5478 }
5479 if (_v) {
5480 {
5481 void *ptr;
5482 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5483 _v = 0;
5484 } else {
5485 _v = 1;
5486 }
5487 }
5488 if (_v) {
5489 return _wrap_nextout__SWIG_0(L);
5490 }
5491 }
5492 }
5493 if (argc == 2) {
5494 int _v = 0;
5495 {
5496 void *ptr;
5497 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5498 _v = 0;
5499 } else {
5500 _v = 1;
5501 }
5502 }
5503 if (_v) {
5504 {
5505 void *ptr;
5506 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5507 _v = 0;
5508 } else {
5509 _v = 1;
5510 }
5511 }
5512 if (_v) {
5513 return _wrap_nextout__SWIG_1(L);
5514 }
5515 }
5516 }
5517
5518 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextout'\n"
5519 " Possible C/C++ prototypes are:\n"
5520 " nextout(Agraph_t *,Agedge_t *)\n"
5521 " nextout(Agnode_t *,Agedge_t *)\n");
5522 lua_error(L);return 0;
5523}
5524
5525
5526static int _wrap_firsthead(lua_State* L) {
5527 {
5528 int SWIG_arg = 0;
5529 Agnode_t *arg1 = (Agnode_t *) 0 ;
5530 Agnode_t *result = 0 ;
5531
5532 SWIG_check_num_args("firsthead",1,1)
5533 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firsthead",1,"Agnode_t *");
5534
5535 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5536 SWIG_fail_ptr("firsthead",1,SWIGTYPE_p_Agnode_t);
5537 }
5538
5539 result = (Agnode_t *)firsthead(arg1);
5540 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5541 return SWIG_arg;
5542
5543 fail: SWIGUNUSED;
5544 }
5545 lua_error(L);
5546 return 0;
5547}
5548
5549
5550static int _wrap_nexthead(lua_State* L) {
5551 {
5552 int SWIG_arg = 0;
5553 Agnode_t *arg1 = (Agnode_t *) 0 ;
5554 Agnode_t *arg2 = (Agnode_t *) 0 ;
5555 Agnode_t *result = 0 ;
5556
5557 SWIG_check_num_args("nexthead",2,2)
5558 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nexthead",1,"Agnode_t *");
5559 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nexthead",2,"Agnode_t *");
5560
5561 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5562 SWIG_fail_ptr("nexthead",1,SWIGTYPE_p_Agnode_t);
5563 }
5564
5565
5566 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5567 SWIG_fail_ptr("nexthead",2,SWIGTYPE_p_Agnode_t);
5568 }
5569
5570 result = (Agnode_t *)nexthead(arg1,arg2);
5571 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5572 return SWIG_arg;
5573
5574 fail: SWIGUNUSED;
5575 }
5576 lua_error(L);
5577 return 0;
5578}
5579
5580
5581static int _wrap_firstin__SWIG_0(lua_State* L) {
5582 {
5583 int SWIG_arg = 0;
5584 Agraph_t *arg1 = (Agraph_t *) 0 ;
5585 Agedge_t *result = 0 ;
5586
5587 SWIG_check_num_args("firstin",1,1)
5588 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstin",1,"Agraph_t *");
5589
5590 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5592 }
5593
5594 result = (Agedge_t *)firstin(arg1);
5595 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5596 return SWIG_arg;
5597
5598 fail: SWIGUNUSED;
5599 }
5600 lua_error(L);
5601 return 0;
5602}
5603
5604
5605static int _wrap_nextin__SWIG_0(lua_State* L) {
5606 {
5607 int SWIG_arg = 0;
5608 Agnode_t *arg1 = (Agnode_t *) 0 ;
5609 Agedge_t *arg2 = (Agedge_t *) 0 ;
5610 Agedge_t *result = 0 ;
5611
5612 SWIG_check_num_args("nextin",2,2)
5613 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextin",1,"Agnode_t *");
5614 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextin",2,"Agedge_t *");
5615
5616 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5618 }
5619
5620
5621 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5623 }
5624
5625 result = (Agedge_t *)nextin(arg1,arg2);
5626 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5627 return SWIG_arg;
5628
5629 fail: SWIGUNUSED;
5630 }
5631 lua_error(L);
5632 return 0;
5633}
5634
5635
5636static int _wrap_firstin__SWIG_1(lua_State* L) {
5637 {
5638 int SWIG_arg = 0;
5639 Agnode_t *arg1 = (Agnode_t *) 0 ;
5640 Agedge_t *result = 0 ;
5641
5642 SWIG_check_num_args("firstin",1,1)
5643 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstin",1,"Agnode_t *");
5644
5645 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5647 }
5648
5649 result = (Agedge_t *)firstin(arg1);
5650 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5651 return SWIG_arg;
5652
5653 fail: SWIGUNUSED;
5654 }
5655 lua_error(L);
5656 return 0;
5657}
5658
5659
5660static int _wrap_firstin(lua_State* L) {
5661 int argc;
5662 int argv[2]={
5663 1,2
5664 };
5665
5666 argc = lua_gettop(L);
5667 if (argc == 1) {
5668 int _v = 0;
5669 {
5670 void *ptr;
5671 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5672 _v = 0;
5673 } else {
5674 _v = 1;
5675 }
5676 }
5677 if (_v) {
5678 return _wrap_firstin__SWIG_0(L);
5679 }
5680 }
5681 if (argc == 1) {
5682 int _v = 0;
5683 {
5684 void *ptr;
5685 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5686 _v = 0;
5687 } else {
5688 _v = 1;
5689 }
5690 }
5691 if (_v) {
5692 return _wrap_firstin__SWIG_1(L);
5693 }
5694 }
5695
5696 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstin'\n"
5697 " Possible C/C++ prototypes are:\n"
5698 " firstin(Agraph_t *)\n"
5699 " firstin(Agnode_t *)\n");
5700 lua_error(L);return 0;
5701}
5702
5703
5704static int _wrap_nextin__SWIG_1(lua_State* L) {
5705 {
5706 int SWIG_arg = 0;
5707 Agraph_t *arg1 = (Agraph_t *) 0 ;
5708 Agedge_t *arg2 = (Agedge_t *) 0 ;
5709 Agedge_t *result = 0 ;
5710
5711 SWIG_check_num_args("nextin",2,2)
5712 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextin",1,"Agraph_t *");
5713 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextin",2,"Agedge_t *");
5714
5715 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5717 }
5718
5719
5720 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5722 }
5723
5724 result = (Agedge_t *)nextin(arg1,arg2);
5725 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5726 return SWIG_arg;
5727
5728 fail: SWIGUNUSED;
5729 }
5730 lua_error(L);
5731 return 0;
5732}
5733
5734
5735static int _wrap_nextin(lua_State* L) {
5736 int argc;
5737 int argv[3]={
5738 1,2,3
5739 };
5740
5741 argc = lua_gettop(L);
5742 if (argc == 2) {
5743 int _v = 0;
5744 {
5745 void *ptr;
5746 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5747 _v = 0;
5748 } else {
5749 _v = 1;
5750 }
5751 }
5752 if (_v) {
5753 {
5754 void *ptr;
5755 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5756 _v = 0;
5757 } else {
5758 _v = 1;
5759 }
5760 }
5761 if (_v) {
5762 return _wrap_nextin__SWIG_0(L);
5763 }
5764 }
5765 }
5766 if (argc == 2) {
5767 int _v = 0;
5768 {
5769 void *ptr;
5770 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5771 _v = 0;
5772 } else {
5773 _v = 1;
5774 }
5775 }
5776 if (_v) {
5777 {
5778 void *ptr;
5779 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5780 _v = 0;
5781 } else {
5782 _v = 1;
5783 }
5784 }
5785 if (_v) {
5786 return _wrap_nextin__SWIG_1(L);
5787 }
5788 }
5789 }
5790
5791 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextin'\n"
5792 " Possible C/C++ prototypes are:\n"
5793 " nextin(Agnode_t *,Agedge_t *)\n"
5794 " nextin(Agraph_t *,Agedge_t *)\n");
5795 lua_error(L);return 0;
5796}
5797
5798
5799static int _wrap_firsttail(lua_State* L) {
5800 {
5801 int SWIG_arg = 0;
5802 Agnode_t *arg1 = (Agnode_t *) 0 ;
5803 Agnode_t *result = 0 ;
5804
5805 SWIG_check_num_args("firsttail",1,1)
5806 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firsttail",1,"Agnode_t *");
5807
5808 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5809 SWIG_fail_ptr("firsttail",1,SWIGTYPE_p_Agnode_t);
5810 }
5811
5812 result = (Agnode_t *)firsttail(arg1);
5813 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5814 return SWIG_arg;
5815
5816 fail: SWIGUNUSED;
5817 }
5818 lua_error(L);
5819 return 0;
5820}
5821
5822
5823static int _wrap_nexttail(lua_State* L) {
5824 {
5825 int SWIG_arg = 0;
5826 Agnode_t *arg1 = (Agnode_t *) 0 ;
5827 Agnode_t *arg2 = (Agnode_t *) 0 ;
5828 Agnode_t *result = 0 ;
5829
5830 SWIG_check_num_args("nexttail",2,2)
5831 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nexttail",1,"Agnode_t *");
5832 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nexttail",2,"Agnode_t *");
5833
5834 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5835 SWIG_fail_ptr("nexttail",1,SWIGTYPE_p_Agnode_t);
5836 }
5837
5838
5839 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5840 SWIG_fail_ptr("nexttail",2,SWIGTYPE_p_Agnode_t);
5841 }
5842
5843 result = (Agnode_t *)nexttail(arg1,arg2);
5844 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5845 return SWIG_arg;
5846
5847 fail: SWIGUNUSED;
5848 }
5849 lua_error(L);
5850 return 0;
5851}
5852
5853
5854static int _wrap_firstnode__SWIG_0(lua_State* L) {
5855 {
5856 int SWIG_arg = 0;
5857 Agraph_t *arg1 = (Agraph_t *) 0 ;
5858 Agnode_t *result = 0 ;
5859
5860 SWIG_check_num_args("firstnode",1,1)
5861 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstnode",1,"Agraph_t *");
5862
5863 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5864 SWIG_fail_ptr("firstnode",1,SWIGTYPE_p_Agraph_t);
5865 }
5866
5867 result = (Agnode_t *)firstnode(arg1);
5868 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5869 return SWIG_arg;
5870
5871 fail: SWIGUNUSED;
5872 }
5873 lua_error(L);
5874 return 0;
5875}
5876
5877
5878static int _wrap_nextnode__SWIG_0(lua_State* L) {
5879 {
5880 int SWIG_arg = 0;
5881 Agraph_t *arg1 = (Agraph_t *) 0 ;
5882 Agnode_t *arg2 = (Agnode_t *) 0 ;
5883 Agnode_t *result = 0 ;
5884
5885 SWIG_check_num_args("nextnode",2,2)
5886 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextnode",1,"Agraph_t *");
5887 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextnode",2,"Agnode_t *");
5888
5889 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5890 SWIG_fail_ptr("nextnode",1,SWIGTYPE_p_Agraph_t);
5891 }
5892
5893
5894 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5895 SWIG_fail_ptr("nextnode",2,SWIGTYPE_p_Agnode_t);
5896 }
5897
5898 result = (Agnode_t *)nextnode(arg1,arg2);
5899 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5900 return SWIG_arg;
5901
5902 fail: SWIGUNUSED;
5903 }
5904 lua_error(L);
5905 return 0;
5906}
5907
5908
5909static int _wrap_firstnode__SWIG_1(lua_State* L) {
5910 {
5911 int SWIG_arg = 0;
5912 Agedge_t *arg1 = (Agedge_t *) 0 ;
5913 Agnode_t *result = 0 ;
5914
5915 SWIG_check_num_args("firstnode",1,1)
5916 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstnode",1,"Agedge_t *");
5917
5918 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
5919 SWIG_fail_ptr("firstnode",1,SWIGTYPE_p_Agedge_t);
5920 }
5921
5922 result = (Agnode_t *)firstnode(arg1);
5923 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5924 return SWIG_arg;
5925
5926 fail: SWIGUNUSED;
5927 }
5928 lua_error(L);
5929 return 0;
5930}
5931
5932
5933static int _wrap_firstnode(lua_State* L) {
5934 int argc;
5935 int argv[2]={
5936 1,2
5937 };
5938
5939 argc = lua_gettop(L);
5940 if (argc == 1) {
5941 int _v = 0;
5942 {
5943 void *ptr;
5944 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5945 _v = 0;
5946 } else {
5947 _v = 1;
5948 }
5949 }
5950 if (_v) {
5951 return _wrap_firstnode__SWIG_0(L);
5952 }
5953 }
5954 if (argc == 1) {
5955 int _v = 0;
5956 {
5957 void *ptr;
5958 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5959 _v = 0;
5960 } else {
5961 _v = 1;
5962 }
5963 }
5964 if (_v) {
5965 return _wrap_firstnode__SWIG_1(L);
5966 }
5967 }
5968
5969 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstnode'\n"
5970 " Possible C/C++ prototypes are:\n"
5971 " firstnode(Agraph_t *)\n"
5972 " firstnode(Agedge_t *)\n");
5973 lua_error(L);return 0;
5974}
5975
5976
5977static int _wrap_nextnode__SWIG_1(lua_State* L) {
5978 {
5979 int SWIG_arg = 0;
5980 Agedge_t *arg1 = (Agedge_t *) 0 ;
5981 Agnode_t *arg2 = (Agnode_t *) 0 ;
5982 Agnode_t *result = 0 ;
5983
5984 SWIG_check_num_args("nextnode",2,2)
5985 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextnode",1,"Agedge_t *");
5986 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextnode",2,"Agnode_t *");
5987
5988 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
5989 SWIG_fail_ptr("nextnode",1,SWIGTYPE_p_Agedge_t);
5990 }
5991
5992
5993 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5994 SWIG_fail_ptr("nextnode",2,SWIGTYPE_p_Agnode_t);
5995 }
5996
5997 result = (Agnode_t *)nextnode(arg1,arg2);
5998 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5999 return SWIG_arg;
6000
6001 fail: SWIGUNUSED;
6002 }
6003 lua_error(L);
6004 return 0;
6005}
6006
6007
6008static int _wrap_nextnode(lua_State* L) {
6009 int argc;
6010 int argv[3]={
6011 1,2,3
6012 };
6013
6014 argc = lua_gettop(L);
6015 if (argc == 2) {
6016 int _v = 0;
6017 {
6018 void *ptr;
6019 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6020 _v = 0;
6021 } else {
6022 _v = 1;
6023 }
6024 }
6025 if (_v) {
6026 {
6027 void *ptr;
6028 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6029 _v = 0;
6030 } else {
6031 _v = 1;
6032 }
6033 }
6034 if (_v) {
6035 return _wrap_nextnode__SWIG_0(L);
6036 }
6037 }
6038 }
6039 if (argc == 2) {
6040 int _v = 0;
6041 {
6042 void *ptr;
6043 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6044 _v = 0;
6045 } else {
6046 _v = 1;
6047 }
6048 }
6049 if (_v) {
6050 {
6051 void *ptr;
6052 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6053 _v = 0;
6054 } else {
6055 _v = 1;
6056 }
6057 }
6058 if (_v) {
6059 return _wrap_nextnode__SWIG_1(L);
6060 }
6061 }
6062 }
6063
6064 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextnode'\n"
6065 " Possible C/C++ prototypes are:\n"
6066 " nextnode(Agraph_t *,Agnode_t *)\n"
6067 " nextnode(Agedge_t *,Agnode_t *)\n");
6068 lua_error(L);return 0;
6069}
6070
6071
6072static int _wrap_firstattr__SWIG_0(lua_State* L) {
6073 {
6074 int SWIG_arg = 0;
6075 Agraph_t *arg1 = (Agraph_t *) 0 ;
6076 Agsym_t *result = 0 ;
6077
6078 SWIG_check_num_args("firstattr",1,1)
6079 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agraph_t *");
6080
6081 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6082 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agraph_t);
6083 }
6084
6085 result = (Agsym_t *)firstattr(arg1);
6086 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6087 return SWIG_arg;
6088
6089 fail: SWIGUNUSED;
6090 }
6091 lua_error(L);
6092 return 0;
6093}
6094
6095
6096static int _wrap_nextattr__SWIG_0(lua_State* L) {
6097 {
6098 int SWIG_arg = 0;
6099 Agraph_t *arg1 = (Agraph_t *) 0 ;
6100 Agsym_t *arg2 = (Agsym_t *) 0 ;
6101 Agsym_t *result = 0 ;
6102
6103 SWIG_check_num_args("nextattr",2,2)
6104 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agraph_t *");
6105 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6106
6107 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6108 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agraph_t);
6109 }
6110
6111
6112 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6113 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6114 }
6115
6116 result = (Agsym_t *)nextattr(arg1,arg2);
6117 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6118 return SWIG_arg;
6119
6120 fail: SWIGUNUSED;
6121 }
6122 lua_error(L);
6123 return 0;
6124}
6125
6126
6127static int _wrap_firstattr__SWIG_1(lua_State* L) {
6128 {
6129 int SWIG_arg = 0;
6130 Agedge_t *arg1 = (Agedge_t *) 0 ;
6131 Agsym_t *result = 0 ;
6132
6133 SWIG_check_num_args("firstattr",1,1)
6134 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agedge_t *");
6135
6136 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6137 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agedge_t);
6138 }
6139
6140 result = (Agsym_t *)firstattr(arg1);
6141 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6142 return SWIG_arg;
6143
6144 fail: SWIGUNUSED;
6145 }
6146 lua_error(L);
6147 return 0;
6148}
6149
6150
6151static int _wrap_nextattr__SWIG_1(lua_State* L) {
6152 {
6153 int SWIG_arg = 0;
6154 Agedge_t *arg1 = (Agedge_t *) 0 ;
6155 Agsym_t *arg2 = (Agsym_t *) 0 ;
6156 Agsym_t *result = 0 ;
6157
6158 SWIG_check_num_args("nextattr",2,2)
6159 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agedge_t *");
6160 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6161
6162 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6163 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agedge_t);
6164 }
6165
6166
6167 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6168 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6169 }
6170
6171 result = (Agsym_t *)nextattr(arg1,arg2);
6172 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6173 return SWIG_arg;
6174
6175 fail: SWIGUNUSED;
6176 }
6177 lua_error(L);
6178 return 0;
6179}
6180
6181
6182static int _wrap_firstattr__SWIG_2(lua_State* L) {
6183 {
6184 int SWIG_arg = 0;
6185 Agnode_t *arg1 = (Agnode_t *) 0 ;
6186 Agsym_t *result = 0 ;
6187
6188 SWIG_check_num_args("firstattr",1,1)
6189 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agnode_t *");
6190
6191 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6192 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agnode_t);
6193 }
6194
6195 result = (Agsym_t *)firstattr(arg1);
6196 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6197 return SWIG_arg;
6198
6199 fail: SWIGUNUSED;
6200 }
6201 lua_error(L);
6202 return 0;
6203}
6204
6205
6206static int _wrap_firstattr(lua_State* L) {
6207 int argc;
6208 int argv[2]={
6209 1,2
6210 };
6211
6212 argc = lua_gettop(L);
6213 if (argc == 1) {
6214 int _v = 0;
6215 {
6216 void *ptr;
6217 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6218 _v = 0;
6219 } else {
6220 _v = 1;
6221 }
6222 }
6223 if (_v) {
6224 return _wrap_firstattr__SWIG_0(L);
6225 }
6226 }
6227 if (argc == 1) {
6228 int _v = 0;
6229 {
6230 void *ptr;
6231 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6232 _v = 0;
6233 } else {
6234 _v = 1;
6235 }
6236 }
6237 if (_v) {
6238 return _wrap_firstattr__SWIG_1(L);
6239 }
6240 }
6241 if (argc == 1) {
6242 int _v = 0;
6243 {
6244 void *ptr;
6245 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6246 _v = 0;
6247 } else {
6248 _v = 1;
6249 }
6250 }
6251 if (_v) {
6252 return _wrap_firstattr__SWIG_2(L);
6253 }
6254 }
6255
6256 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstattr'\n"
6257 " Possible C/C++ prototypes are:\n"
6258 " firstattr(Agraph_t *)\n"
6259 " firstattr(Agedge_t *)\n"
6260 " firstattr(Agnode_t *)\n");
6261 lua_error(L);return 0;
6262}
6263
6264
6265static int _wrap_nextattr__SWIG_2(lua_State* L) {
6266 {
6267 int SWIG_arg = 0;
6268 Agnode_t *arg1 = (Agnode_t *) 0 ;
6269 Agsym_t *arg2 = (Agsym_t *) 0 ;
6270 Agsym_t *result = 0 ;
6271
6272 SWIG_check_num_args("nextattr",2,2)
6273 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agnode_t *");
6274 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6275
6276 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6277 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agnode_t);
6278 }
6279
6280
6281 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6282 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6283 }
6284
6285 result = (Agsym_t *)nextattr(arg1,arg2);
6286 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6287 return SWIG_arg;
6288
6289 fail: SWIGUNUSED;
6290 }
6291 lua_error(L);
6292 return 0;
6293}
6294
6295
6296static int _wrap_nextattr(lua_State* L) {
6297 int argc;
6298 int argv[3]={
6299 1,2,3
6300 };
6301
6302 argc = lua_gettop(L);
6303 if (argc == 2) {
6304 int _v = 0;
6305 {
6306 void *ptr;
6307 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6308 _v = 0;
6309 } else {
6310 _v = 1;
6311 }
6312 }
6313 if (_v) {
6314 {
6315 void *ptr;
6316 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6317 _v = 0;
6318 } else {
6319 _v = 1;
6320 }
6321 }
6322 if (_v) {
6323 return _wrap_nextattr__SWIG_0(L);
6324 }
6325 }
6326 }
6327 if (argc == 2) {
6328 int _v = 0;
6329 {
6330 void *ptr;
6331 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6332 _v = 0;
6333 } else {
6334 _v = 1;
6335 }
6336 }
6337 if (_v) {
6338 {
6339 void *ptr;
6340 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6341 _v = 0;
6342 } else {
6343 _v = 1;
6344 }
6345 }
6346 if (_v) {
6347 return _wrap_nextattr__SWIG_1(L);
6348 }
6349 }
6350 }
6351 if (argc == 2) {
6352 int _v = 0;
6353 {
6354 void *ptr;
6355 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6356 _v = 0;
6357 } else {
6358 _v = 1;
6359 }
6360 }
6361 if (_v) {
6362 {
6363 void *ptr;
6364 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6365 _v = 0;
6366 } else {
6367 _v = 1;
6368 }
6369 }
6370 if (_v) {
6371 return _wrap_nextattr__SWIG_2(L);
6372 }
6373 }
6374 }
6375
6376 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextattr'\n"
6377 " Possible C/C++ prototypes are:\n"
6378 " nextattr(Agraph_t *,Agsym_t *)\n"
6379 " nextattr(Agedge_t *,Agsym_t *)\n"
6380 " nextattr(Agnode_t *,Agsym_t *)\n");
6381 lua_error(L);return 0;
6382}
6383
6384
6385static int _wrap_rm__SWIG_0(lua_State* L) {
6386 {
6387 int SWIG_arg = 0;
6388 Agraph_t *arg1 = (Agraph_t *) 0 ;
6389 bool result;
6390
6391 SWIG_check_num_args("rm",1,1)
6392 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agraph_t *");
6393
6394 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6396 }
6397
6398 result = (bool)rm(arg1);
6399 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6400 return SWIG_arg;
6401
6402 fail: SWIGUNUSED;
6403 }
6404 lua_error(L);
6405 return 0;
6406}
6407
6408
6409static int _wrap_rm__SWIG_1(lua_State* L) {
6410 {
6411 int SWIG_arg = 0;
6412 Agnode_t *arg1 = (Agnode_t *) 0 ;
6413 bool result;
6414
6415 SWIG_check_num_args("rm",1,1)
6416 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agnode_t *");
6417
6418 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6420 }
6421
6422 result = (bool)rm(arg1);
6423 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6424 return SWIG_arg;
6425
6426 fail: SWIGUNUSED;
6427 }
6428 lua_error(L);
6429 return 0;
6430}
6431
6432
6433static int _wrap_rm__SWIG_2(lua_State* L) {
6434 {
6435 int SWIG_arg = 0;
6436 Agedge_t *arg1 = (Agedge_t *) 0 ;
6437 bool result;
6438
6439 SWIG_check_num_args("rm",1,1)
6440 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agedge_t *");
6441
6442 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6444 }
6445
6446 result = (bool)rm(arg1);
6447 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6448 return SWIG_arg;
6449
6450 fail: SWIGUNUSED;
6451 }
6452 lua_error(L);
6453 return 0;
6454}
6455
6456
6457static int _wrap_rm(lua_State* L) {
6458 int argc;
6459 int argv[2]={
6460 1,2
6461 };
6462
6463 argc = lua_gettop(L);
6464 if (argc == 1) {
6465 int _v = 0;
6466 {
6467 void *ptr;
6468 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6469 _v = 0;
6470 } else {
6471 _v = 1;
6472 }
6473 }
6474 if (_v) {
6475 return _wrap_rm__SWIG_0(L);
6476 }
6477 }
6478 if (argc == 1) {
6479 int _v = 0;
6480 {
6481 void *ptr;
6482 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6483 _v = 0;
6484 } else {
6485 _v = 1;
6486 }
6487 }
6488 if (_v) {
6489 return _wrap_rm__SWIG_1(L);
6490 }
6491 }
6492 if (argc == 1) {
6493 int _v = 0;
6494 {
6495 void *ptr;
6496 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6497 _v = 0;
6498 } else {
6499 _v = 1;
6500 }
6501 }
6502 if (_v) {
6503 return _wrap_rm__SWIG_2(L);
6504 }
6505 }
6506
6507 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'rm'\n"
6508 " Possible C/C++ prototypes are:\n"
6509 " rm(Agraph_t *)\n"
6510 " rm(Agnode_t *)\n"
6511 " rm(Agedge_t *)\n");
6512 lua_error(L);return 0;
6513}
6514
6515
6516static int _wrap_layout(lua_State* L) {
6517 {
6518 int SWIG_arg = 0;
6519 Agraph_t *arg1 = (Agraph_t *) 0 ;
6520 char *arg2 = (char *) 0 ;
6521 bool result;
6522
6523 SWIG_check_num_args("layout",2,2)
6524 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("layout",1,"Agraph_t *");
6525 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("layout",2,"char const *");
6526
6527 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6529 }
6530
6531 arg2 = (char *)lua_tostring(L, 2);
6532 result = (bool)layout(arg1,(char const *)arg2);
6533 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6534 return SWIG_arg;
6535
6536 fail: SWIGUNUSED;
6537 }
6538 lua_error(L);
6539 return 0;
6540}
6541
6542
6543static int _wrap_render__SWIG_0(lua_State* L) {
6544 {
6545 int SWIG_arg = 0;
6546 Agraph_t *arg1 = (Agraph_t *) 0 ;
6547 bool result;
6548
6549 SWIG_check_num_args("render",1,1)
6550 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6551
6552 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6554 }
6555
6556 result = (bool)render(arg1);
6557 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6558 return SWIG_arg;
6559
6560 fail: SWIGUNUSED;
6561 }
6562 lua_error(L);
6563 return 0;
6564}
6565
6566
6567static int _wrap_render__SWIG_1(lua_State* L) {
6568 {
6569 int SWIG_arg = 0;
6570 Agraph_t *arg1 = (Agraph_t *) 0 ;
6571 char *arg2 = (char *) 0 ;
6572 bool result;
6573
6574 SWIG_check_num_args("render",2,2)
6575 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6576 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6577
6578 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6580 }
6581
6582 arg2 = (char *)lua_tostring(L, 2);
6583 result = (bool)render(arg1,(char const *)arg2);
6584 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6585 return SWIG_arg;
6586
6587 fail: SWIGUNUSED;
6588 }
6589 lua_error(L);
6590 return 0;
6591}
6592
6593
6594static int _wrap_render__SWIG_2(lua_State* L) {
6595 {
6596 int SWIG_arg = 0;
6597 Agraph_t *arg1 = (Agraph_t *) 0 ;
6598 char *arg2 = (char *) 0 ;
6599 FILE *arg3 = (FILE *) 0 ;
6600 bool result;
6601
6602 SWIG_check_num_args("render",3,3)
6603 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6604 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6605 if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("render",3,"FILE *");
6606
6607 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6609 }
6610
6611 arg2 = (char *)lua_tostring(L, 2);
6612
6613 if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_FILE,0))){
6614 SWIG_fail_ptr("render",3,SWIGTYPE_p_FILE);
6615 }
6616
6617 result = (bool)render(arg1,(char const *)arg2,arg3);
6618 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6619 return SWIG_arg;
6620
6621 fail: SWIGUNUSED;
6622 }
6623 lua_error(L);
6624 return 0;
6625}
6626
6627
6628static int _wrap_render__SWIG_3(lua_State* L) {
6629 {
6630 int SWIG_arg = 0;
6631 Agraph_t *arg1 = (Agraph_t *) 0 ;
6632 char *arg2 = (char *) 0 ;
6633 char *arg3 = (char *) 0 ;
6634 bool result;
6635
6636 SWIG_check_num_args("render",3,3)
6637 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6638 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6639 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("render",3,"char const *");
6640
6641 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6643 }
6644
6645 arg2 = (char *)lua_tostring(L, 2);
6646 arg3 = (char *)lua_tostring(L, 3);
6647 result = (bool)render(arg1,(char const *)arg2,(char const *)arg3);
6648 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6649 return SWIG_arg;
6650
6651 fail: SWIGUNUSED;
6652 }
6653 lua_error(L);
6654 return 0;
6655}
6656
6657
6658static int _wrap_render(lua_State* L) {
6659 int argc;
6660 int argv[4]={
6661 1,2,3,4
6662 };
6663
6664 argc = lua_gettop(L);
6665 if (argc == 1) {
6666 int _v = 0;
6667 {
6668 void *ptr;
6669 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6670 _v = 0;
6671 } else {
6672 _v = 1;
6673 }
6674 }
6675 if (_v) {
6676 return _wrap_render__SWIG_0(L);
6677 }
6678 }
6679 if (argc == 2) {
6680 int _v = 0;
6681 {
6682 void *ptr;
6683 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6684 _v = 0;
6685 } else {
6686 _v = 1;
6687 }
6688 }
6689 if (_v) {
6690 {
6691 _v = SWIG_lua_isnilstring(L,argv[1]);
6692 }
6693 if (_v) {
6694 return _wrap_render__SWIG_1(L);
6695 }
6696 }
6697 }
6698 if (argc == 3) {
6699 int _v = 0;
6700 {
6701 void *ptr;
6702 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6703 _v = 0;
6704 } else {
6705 _v = 1;
6706 }
6707 }
6708 if (_v) {
6709 {
6710 _v = SWIG_lua_isnilstring(L,argv[1]);
6711 }
6712 if (_v) {
6713 {
6714 void *ptr;
6715 if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
6716 _v = 0;
6717 } else {
6718 _v = 1;
6719 }
6720 }
6721 if (_v) {
6722 return _wrap_render__SWIG_2(L);
6723 }
6724 }
6725 }
6726 }
6727 if (argc == 3) {
6728 int _v = 0;
6729 {
6730 void *ptr;
6731 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6732 _v = 0;
6733 } else {
6734 _v = 1;
6735 }
6736 }
6737 if (_v) {
6738 {
6739 _v = SWIG_lua_isnilstring(L,argv[1]);
6740 }
6741 if (_v) {
6742 {
6743 _v = SWIG_lua_isnilstring(L,argv[2]);
6744 }
6745 if (_v) {
6746 return _wrap_render__SWIG_3(L);
6747 }
6748 }
6749 }
6750 }
6751
6752 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'render'\n"
6753 " Possible C/C++ prototypes are:\n"
6754 " render(Agraph_t *)\n"
6755 " render(Agraph_t *,char const *)\n"
6756 " render(Agraph_t *,char const *,FILE *)\n"
6757 " render(Agraph_t *,char const *,char const *)\n");
6758 lua_error(L);return 0;
6759}
6760
6761
6762static int _wrap_renderresult(lua_State* L) {
6763 {
6764 int SWIG_arg = 0;
6765 Agraph_t *arg1 = (Agraph_t *) 0 ;
6766 char *arg2 = (char *) 0 ;
6767 char *arg3 = (char *) 0 ;
6768
6769 SWIG_check_num_args("renderresult",3,3)
6770 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderresult",1,"Agraph_t *");
6771 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderresult",2,"char const *");
6772 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("renderresult",3,"char *");
6773
6774 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6775 SWIG_fail_ptr("renderresult",1,SWIGTYPE_p_Agraph_t);
6776 }
6777
6778 arg2 = (char *)lua_tostring(L, 2);
6779 arg3 = (char *)lua_tostring(L, 3);
6780 renderresult(arg1,(char const *)arg2,arg3);
6781
6782 return SWIG_arg;
6783
6784 fail: SWIGUNUSED;
6785 }
6786 lua_error(L);
6787 return 0;
6788}
6789
6790
6791static int _wrap_renderchannel(lua_State* L) {
6792 {
6793 int SWIG_arg = 0;
6794 Agraph_t *arg1 = (Agraph_t *) 0 ;
6795 char *arg2 = (char *) 0 ;
6796 char *arg3 = (char *) 0 ;
6797 bool result;
6798
6799 SWIG_check_num_args("renderchannel",3,3)
6800 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderchannel",1,"Agraph_t *");
6801 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderchannel",2,"char const *");
6802 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("renderchannel",3,"char const *");
6803
6804 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6805 SWIG_fail_ptr("renderchannel",1,SWIGTYPE_p_Agraph_t);
6806 }
6807
6808 arg2 = (char *)lua_tostring(L, 2);
6809 arg3 = (char *)lua_tostring(L, 3);
6810 result = (bool)renderchannel(arg1,(char const *)arg2,(char const *)arg3);
6811 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6812 return SWIG_arg;
6813
6814 fail: SWIGUNUSED;
6815 }
6816 lua_error(L);
6817 return 0;
6818}
6819
6820
6821static int _wrap_renderdata(lua_State* L) {
6822 {
6823 int SWIG_arg = 0;
6824 Agraph_t *arg1 = (Agraph_t *) 0 ;
6825 char *arg2 = (char *) 0 ;
6826 char *result = 0 ;
6827
6828 SWIG_check_num_args("renderdata",2,2)
6829 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderdata",1,"Agraph_t *");
6830 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderdata",2,"char const *");
6831
6832 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6833 SWIG_fail_ptr("renderdata",1,SWIGTYPE_p_Agraph_t);
6834 }
6835
6836 arg2 = (char *)lua_tostring(L, 2);
6837 result = (char *)renderdata(arg1,(char const *)arg2);
6838 lua_pushstring(L,(const char *)result); SWIG_arg++;
6839 return SWIG_arg;
6840
6841 fail: SWIGUNUSED;
6842 }
6843 lua_error(L);
6844 return 0;
6845}
6846
6847
6848static int _wrap_write__SWIG_0(lua_State* L) {
6849 {
6850 int SWIG_arg = 0;
6851 Agraph_t *arg1 = (Agraph_t *) 0 ;
6852 char *arg2 = (char *) 0 ;
6853 bool result;
6854
6855 SWIG_check_num_args("write",2,2)
6856 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("write",1,"Agraph_t *");
6857 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("write",2,"char const *");
6858
6859 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6861 }
6862
6863 arg2 = (char *)lua_tostring(L, 2);
6864 result = (bool)write(arg1,(char const *)arg2);
6865 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6866 return SWIG_arg;
6867
6868 fail: SWIGUNUSED;
6869 }
6870 lua_error(L);
6871 return 0;
6872}
6873
6874
6875static int _wrap_write__SWIG_1(lua_State* L) {
6876 {
6877 int SWIG_arg = 0;
6878 Agraph_t *arg1 = (Agraph_t *) 0 ;
6879 FILE *arg2 = (FILE *) 0 ;
6880 bool result;
6881
6882 SWIG_check_num_args("write",2,2)
6883 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("write",1,"Agraph_t *");
6884 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("write",2,"FILE *");
6885
6886 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6888 }
6889
6890
6891 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_FILE,0))){
6892 SWIG_fail_ptr("write",2,SWIGTYPE_p_FILE);
6893 }
6894
6895 result = (bool)write(arg1,arg2);
6896 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6897 return SWIG_arg;
6898
6899 fail: SWIGUNUSED;
6900 }
6901 lua_error(L);
6902 return 0;
6903}
6904
6905
6906static int _wrap_write(lua_State* L) {
6907 int argc;
6908 int argv[3]={
6909 1,2,3
6910 };
6911
6912 argc = lua_gettop(L);
6913 if (argc == 2) {
6914 int _v = 0;
6915 {
6916 void *ptr;
6917 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6918 _v = 0;
6919 } else {
6920 _v = 1;
6921 }
6922 }
6923 if (_v) {
6924 {
6925 void *ptr;
6926 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
6927 _v = 0;
6928 } else {
6929 _v = 1;
6930 }
6931 }
6932 if (_v) {
6933 return _wrap_write__SWIG_1(L);
6934 }
6935 }
6936 }
6937 if (argc == 2) {
6938 int _v = 0;
6939 {
6940 void *ptr;
6941 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6942 _v = 0;
6943 } else {
6944 _v = 1;
6945 }
6946 }
6947 if (_v) {
6948 {
6949 _v = SWIG_lua_isnilstring(L,argv[1]);
6950 }
6951 if (_v) {
6952 return _wrap_write__SWIG_0(L);
6953 }
6954 }
6955 }
6956
6957 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'write'\n"
6958 " Possible C/C++ prototypes are:\n"
6959 " write(Agraph_t *,char const *)\n"
6960 " write(Agraph_t *,FILE *)\n");
6961 lua_error(L);return 0;
6962}
6963
6964
6965static int _wrap_tred(lua_State* L) {
6966 {
6967 int SWIG_arg = 0;
6968 Agraph_t *arg1 = (Agraph_t *) 0 ;
6969 bool result;
6970
6971 SWIG_check_num_args("tred",1,1)
6972 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tred",1,"Agraph_t *");
6973
6974 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6976 }
6977
6978 result = (bool)tred(arg1);
6979 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6980 return SWIG_arg;
6981
6982 fail: SWIGUNUSED;
6983 }
6984 lua_error(L);
6985 return 0;
6986}
6987
6988
6990 {0,0,0}
6991};
6993 {0,0,0,0,0,0}
6994};
6996 { "digraph", _wrap_digraph},
6997 { "strictgraph", _wrap_strictgraph},
6998 { "strictdigraph", _wrap_strictdigraph},
6999 { "readstring", _wrap_readstring},
7000 { "read", _wrap_read},
7001 { "graph", _wrap_graph},
7002 { "node", _wrap_node},
7003 { "edge", _wrap_edge},
7004 { "setv", _wrap_setv},
7005 { "getv", _wrap_getv},
7006 { "nameof", _wrap_nameof},
7007 { "findsubg", _wrap_findsubg},
7008 { "findnode", _wrap_findnode},
7009 { "findedge", _wrap_findedge},
7010 { "findattr", _wrap_findattr},
7011 { "headof", _wrap_headof},
7012 { "tailof", _wrap_tailof},
7013 { "graphof", _wrap_graphof},
7014 { "rootof", _wrap_rootof},
7015 { "protonode", _wrap_protonode},
7016 { "protoedge", _wrap_protoedge},
7017 { "ok", _wrap_ok},
7018 { "firstsubg", _wrap_firstsubg},
7019 { "nextsubg", _wrap_nextsubg},
7020 { "firstsupg", _wrap_firstsupg},
7021 { "nextsupg", _wrap_nextsupg},
7022 { "firstedge", _wrap_firstedge},
7023 { "nextedge", _wrap_nextedge},
7024 { "firstout", _wrap_firstout},
7025 { "nextout", _wrap_nextout},
7026 { "firsthead", _wrap_firsthead},
7027 { "nexthead", _wrap_nexthead},
7028 { "firstin", _wrap_firstin},
7029 { "nextin", _wrap_nextin},
7030 { "firsttail", _wrap_firsttail},
7031 { "nexttail", _wrap_nexttail},
7032 { "firstnode", _wrap_firstnode},
7033 { "nextnode", _wrap_nextnode},
7034 { "firstattr", _wrap_firstattr},
7035 { "nextattr", _wrap_nextattr},
7036 { "rm", _wrap_rm},
7037 { "layout", _wrap_layout},
7038 { "render", _wrap_render},
7039 { "renderresult", _wrap_renderresult},
7040 { "renderchannel", _wrap_renderchannel},
7041 { "renderdata", _wrap_renderdata},
7042 { "write", _wrap_write},
7043 { "tred", _wrap_tred},
7044 {0,0}
7045};
7047 0
7048};
7052
7061#ifdef __cplusplus
7062}
7063#endif
7064
7065/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7066
7067static swig_type_info _swigt__p_Agedge_t = {"_p_Agedge_t", "Agedge_t *", 0, 0, (void*)0, 0};
7068static swig_type_info _swigt__p_Agnode_t = {"_p_Agnode_t", "Agnode_t *", 0, 0, (void*)0, 0};
7069static swig_type_info _swigt__p_Agraph_t = {"_p_Agraph_t", "Agraph_t *", 0, 0, (void*)0, 0};
7070static swig_type_info _swigt__p_Agsym_t = {"_p_Agsym_t", "Agsym_t *", 0, 0, (void*)0, 0};
7071static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
7072
7080
7081static swig_cast_info _swigc__p_Agedge_t[] = { {&_swigt__p_Agedge_t, 0, 0, 0},{0, 0, 0, 0}};
7082static swig_cast_info _swigc__p_Agnode_t[] = { {&_swigt__p_Agnode_t, 0, 0, 0},{0, 0, 0, 0}};
7083static swig_cast_info _swigc__p_Agraph_t[] = { {&_swigt__p_Agraph_t, 0, 0, 0},{0, 0, 0, 0}};
7084static swig_cast_info _swigc__p_Agsym_t[] = { {&_swigt__p_Agsym_t, 0, 0, 0},{0, 0, 0, 0}};
7085static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
7086
7094
7095
7096/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7097
7098/* -----------------------------------------------------------------------------
7099 * Type initialization:
7100 * This problem is tough by the requirement that no dynamic
7101 * memory is used. Also, since swig_type_info structures store pointers to
7102 * swig_cast_info structures and swig_cast_info structures store pointers back
7103 * to swig_type_info structures, we need some lookup code at initialization.
7104 * The idea is that swig generates all the structures that are needed.
7105 * The runtime then collects these partially filled structures.
7106 * The SWIG_InitializeModule function takes these initial arrays out of
7107 * swig_module, and does all the lookup, filling in the swig_module.types
7108 * array with the correct data and linking the correct swig_cast_info
7109 * structures together.
7110 *
7111 * The generated swig_type_info structures are assigned statically to an initial
7112 * array. We just loop through that array, and handle each type individually.
7113 * First we lookup if this type has been already loaded, and if so, use the
7114 * loaded structure instead of the generated one. Then we have to fill in the
7115 * cast linked list. The cast data is initially stored in something like a
7116 * two-dimensional array. Each row corresponds to a type (there are the same
7117 * number of rows as there are in the swig_type_initial array). Each entry in
7118 * a column is one of the swig_cast_info structures for that type.
7119 * The cast_initial array is actually an array of arrays, because each row has
7120 * a variable number of columns. So to actually build the cast linked list,
7121 * we find the array of casts associated with the type, and loop through it
7122 * adding the casts to the list. The one last trick we need to do is making
7123 * sure the type pointer in the swig_cast_info struct is correct.
7124 *
7125 * First off, we lookup the cast->type name to see if it is already loaded.
7126 * There are three cases to handle:
7127 * 1) If the cast->type has already been loaded AND the type we are adding
7128 * casting info to has not been loaded (it is in this module), THEN we
7129 * replace the cast->type pointer with the type pointer that has already
7130 * been loaded.
7131 * 2) If BOTH types (the one we are adding casting info to, and the
7132 * cast->type) are loaded, THEN the cast info has already been loaded by
7133 * the previous module so we just ignore it.
7134 * 3) Finally, if cast->type has not already been loaded, then we add that
7135 * swig_cast_info to the linked list (because the cast->type) pointer will
7136 * be correct.
7137 * ----------------------------------------------------------------------------- */
7138
7139#ifdef __cplusplus
7140extern "C" {
7141#if 0
7142} /* c-mode */
7143#endif
7144#endif
7145
7146#if 0
7147#define SWIGRUNTIME_DEBUG
7148#endif
7149
7150#ifndef SWIG_INIT_CLIENT_DATA_TYPE
7151#define SWIG_INIT_CLIENT_DATA_TYPE void *
7152#endif
7153
7154SWIGRUNTIME void
7156 size_t i;
7157 swig_module_info *module_head, *iter;
7158 int init;
7159
7160 /* check to see if the circular list has been setup, if not, set it up */
7161 if (swig_module.next==0) {
7162 /* Initialize the swig_module */
7166 init = 1;
7167 } else {
7168 init = 0;
7169 }
7170
7171 /* Try and load any already created modules */
7172 module_head = SWIG_GetModule(clientdata);
7173 if (!module_head) {
7174 /* This is the first module loaded for this interpreter */
7175 /* so set the swig module into the interpreter */
7176 SWIG_SetModule(clientdata, &swig_module);
7177 } else {
7178 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7179 iter=module_head;
7180 do {
7181 if (iter==&swig_module) {
7182 /* Our module is already in the list, so there's nothing more to do. */
7183 return;
7184 }
7185 iter=iter->next;
7186 } while (iter!= module_head);
7187
7188 /* otherwise we must add our module into the list */
7189 swig_module.next = module_head->next;
7190 module_head->next = &swig_module;
7191 }
7192
7193 /* When multiple interpreters are used, a module could have already been initialized in
7194 a different interpreter, but not yet have a pointer in this interpreter.
7195 In this case, we do not want to continue adding types... everything should be
7196 set up already */
7197 if (init == 0) return;
7198
7199 /* Now work on filling in swig_module.types */
7200#ifdef SWIGRUNTIME_DEBUG
7201 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
7202#endif
7203 for (i = 0; i < swig_module.size; ++i) {
7204 swig_type_info *type = 0;
7205 swig_type_info *ret;
7206 swig_cast_info *cast;
7207
7208#ifdef SWIGRUNTIME_DEBUG
7209 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7210#endif
7211
7212 /* if there is another module already loaded */
7213 if (swig_module.next != &swig_module) {
7215 }
7216 if (type) {
7217 /* Overwrite clientdata field */
7218#ifdef SWIGRUNTIME_DEBUG
7219 printf("SWIG_InitializeModule: found type %s\n", type->name);
7220#endif
7222 type->clientdata = swig_module.type_initial[i]->clientdata;
7223#ifdef SWIGRUNTIME_DEBUG
7224 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7225#endif
7226 }
7227 } else {
7229 }
7230
7231 /* Insert casting types */
7232 cast = swig_module.cast_initial[i];
7233 while (cast->type) {
7234
7235 /* Don't need to add information already in the list */
7236 ret = 0;
7237#ifdef SWIGRUNTIME_DEBUG
7238 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7239#endif
7240 if (swig_module.next != &swig_module) {
7242#ifdef SWIGRUNTIME_DEBUG
7243 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7244#endif
7245 }
7246 if (ret) {
7247 if (type == swig_module.type_initial[i]) {
7248#ifdef SWIGRUNTIME_DEBUG
7249 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7250#endif
7251 cast->type = ret;
7252 ret = 0;
7253 } else {
7254 /* Check for casting already in the list */
7255 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7256#ifdef SWIGRUNTIME_DEBUG
7257 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7258#endif
7259 if (!ocast) ret = 0;
7260 }
7261 }
7262
7263 if (!ret) {
7264#ifdef SWIGRUNTIME_DEBUG
7265 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7266#endif
7267 if (type->cast) {
7268 type->cast->prev = cast;
7269 cast->next = type->cast;
7270 }
7271 type->cast = cast;
7272 }
7273 cast++;
7274 }
7275 /* Set entry in modules->types array equal to the type */
7276 swig_module.types[i] = type;
7277 }
7278 swig_module.types[i] = 0;
7279
7280#ifdef SWIGRUNTIME_DEBUG
7281 printf("**** SWIG_InitializeModule: Cast List ******\n");
7282 for (i = 0; i < swig_module.size; ++i) {
7283 int j = 0;
7285 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7286 while (cast->type) {
7287 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7288 cast++;
7289 ++j;
7290 }
7291 printf("---- Total casts: %d\n",j);
7292 }
7293 printf("**** SWIG_InitializeModule: Cast List ******\n");
7294#endif
7295}
7296
7297/* This function will propagate the clientdata field of type to
7298* any new swig_type_info structures that have been added into the list
7299* of equivalent types. It is like calling
7300* SWIG_TypeClientData(type, clientdata) a second time.
7301*/
7302SWIGRUNTIME void
7304 size_t i;
7305 swig_cast_info *equiv;
7306 static int init_run = 0;
7307
7308 if (init_run) return;
7309 init_run = 1;
7310
7311 for (i = 0; i < swig_module.size; i++) {
7312 if (swig_module.types[i]->clientdata) {
7313 equiv = swig_module.types[i]->cast;
7314 while (equiv) {
7315 if (!equiv->converter) {
7316 if (equiv->type && !equiv->type->clientdata)
7318 }
7319 equiv = equiv->next;
7320 }
7321 }
7322 }
7323}
7324
7325#ifdef __cplusplus
7326#if 0
7327{ /* c-mode */
7328#endif
7329}
7330#endif
7331
7332
7333
7334/* Forward declaration of where the user's %init{} gets inserted */
7335void SWIG_init_user(lua_State* L );
7336
7337#ifdef __cplusplus
7338extern "C" {
7339#endif
7340/* this is the initialization function
7341 added at the very end of the code
7342 the function is always called SWIG_init, but an earlier #define will rename it
7343*/
7344#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7345LUALIB_API int SWIG_init(lua_State* L)
7346#else
7347SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
7348#endif
7349{
7350#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
7351 int i;
7352 int globalRegister = 0;
7353 /* start with global table */
7355 /* SWIG's internal initialisation */
7356 SWIG_InitializeModule((void*)L);
7358#endif
7359
7360#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
7361 /* add a global fn */
7364#endif
7365
7366#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7367 /* set up base class pointers (the hierarchy) */
7368 for (i = 0; swig_types[i]; i++){
7369 if (swig_types[i]->clientdata){
7371 }
7372 }
7373#ifdef SWIG_LUA_MODULE_GLOBAL
7374 globalRegister = 1;
7375#endif
7376
7377
7378#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
7380#endif
7381
7382#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
7383 for (i = 0; swig_types[i]; i++){
7384 if (swig_types[i]->clientdata){
7386 }
7387 }
7388#endif
7389
7390#if defined(SWIG_LUA_ELUA_EMULATE)
7391 lua_newtable(L);
7392 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
7393 SWIG_Lua_elua_emulate_register_clear(L);
7394 if(globalRegister) {
7395 lua_pushstring(L,swig_SwigModule.name);
7396 lua_pushvalue(L,-2);
7397 lua_rawset(L,-4);
7398 }
7399#endif
7400
7401#endif
7402
7403#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7404 /* invoke user-specific initialization */
7406 /* end module */
7407 /* Note: We do not clean up the stack here (Lua will do this for us). At this
7408 point, we have the globals table and out module table on the stack. Returning
7409 one value makes the module table the result of the require command. */
7410 return 1;
7411#else
7412 return 0;
7413#endif
7414}
7415
7416#ifdef __cplusplus
7417}
7418#endif
7419
7420
7421const char* SWIG_LUACODE=
7422 "";
7423
7424void SWIG_init_user(lua_State* L)
7425{
7426 /* exec Lua code if applicable */
7428}
7429
int compare(Agobj_t *l, Agobj_t *r)
Definition actions.c:686
static void init(int argc, char *argv[], double *angle, double *accuracy, int *check_edges_with_same_endpoint, int *seed, const char **color_scheme, int *lightness)
expr procedure type
Definition exparse.y:208
static int flags
Definition gc.c:61
static double len(glCompPoint p)
Definition glutils.c:150
static attrs_t * L
Definition gmlparse.c:93
edge
Definition gmlparse.y:240
node NULL
Definition grammar.y:163
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
Definition gv_lua.cpp:1839
SWIGRUNTIME void SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata)
Definition gv_lua.cpp:7155
static swig_type_info _swigt__p_Agsym_t
Definition gv_lua.cpp:7070
bool ok(Agraph_t *g)
Definition gv.cpp:362
static swig_cast_info _swigc__p_Agraph_t[]
Definition gv_lua.cpp:7083
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
Definition gv_lua.cpp:2582
static int _wrap_firstedge__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5200
#define SWIG_DOSTRING_FAIL(S)
Definition gv_lua.cpp:2695
static swig_cast_info * swig_cast_initial[]
Definition gv_lua.cpp:7087
static int _wrap_nextedge(lua_State *L)
Definition gv_lua.cpp:5299
static int _wrap_findattr__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4458
bool tred(Agraph_t *g)
Definition gv.cpp:728
static int _wrap_getv__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3865
#define lua_rawlen
Definition gv_lua.cpp:906
static int _wrap_nextout(lua_State *L)
Definition gv_lua.cpp:5462
Agraph_t * firstsubg(Agraph_t *g)
Definition gv.cpp:367
static int _wrap_firstattr__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6127
static int _wrap_strictgraph(lua_State *L)
Definition gv_lua.cpp:3034
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
Definition gv_lua.cpp:2531
Agraph_t * read(const char *filename)
Definition gv.cpp:66
static int _wrap_renderchannel(lua_State *L)
Definition gv_lua.cpp:6791
const LUA_REG_TYPE swig_lua_const_info
Definition gv_lua.cpp:1001
static int _wrap_read__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3114
Agraph_t * nextsubg(Agraph_t *g, Agraph_t *sg)
Definition gv.cpp:373
Agraph_t * readstring(char *string)
Definition gv.cpp:54
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
Definition gv_lua.cpp:1135
static int _wrap_rm__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6409
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, int skip_check)
Definition gv_lua.cpp:2130
char * getv(Agraph_t *g, char *attr)
Definition gv.cpp:130
static int _wrap_graphof__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4631
static int _wrap_firstattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6072
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
Definition gv_lua.cpp:959
Agraph_t * findsubg(Agraph_t *g, char *name)
Definition gv.cpp:247
static int _wrap_firsttail(lua_State *L)
Definition gv_lua.cpp:5799
SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
Definition gv_lua.cpp:1624
static int _wrap_firstin__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5581
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
Definition gv_lua.cpp:2165
static int _wrap_nameof(lua_State *L)
Definition gv_lua.cpp:4260
void renderresult(Agraph_t *g, const char *format, char *outdata)
Definition gv.cpp:690
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
Definition gv_lua.cpp:1404
#define SWIG_CheckState(r)
Definition gv_lua.cpp:325
#define SWIG_fail_ptr(func_name, argnum, type)
Definition gv_lua.cpp:1092
#define SWIG_NewMemberObj(L, ptr, sz, type)
Definition gv_lua.cpp:1074
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2250
static swig_cast_info _swigc__p_FILE[]
Definition gv_lua.cpp:7085
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
Definition gv_lua.cpp:427
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2307
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
Definition gv_lua.cpp:2619
static int _wrap_findedge(lua_State *L)
Definition gv_lua.cpp:4373
static int _wrap_renderresult(lua_State *L)
Definition gv_lua.cpp:6762
#define SWIGTYPE_p_Agnode_t
Definition gv_lua.cpp:2729
static int _wrap_ok__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4810
struct swig_cast_info swig_cast_info
static int _wrap_strictdigraph(lua_State *L)
Definition gv_lua.cpp:3054
#define SWIG_LUA_POINTER
Definition gv_lua.cpp:988
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
Definition gv_lua.cpp:393
Agraph_t * strictgraph(char *name)
Definition gv.cpp:42
static int _wrap_setv__SWIG_4(lua_State *L)
Definition gv_lua.cpp:3618
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type)
Definition gv_lua.cpp:2605
char * setv(Agraph_t *g, char *attr, char *val)
Definition gv.cpp:152
Agedge_t * nextout(Agraph_t *g, Agedge_t *e)
Definition gv.cpp:395
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info *SWIGUNUSED swig_type, int first_arg, swig_lua_base_iterator_func func, int *const ret)
Definition gv_lua.cpp:1486
static int _wrap_nextedge__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5268
static int _wrap_firstsupg(lua_State *L)
Definition gv_lua.cpp:5035
static int _wrap_renderdata(lua_State *L)
Definition gv_lua.cpp:6821
static int _wrap_read__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3094
SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2461
static int _wrap_render__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6567
static int _wrap_tailof(lua_State *L)
Definition gv_lua.cpp:4583
#define SWIG_ConvertPtr(L, idx, ptr, type, flags)
Definition gv_lua.cpp:1070
static int _wrap_getv(lua_State *L)
Definition gv_lua.cpp:4039
SWIGINTERN int SWIG_Lua_dostring(lua_State *L, const char *str)
Definition gv_lua.cpp:2703
static int _wrap_nextin(lua_State *L)
Definition gv_lua.cpp:5735
static int _wrap_nextnode(lua_State *L)
Definition gv_lua.cpp:6008
Agraph_t * rootof(Agraph_t *g)
Definition gv.cpp:327
static swig_cast_info _swigc__p_Agnode_t[]
Definition gv_lua.cpp:7082
static const char *() lua_tolstring(lua_State *L, int idx, size_t *len)
Definition gv_lua.cpp:916
static int _wrap_graph__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3177
#define SWIG_fail_arg(func_name, argnum, type)
Definition gv_lua.cpp:1088
Agnode_t * headof(Agedge_t *e)
Definition gv.cpp:287
#define SWIGRUNTIME
Definition gv_lua.cpp:175
#define SWIGTYPE_p_Agraph_t
Definition gv_lua.cpp:2730
#define SWIG_Lua_get_table(L, n)
Definition gv_lua.cpp:1100
Agnode_t * firsttail(Agnode_t *n)
Definition gv.cpp:494
#define SWIG_RUNTIME_VERSION
Definition gv_lua.cpp:154
#define SWIGTYPE_p_Agsym_t
Definition gv_lua.cpp:2731
Agraph_t * strictdigraph(char *name)
Definition gv.cpp:48
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
Definition gv_lua.cpp:541
static int _wrap_firstedge(lua_State *L)
Definition gv_lua.cpp:5224
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition gv_lua.cpp:616
bool renderchannel(Agraph_t *g, const char *format, const char *channelname)
Definition gv.cpp:648
SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
Definition gv_lua.cpp:1586
#define SWIG_Lua_add_function(L, n, f)
Definition gv_lua.cpp:1103
Agraph_t * nextsupg(Agraph_t *g, Agraph_t *sg)
Definition gv.cpp:382
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
Definition gv_lua.cpp:713
#define SWIG_AddCast(r)
Definition gv_lua.cpp:324
#define SWIG_LUA_CHAR
Definition gv_lua.cpp:990
static int _wrap_write(lua_State *L)
Definition gv_lua.cpp:6906
static int _wrap_findsubg(lua_State *L)
Definition gv_lua.cpp:4319
static int _wrap_node(lua_State *L)
Definition gv_lua.cpp:3248
static int _wrap_graph__SWIG_0(lua_State *L)
Definition gv_lua.cpp:2994
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
Definition gv_lua.cpp:2202
static int _wrap_nextnode__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5977
static int _wrap_firstout__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5145
static int _wrap_findattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4404
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
Definition gv_lua.cpp:1854
Agedge_t * firstedge(Agraph_t *g)
Definition gv.cpp:409
Agraph_t * graphof(Agraph_t *g)
Definition gv.cpp:303
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
Definition gv_lua.cpp:700
static swig_module_info swig_module
Definition gv_lua.cpp:2734
static int _wrap_firstattr__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6182
static int _wrap_getv__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3892
static int _wrap_firstin(lua_State *L)
Definition gv_lua.cpp:5660
static int _wrap_firsthead(lua_State *L)
Definition gv_lua.cpp:5526
char * nameof(Agraph_t *g)
Definition gv.cpp:343
static int _wrap_nextin__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5704
#define SWIG_SetModule(clientdata, pointer)
Definition gv_lua.cpp:1078
const LUA_REG_TYPE swig_lua_method
Definition gv_lua.cpp:1000
Agnode_t * firstnode(Agraph_t *g)
Definition gv.cpp:518
#define SWIG_INIT_CLIENT_DATA_TYPE
Definition gv_lua.cpp:7151
static int _wrap_edge__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3306
Agedge_t * firstout(Agraph_t *g)
Definition gv.cpp:384
#define SWIG_POINTER_RELEASE
Definition gv_lua.cpp:192
static swig_lua_class * swig_SwigModule_classes[]
Definition gv_lua.cpp:7046
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
Definition gv_lua.cpp:497
SWIGRUNTIME swig_module_info * SWIG_Lua_GetModule(lua_State *L)
Definition gv_lua.cpp:1124
static int _wrap_getv__SWIG_3(lua_State *L)
Definition gv_lua.cpp:3946
#define SWIGUNUSED
Definition gv_lua.cpp:53
#define lua_rawsetp(L, index, ptr)
Definition gv_lua.cpp:940
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
Definition gv_lua.cpp:557
#define SWIG_POINTER_CLEAR
Definition gv_lua.cpp:191
static int _wrap_setv(lua_State *L)
Definition gv_lua.cpp:3686
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
Definition gv_lua.cpp:408
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
Definition gv_lua.cpp:661
static int _wrap_write__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6875
SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
Definition gv_lua.cpp:1913
static int _wrap_ok__SWIG_3(lua_State *L)
Definition gv_lua.cpp:4882
static int _wrap_nameof__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4236
static int _wrap_graphof__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4655
static int _wrap_nextattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6096
SWIGINTERN void SWIG_Lua_add_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn)
Definition gv_lua.cpp:2025
static swig_lua_namespace * swig_SwigModule_namespaces[]
Definition gv_lua.cpp:7049
#define SWIG_check_num_args(func_name, a, b)
Definition gv_lua.cpp:1094
static int _wrap_findattr__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4431
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
Definition gv_lua.cpp:1305
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
Definition gv_lua.cpp:1676
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
Definition gv_lua.cpp:2633
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
Definition gv_lua.cpp:1426
static int _wrap_render__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6594
static int _wrap_nextsubg(lua_State *L)
Definition gv_lua.cpp:5004
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
Definition gv_lua.cpp:1898
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2042
#define SWIG_NewPointerObj(L, ptr, type, owner)
Definition gv_lua.cpp:1069
#define SWIGINTERN
Definition gv_lua.cpp:73
static int _wrap_tred(lua_State *L)
Definition gv_lua.cpp:6965
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
Definition gv_lua.cpp:2496
bool layout(Agraph_t *g, const char *engine)
Definition gv.cpp:615
static int _wrap_getv__SWIG_5(lua_State *L)
Definition gv_lua.cpp:4008
static int _wrap_nextout__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5169
static swig_type_info _swigt__p_Agraph_t
Definition gv_lua.cpp:7069
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition gv_lua.cpp:571
static swig_lua_const_info swig_SwigModule_constants[]
Definition gv_lua.cpp:6992
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2423
static int _wrap_setv__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3524
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
Definition gv_lua.cpp:2513
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
Definition gv_lua.cpp:728
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
Definition gv_lua.cpp:1149
Agsym_t * nextattr(Agraph_t *g, Agsym_t *a)
Definition gv.cpp:549
#define SWIG_POINTER_NO_NULL
Definition gv_lua.cpp:190
static int _wrap_firstout__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5363
static int _wrap_protonode(lua_State *L)
Definition gv_lua.cpp:4762
Agnode_t * tailof(Agedge_t *e)
Definition gv.cpp:295
bool write(Agraph_t *g, const char *filename)
Definition gv.cpp:717
static int _wrap_render__SWIG_3(lua_State *L)
Definition gv_lua.cpp:6628
char * renderdata(Agraph_t *g, const char *format)
Definition gv.cpp:699
#define lua_absindex(L, i)
Definition gv_lua.cpp:935
#define SWIG_LUA_FLOAT
Definition gv_lua.cpp:986
static int _wrap_setv__SWIG_5(lua_State *L)
Definition gv_lua.cpp:3652
static int _wrap_firstattr(lua_State *L)
Definition gv_lua.cpp:6206
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
Definition gv_lua.cpp:1380
static int _wrap_headof(lua_State *L)
Definition gv_lua.cpp:4559
static int _wrap_firstedge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5090
static int _wrap_edge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3275
static int _wrap_nextattr(lua_State *L)
Definition gv_lua.cpp:6296
#define SWIG_NullReferenceError
Definition gv_lua.cpp:757
static int _wrap_firstout(lua_State *L)
Definition gv_lua.cpp:5387
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
Definition gv_lua.cpp:511
static int _wrap_nexthead(lua_State *L)
Definition gv_lua.cpp:5550
#define SWIG_POINTER_DISOWN
Definition gv_lua.cpp:188
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
Definition gv_lua.cpp:1342
struct swig_type_info swig_type_info
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
Definition gv_lua.cpp:1824
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
Definition gv_lua.cpp:689
Agnode_t * protonode(Agraph_t *g)
Definition gv.cpp:334
static int _wrap_nameof__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4212
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2341
static swig_cast_info _swigc__p_Agedge_t[]
Definition gv_lua.cpp:7081
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
Definition gv_lua.cpp:645
bool rm(Agraph_t *g)
Definition gv.cpp:584
Agnode_t * findnode(Agraph_t *g, char *name)
Definition gv.cpp:253
static int _wrap_layout(lua_State *L)
Definition gv_lua.cpp:6516
static int _wrap_firstin__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5636
#define SWIGTYPE_p_Agedge_t
Definition gv_lua.cpp:2728
static int _wrap_rm__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6433
Agnode_t * nexttail(Agnode_t *n, Agnode_t *t)
Definition gv.cpp:503
static int _wrap_firstnode__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5854
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
Definition gv_lua.cpp:1703
Agraph_t * firstsupg(Agraph_t *g)
Definition gv.cpp:380
static int _wrap_nextattr__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6265
static int _wrap_edge(lua_State *L)
Definition gv_lua.cpp:3390
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
Definition gv_lua.cpp:1765
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
Definition gv_lua.cpp:2984
static int _wrap_firstnode(lua_State *L)
Definition gv_lua.cpp:5933
#define SWIG_GetModule(clientdata)
Definition gv_lua.cpp:1077
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
Definition gv_lua.cpp:2593
static int _wrap_nextin__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5605
Agsym_t * findattr(Agraph_t *g, char *name)
Definition gv.cpp:267
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
Definition gv_lua.cpp:1790
static swig_lua_method swig_SwigModule_methods[]
Definition gv_lua.cpp:6995
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
Definition gv_lua.cpp:462
static int _wrap_getv__SWIG_4(lua_State *L)
Definition gv_lua.cpp:3977
SWIGRUNTIME void SWIG_PropagateClientData(void)
Definition gv_lua.cpp:7303
static int _wrap_ok(lua_State *L)
Definition gv_lua.cpp:4906
static int _wrap_graphof(lua_State *L)
Definition gv_lua.cpp:4679
static int _wrap_getv__SWIG_2(lua_State *L)
Definition gv_lua.cpp:3919
Agraph_t * digraph(char *name)
Definition gv.cpp:36
#define lua_pushglobaltable(L)
Definition gv_lua.cpp:930
static int _wrap_render__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6543
static int _wrap_firstsubg(lua_State *L)
Definition gv_lua.cpp:4980
#define SWIG_init_user
Definition gv_lua.cpp:2742
static int _wrap_rootof(lua_State *L)
Definition gv_lua.cpp:4738
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
Definition gv_lua.cpp:520
static int _wrap_setv__SWIG_3(lua_State *L)
Definition gv_lua.cpp:3584
Agedge_t * firstin(Agraph_t *g)
Definition gv.cpp:461
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
Definition gv_lua.cpp:435
#define SWIG_isptrtype(L, I)
Definition gv_lua.cpp:1114
#define SWIG_ERROR_RELEASE_NOT_OWNED
Definition gv_lua.cpp:283
Agnode_t * nextnode(Agraph_t *g, Agnode_t *n)
Definition gv.cpp:524
#define SWIG_TYPE_TABLE_NAME
Definition gv_lua.cpp:162
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:1943
static swig_type_info _swigt__p_FILE
Definition gv_lua.cpp:7071
Agedge_t * nextin(Agnode_t *n, Agedge_t *e)
Definition gv.cpp:488
Agraph_t * graph(char *name)
Definition gv.cpp:30
static int _wrap_firstnode__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5909
static int _wrap_render(lua_State *L)
Definition gv_lua.cpp:6658
static int _wrap_findattr(lua_State *L)
Definition gv_lua.cpp:4485
static int _wrap_protoedge(lua_State *L)
Definition gv_lua.cpp:4786
int(* swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret)
Definition gv_lua.cpp:1484
struct swig_module_info swig_module_info
#define SWIG_init
Definition gv_lua.cpp:2741
static int _wrap_rm(lua_State *L)
Definition gv_lua.cpp:6457
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
Definition gv_lua.cpp:1874
#define SWIG_ERROR
Definition gv_lua.cpp:279
static swig_lua_namespace swig_SwigModule
Definition gv_lua.cpp:7053
static int _wrap_findnode(lua_State *L)
Definition gv_lua.cpp:4346
#define SWIGTYPE_p_FILE
Definition gv_lua.cpp:2732
Agsym_t * firstattr(Agraph_t *g)
Definition gv.cpp:542
static int _wrap_nexttail(lua_State *L)
Definition gv_lua.cpp:5823
static int _wrap_write__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6848
static int _wrap_edge__SWIG_2(lua_State *L)
Definition gv_lua.cpp:3333
static int _wrap_graph(lua_State *L)
Definition gv_lua.cpp:3204
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
Definition gv_lua.cpp:970
static int _wrap_readstring(lua_State *L)
Definition gv_lua.cpp:3074
static int _wrap_nextedge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5114
static swig_type_info * swig_type_initial[]
Definition gv_lua.cpp:7073
static int _wrap_ok__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4858
static int _wrap_ok__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4834
static int _wrap_graphof__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4607
static int _wrap_edge__SWIG_3(lua_State *L)
Definition gv_lua.cpp:3360
static swig_lua_attribute swig_SwigModule_attributes[]
Definition gv_lua.cpp:6989
static swig_cast_info _swigc__p_Agsym_t[]
Definition gv_lua.cpp:7084
static int _wrap_read(lua_State *L)
Definition gv_lua.cpp:3138
Agedge_t * nextedge(Agraph_t *g, Agedge_t *e)
Definition gv.cpp:411
static int _wrap_nextnode__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5878
#define SWIG_LUACODE
Definition gv_lua.cpp:2744
Agedge_t * findedge(Agnode_t *t, Agnode_t *h)
Definition gv.cpp:259
#define SWIG_LUA_INT
Definition gv_lua.cpp:985
static int _wrap_setv__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3494
static int _wrap_nextsupg(lua_State *L)
Definition gv_lua.cpp:5059
#define SWIGEXPORT
Definition gv_lua.cpp:101
#define SWIG_IsOK(r)
Definition gv_lua.cpp:285
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
Definition gv_lua.cpp:1811
static int _wrap_nameof__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4188
Agnode_t * firsthead(Agnode_t *n)
Definition gv.cpp:425
static swig_type_info _swigt__p_Agnode_t
Definition gv_lua.cpp:7068
#define SWIG_LUA_BINARY
Definition gv_lua.cpp:989
bool render(Agraph_t *g)
Definition gv.cpp:624
static int _wrap_rm__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6385
static swig_type_info _swigt__p_Agedge_t
Definition gv_lua.cpp:7067
#define SWIG_LUA_STRING
Definition gv_lua.cpp:987
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
static swig_type_info * swig_types[6]
Definition gv_lua.cpp:2733
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
Definition gv_lua.cpp:1928
static int _wrap_setv__SWIG_2(lua_State *L)
Definition gv_lua.cpp:3554
#define SWIG_OK
Definition gv_lua.cpp:277
Agnode_t * nexthead(Agnode_t *n, Agnode_t *h)
Definition gv.cpp:434
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
Definition gv_lua.cpp:2059
#define SWIGINTERNINLINE
Definition gv_lua.cpp:78
static int _wrap_digraph(lua_State *L)
Definition gv_lua.cpp:3014
#define SWIG_Lua_add_boolean(L, n, b)
Definition gv_lua.cpp:1108
Agedge_t * protoedge(Agraph_t *g)
Definition gv.cpp:338
static int _wrap_nextattr__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6151
#define lua_rawgetp(L, index, ptr)
Definition gv_lua.cpp:945
static int _wrap_nextout__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5431
#define SWIGRUNTIMEINLINE
Definition gv_lua.cpp:179
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
Definition gv_lua.cpp:489
#define SWIG_MAXCASTRANK
Definition gv_perl.cpp:312
#define SWIG_CastRank(r)
Definition gv_perl.cpp:315
Graphviz context library.
double number
Definition gvdevice.c:422
GVIO_API const char * format
Definition gvio.h:51
static gvloadimage_engine_t engine
textitem scanner parser str
Definition htmlparse.y:224
static Agedge_t * top(edge_stack_t *sp)
Definition tred.c:73
static int table[NTYPES][NTYPES]
Definition mincross.c:1755
void *(* swig_converter_func)(void *, int *)
Definition runtime.h:360
struct swig_type_info *(* swig_dycast_func)(void **)
Definition runtime.h:361
void reset(sgraph *G)
Definition sgraph.c:29
graph or subgraph
Definition cgraph.h:425
string attribute descriptor symbol in Agattr_s.dict
Definition cgraph.h:637
Definition legal.c:50
swig_type_info * type
Definition gv_guile.cpp:372
struct swig_cast_info * prev
Definition gv_guile.cpp:375
struct swig_cast_info * next
Definition gv_guile.cpp:374
swig_converter_func converter
Definition gv_guile.cpp:373
lua_CFunction setmethod
Definition gv_lua.cpp:1020
const char * name
Definition gv_lua.cpp:1018
lua_CFunction getmethod
Definition gv_lua.cpp:1019
swig_type_info ** type
Definition gv_lua.cpp:1038
void(* destructor)(void *)
Definition gv_lua.cpp:1040
const char ** base_names
Definition gv_lua.cpp:1046
swig_lua_attribute * attributes
Definition gv_lua.cpp:1042
const char * fqname
Definition gv_lua.cpp:1037
swig_lua_namespace * cls_static
Definition gv_lua.cpp:1043
struct swig_lua_class ** bases
Definition gv_lua.cpp:1045
swig_lua_method * metatable
Definition gv_lua.cpp:1044
lua_CFunction constructor
Definition gv_lua.cpp:1039
const char * name
Definition gv_lua.cpp:1036
swig_lua_method * methods
Definition gv_lua.cpp:1041
swig_lua_method * ns_methods
Definition gv_lua.cpp:1028
swig_lua_attribute * ns_attributes
Definition gv_lua.cpp:1029
const char * name
Definition gv_lua.cpp:1027
struct swig_lua_class ** ns_classes
Definition gv_lua.cpp:1031
swig_lua_const_info * ns_constants
Definition gv_lua.cpp:1030
struct swig_lua_namespace ** ns_namespaces
Definition gv_lua.cpp:1032
swig_type_info * type
Definition gv_lua.cpp:1063
swig_type_info * type
Definition gv_lua.cpp:1052
lua_CFunction get
Definition gv_lua.cpp:995
const char * name
Definition gv_lua.cpp:994
lua_CFunction set
Definition gv_lua.cpp:996
swig_type_info ** types
Definition gv_guile.cpp:382
swig_cast_info ** cast_initial
Definition gv_guile.cpp:386
swig_type_info ** type_initial
Definition gv_guile.cpp:385
struct swig_module_info * next
Definition gv_guile.cpp:384
swig_dycast_func dcast
Definition gv_guile.cpp:364
void * clientdata
Definition gv_guile.cpp:366
const char * name
Definition gv_guile.cpp:362
const char * str
Definition gv_guile.cpp:363
struct swig_cast_info * cast
Definition gv_guile.cpp:365
static mytime_t T
Definition timing.c:41
Definition grammar.c:93
char * name
Definition grammar.c:98