Graphviz 12.0.1~dev.20240716.0800
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/* some language headers (e.g. php.h, ruby.h) leave these defined */
2800#undef PACKAGE_BUGREPORT
2801#undef PACKAGE_STRING
2802#undef PACKAGE_TARNAME
2803#undef PACKAGE_VERSION
2804#undef PACKAGE_NAME
2805
2806#include "config.h"
2807#include <gvc/gvc.h>
2808
2810/*** New empty graph */
2811extern Agraph_t *graph(char *name);
2812extern Agraph_t *digraph(char *name);
2813extern Agraph_t *strictgraph(char *name);
2814extern Agraph_t *strictdigraph(char *name);
2815/*** New graph from a dot-syntax string or file */
2816extern Agraph_t *readstring(char *string);
2817extern Agraph_t *read(const char *filename);
2818extern Agraph_t *read(FILE *f);
2819/*** Add new subgraph to existing graph */
2820extern Agraph_t *graph(Agraph_t *g, char *name);
2821
2823/*** Add new node to existing graph */
2824extern Agnode_t *node(Agraph_t *g, char *name);
2825
2827/*** Add new edge between existing nodes */
2828extern Agedge_t *edge(Agnode_t *t, Agnode_t *h);
2829/*** 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 */
2830extern Agedge_t *edge(Agnode_t *t, char *hname);
2831/*** 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 */
2832extern Agedge_t *edge(char *tname, Agnode_t *h);
2833/*** Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist */
2834extern Agedge_t *edge(Agraph_t *g, char *tname, char *hname);
2835
2837/*** Set value of named attribute of graph/node/edge - creating attribute if necessary */
2838extern char *setv(Agraph_t *g, char *attr, char *val);
2839extern char *setv(Agnode_t *n, char *attr, char *val);
2840extern char *setv(Agedge_t *e, char *attr, char *val);
2841
2842/*** Set value of existing attribute of graph/node/edge (using attribute handle) */
2843extern char *setv(Agraph_t *g, Agsym_t *a, char *val);
2844extern char *setv(Agnode_t *n, Agsym_t *a, char *val);
2845extern char *setv(Agedge_t *e, Agsym_t *a, char *val);
2846
2848/*** Get value of named attribute of graph/node/edge */
2849extern char *getv(Agraph_t *g, char *attr);
2850extern char *getv(Agnode_t *n, char *attr);
2851extern char *getv(Agedge_t *e, char *attr);
2852
2853/*** Get value of attribute of graph/node/edge (using attribute handle) */
2854extern char *getv(Agraph_t *g, Agsym_t *a);
2855extern char *getv(Agnode_t *n, Agsym_t *a);
2856extern char *getv(Agedge_t *e, Agsym_t *a);
2857
2859extern char *nameof(Agraph_t *g);
2860extern char *nameof(Agnode_t *n);
2861extern char *nameof(Agsym_t *a);
2862
2864extern Agraph_t *findsubg(Agraph_t *g, char *name);
2865extern Agnode_t *findnode(Agraph_t *g, char *name);
2866extern Agedge_t *findedge(Agnode_t *t, Agnode_t *h);
2867
2869extern Agsym_t *findattr(Agraph_t *g, char *name);
2870extern Agsym_t *findattr(Agnode_t *n, char *name);
2871extern Agsym_t *findattr(Agedge_t *e, char *name);
2872
2874extern Agnode_t *headof(Agedge_t *e);
2875extern Agnode_t *tailof(Agedge_t *e);
2876extern Agraph_t *graphof(Agraph_t *g);
2877extern Agraph_t *graphof(Agedge_t *e);
2878extern Agraph_t *graphof(Agnode_t *n);
2879extern Agraph_t *rootof(Agraph_t *g);
2880
2882extern Agnode_t *protonode(Agraph_t *g);
2883extern Agedge_t *protoedge(Agraph_t *g);
2884
2886/*** Iteration termination tests */
2887extern bool ok(Agraph_t *g);
2888extern bool ok(Agnode_t *n);
2889extern bool ok(Agedge_t *e);
2890extern bool ok(Agsym_t *a);
2891
2892/*** Iterate over subgraphs of a graph */
2893extern Agraph_t *firstsubg(Agraph_t *g);
2894extern Agraph_t *nextsubg(Agraph_t *g, Agraph_t *sg);
2895
2896/*** Iterate over supergraphs of a graph (obscure and rarely useful) */
2897extern Agraph_t *firstsupg(Agraph_t *g);
2898extern Agraph_t *nextsupg(Agraph_t *g, Agraph_t *sg);
2899
2900/*** Iterate over edges of a graph */
2901extern Agedge_t *firstedge(Agraph_t *g);
2902extern Agedge_t *nextedge(Agraph_t *g, Agedge_t *e);
2903
2904/*** Iterate over outedges of a graph */
2905extern Agedge_t *firstout(Agraph_t *g);
2906extern Agedge_t *nextout(Agraph_t *g, Agedge_t *e);
2907
2908/*** Iterate over edges of a node */
2909extern Agedge_t *firstedge(Agnode_t *n);
2910extern Agedge_t *nextedge(Agnode_t *n, Agedge_t *e);
2911
2912/*** Iterate over out-edges of a node */
2913extern Agedge_t *firstout(Agnode_t *n);
2914extern Agedge_t *nextout(Agnode_t *n, Agedge_t *e);
2915
2916/*** Iterate over head nodes reachable from out-edges of a node */
2917extern Agnode_t *firsthead(Agnode_t *n);
2918extern Agnode_t *nexthead(Agnode_t *n, Agnode_t *h);
2919
2920/*** Iterate over in-edges of a graph */
2921extern Agedge_t *firstin(Agraph_t *g);
2922extern Agedge_t *nextin(Agnode_t *n, Agedge_t *e);
2923
2924/*** Iterate over in-edges of a node */
2925extern Agedge_t *firstin(Agnode_t *n);
2926extern Agedge_t *nextin(Agraph_t *g, Agedge_t *e);
2927
2928/*** Iterate over tail nodes reachable from in-edges of a node */
2929extern Agnode_t *firsttail(Agnode_t *n);
2930extern Agnode_t *nexttail(Agnode_t *n, Agnode_t *t);
2931
2932/*** Iterate over nodes of a graph */
2933extern Agnode_t *firstnode(Agraph_t *g);
2934extern Agnode_t *nextnode(Agraph_t *g, Agnode_t *n);
2935
2936/*** Iterate over nodes of an edge */
2937extern Agnode_t *firstnode(Agedge_t *e);
2938extern Agnode_t *nextnode(Agedge_t *e, Agnode_t *n);
2939
2940/*** Iterate over attributes of a graph */
2941extern Agsym_t *firstattr(Agraph_t *g);
2942extern Agsym_t *nextattr(Agraph_t *g, Agsym_t *a);
2943
2944/*** Iterate over attributes of an edge */
2945extern Agsym_t *firstattr(Agedge_t *e);
2946extern Agsym_t *nextattr(Agedge_t *e, Agsym_t *a);
2947
2948/*** Iterate over attributes of a node */
2949extern Agsym_t *firstattr(Agnode_t *n);
2950extern Agsym_t *nextattr(Agnode_t *n, Agsym_t *a);
2951
2953extern bool rm(Agraph_t *g);
2954extern bool rm(Agnode_t *n);
2955extern bool rm(Agedge_t *e);
2956
2958/*** Annotate a graph with layout attributes and values using a specific layout engine */
2959extern bool layout(Agraph_t *g, const char *engine);
2960
2962/*** Render a layout into attributes of the graph */
2963extern bool render(Agraph_t *g);
2964/*** Render a layout to stdout */
2965extern bool render(Agraph_t *g, const char *format);
2966/*** Render to an open file */
2967extern bool render(Agraph_t *g, const char *format, FILE *fout);
2968/*** Render a layout to an unopened file by name */
2969extern bool render(Agraph_t *g, const char *format, const char *filename);
2970/*** Render to a string result */
2971#ifdef SWIGJAVA
2972extern char* renderresult(Agraph_t *ing, const char *format);
2973#else
2974extern void renderresult(Agraph_t *g, const char *format, char *outdata);
2975/*** Render to an open channel */
2976extern bool renderchannel(Agraph_t *g, const char *format, const char *channelname);
2977#endif
2978/*** Render a layout to a malloc'ed string, to be free'd by the caller */
2979/*** (deprecated - too easy to leak memory) */
2980/*** (still needed for "eval [gv::renderdata $G tk]" ) */
2981extern char* renderdata(Agraph_t *g, const char *format);
2982
2983/*** Writing graph back to file */
2984extern bool write(Agraph_t *g, const char *filename);
2985extern bool write(Agraph_t *g, FILE *f);
2986
2987/*** Graph transformation tools */
2988extern bool tred(Agraph_t *g);
2989
2990
2991
2992SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
2993 int ret = lua_isstring(L, idx);
2994 if (!ret)
2995 ret = lua_isnil(L, idx);
2996 return ret;
2997}
2998
2999#ifdef __cplusplus
3000extern "C" {
3001#endif
3002static int _wrap_graph__SWIG_0(lua_State* L) {
3003 {
3004 int SWIG_arg = 0;
3005 char *arg1 = (char *) 0 ;
3006 Agraph_t *result = 0 ;
3007
3008 SWIG_check_num_args("graph",1,1)
3009 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("graph",1,"char *");
3010 arg1 = (char *)lua_tostring(L, 1);
3011 result = (Agraph_t *)graph(arg1);
3012 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3013 return SWIG_arg;
3014
3015 fail: SWIGUNUSED;
3016 }
3017 lua_error(L);
3018 return 0;
3019}
3020
3021
3022static int _wrap_digraph(lua_State* L) {
3023 {
3024 int SWIG_arg = 0;
3025 char *arg1 = (char *) 0 ;
3026 Agraph_t *result = 0 ;
3027
3028 SWIG_check_num_args("digraph",1,1)
3029 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("digraph",1,"char *");
3030 arg1 = (char *)lua_tostring(L, 1);
3031 result = (Agraph_t *)digraph(arg1);
3032 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3033 return SWIG_arg;
3034
3035 fail: SWIGUNUSED;
3036 }
3037 lua_error(L);
3038 return 0;
3039}
3040
3041
3042static int _wrap_strictgraph(lua_State* L) {
3043 {
3044 int SWIG_arg = 0;
3045 char *arg1 = (char *) 0 ;
3046 Agraph_t *result = 0 ;
3047
3048 SWIG_check_num_args("strictgraph",1,1)
3049 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("strictgraph",1,"char *");
3050 arg1 = (char *)lua_tostring(L, 1);
3051 result = (Agraph_t *)strictgraph(arg1);
3052 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3053 return SWIG_arg;
3054
3055 fail: SWIGUNUSED;
3056 }
3057 lua_error(L);
3058 return 0;
3059}
3060
3061
3062static int _wrap_strictdigraph(lua_State* L) {
3063 {
3064 int SWIG_arg = 0;
3065 char *arg1 = (char *) 0 ;
3066 Agraph_t *result = 0 ;
3067
3068 SWIG_check_num_args("strictdigraph",1,1)
3069 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("strictdigraph",1,"char *");
3070 arg1 = (char *)lua_tostring(L, 1);
3071 result = (Agraph_t *)strictdigraph(arg1);
3072 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3073 return SWIG_arg;
3074
3075 fail: SWIGUNUSED;
3076 }
3077 lua_error(L);
3078 return 0;
3079}
3080
3081
3082static int _wrap_readstring(lua_State* L) {
3083 {
3084 int SWIG_arg = 0;
3085 char *arg1 = (char *) 0 ;
3086 Agraph_t *result = 0 ;
3087
3088 SWIG_check_num_args("readstring",1,1)
3089 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("readstring",1,"char *");
3090 arg1 = (char *)lua_tostring(L, 1);
3091 result = (Agraph_t *)readstring(arg1);
3092 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3093 return SWIG_arg;
3094
3095 fail: SWIGUNUSED;
3096 }
3097 lua_error(L);
3098 return 0;
3099}
3100
3101
3102static int _wrap_read__SWIG_0(lua_State* L) {
3103 {
3104 int SWIG_arg = 0;
3105 char *arg1 = (char *) 0 ;
3106 Agraph_t *result = 0 ;
3107
3108 SWIG_check_num_args("read",1,1)
3109 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("read",1,"char const *");
3110 arg1 = (char *)lua_tostring(L, 1);
3111 result = (Agraph_t *)read((char const *)arg1);
3112 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3113 return SWIG_arg;
3114
3115 fail: SWIGUNUSED;
3116 }
3117 lua_error(L);
3118 return 0;
3119}
3120
3121
3122static int _wrap_read__SWIG_1(lua_State* L) {
3123 {
3124 int SWIG_arg = 0;
3125 FILE *arg1 = (FILE *) 0 ;
3126 Agraph_t *result = 0 ;
3127
3128 SWIG_check_num_args("read",1,1)
3129 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("read",1,"FILE *");
3130
3131 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_FILE,0))){
3133 }
3134
3135 result = (Agraph_t *)read(arg1);
3136 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3137 return SWIG_arg;
3138
3139 fail: SWIGUNUSED;
3140 }
3141 lua_error(L);
3142 return 0;
3143}
3144
3145
3146static int _wrap_read(lua_State* L) {
3147 int argc;
3148 int argv[2]={
3149 1,2
3150 };
3151
3152 argc = lua_gettop(L);
3153 if (argc == 1) {
3154 int _v = 0;
3155 {
3156 void *ptr;
3157 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
3158 _v = 0;
3159 } else {
3160 _v = 1;
3161 }
3162 }
3163 if (_v) {
3164 return _wrap_read__SWIG_1(L);
3165 }
3166 }
3167 if (argc == 1) {
3168 int _v = 0;
3169 {
3170 _v = SWIG_lua_isnilstring(L,argv[0]);
3171 }
3172 if (_v) {
3173 return _wrap_read__SWIG_0(L);
3174 }
3175 }
3176
3177 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'read'\n"
3178 " Possible C/C++ prototypes are:\n"
3179 " read(char const *)\n"
3180 " read(FILE *)\n");
3181 lua_error(L);return 0;
3182}
3183
3184
3185static int _wrap_graph__SWIG_1(lua_State* L) {
3186 {
3187 int SWIG_arg = 0;
3188 Agraph_t *arg1 = (Agraph_t *) 0 ;
3189 char *arg2 = (char *) 0 ;
3190 Agraph_t *result = 0 ;
3191
3192 SWIG_check_num_args("graph",2,2)
3193 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graph",1,"Agraph_t *");
3194 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("graph",2,"char *");
3195
3196 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3198 }
3199
3200 arg2 = (char *)lua_tostring(L, 2);
3201 result = (Agraph_t *)graph(arg1,arg2);
3202 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
3203 return SWIG_arg;
3204
3205 fail: SWIGUNUSED;
3206 }
3207 lua_error(L);
3208 return 0;
3209}
3210
3211
3212static int _wrap_graph(lua_State* L) {
3213 int argc;
3214 int argv[3]={
3215 1,2,3
3216 };
3217
3218 argc = lua_gettop(L);
3219 if (argc == 1) {
3220 int _v = 0;
3221 {
3222 _v = SWIG_lua_isnilstring(L,argv[0]);
3223 }
3224 if (_v) {
3225 return _wrap_graph__SWIG_0(L);
3226 }
3227 }
3228 if (argc == 2) {
3229 int _v = 0;
3230 {
3231 void *ptr;
3232 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3233 _v = 0;
3234 } else {
3235 _v = 1;
3236 }
3237 }
3238 if (_v) {
3239 {
3240 _v = SWIG_lua_isnilstring(L,argv[1]);
3241 }
3242 if (_v) {
3243 return _wrap_graph__SWIG_1(L);
3244 }
3245 }
3246 }
3247
3248 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'graph'\n"
3249 " Possible C/C++ prototypes are:\n"
3250 " graph(char *)\n"
3251 " graph(Agraph_t *,char *)\n");
3252 lua_error(L);return 0;
3253}
3254
3255
3256static int _wrap_node(lua_State* L) {
3257 {
3258 int SWIG_arg = 0;
3259 Agraph_t *arg1 = (Agraph_t *) 0 ;
3260 char *arg2 = (char *) 0 ;
3261 Agnode_t *result = 0 ;
3262
3263 SWIG_check_num_args("node",2,2)
3264 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("node",1,"Agraph_t *");
3265 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("node",2,"char *");
3266
3267 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3269 }
3270
3271 arg2 = (char *)lua_tostring(L, 2);
3272 result = (Agnode_t *)node(arg1,arg2);
3273 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
3274 return SWIG_arg;
3275
3276 fail: SWIGUNUSED;
3277 }
3278 lua_error(L);
3279 return 0;
3280}
3281
3282
3283static int _wrap_edge__SWIG_0(lua_State* L) {
3284 {
3285 int SWIG_arg = 0;
3286 Agnode_t *arg1 = (Agnode_t *) 0 ;
3287 Agnode_t *arg2 = (Agnode_t *) 0 ;
3288 Agedge_t *result = 0 ;
3289
3290 SWIG_check_num_args("edge",2,2)
3291 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agnode_t *");
3292 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("edge",2,"Agnode_t *");
3293
3294 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3296 }
3297
3298
3299 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
3301 }
3302
3303 result = (Agedge_t *)edge(arg1,arg2);
3304 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3305 return SWIG_arg;
3306
3307 fail: SWIGUNUSED;
3308 }
3309 lua_error(L);
3310 return 0;
3311}
3312
3313
3314static int _wrap_edge__SWIG_1(lua_State* L) {
3315 {
3316 int SWIG_arg = 0;
3317 Agnode_t *arg1 = (Agnode_t *) 0 ;
3318 char *arg2 = (char *) 0 ;
3319 Agedge_t *result = 0 ;
3320
3321 SWIG_check_num_args("edge",2,2)
3322 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agnode_t *");
3323 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("edge",2,"char *");
3324
3325 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3327 }
3328
3329 arg2 = (char *)lua_tostring(L, 2);
3330 result = (Agedge_t *)edge(arg1,arg2);
3331 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3332 return SWIG_arg;
3333
3334 fail: SWIGUNUSED;
3335 }
3336 lua_error(L);
3337 return 0;
3338}
3339
3340
3341static int _wrap_edge__SWIG_2(lua_State* L) {
3342 {
3343 int SWIG_arg = 0;
3344 char *arg1 = (char *) 0 ;
3345 Agnode_t *arg2 = (Agnode_t *) 0 ;
3346 Agedge_t *result = 0 ;
3347
3348 SWIG_check_num_args("edge",2,2)
3349 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("edge",1,"char *");
3350 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("edge",2,"Agnode_t *");
3351 arg1 = (char *)lua_tostring(L, 1);
3352
3353 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
3355 }
3356
3357 result = (Agedge_t *)edge(arg1,arg2);
3358 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3359 return SWIG_arg;
3360
3361 fail: SWIGUNUSED;
3362 }
3363 lua_error(L);
3364 return 0;
3365}
3366
3367
3368static int _wrap_edge__SWIG_3(lua_State* L) {
3369 {
3370 int SWIG_arg = 0;
3371 Agraph_t *arg1 = (Agraph_t *) 0 ;
3372 char *arg2 = (char *) 0 ;
3373 char *arg3 = (char *) 0 ;
3374 Agedge_t *result = 0 ;
3375
3376 SWIG_check_num_args("edge",3,3)
3377 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("edge",1,"Agraph_t *");
3378 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("edge",2,"char *");
3379 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("edge",3,"char *");
3380
3381 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3383 }
3384
3385 arg2 = (char *)lua_tostring(L, 2);
3386 arg3 = (char *)lua_tostring(L, 3);
3387 result = (Agedge_t *)edge(arg1,arg2,arg3);
3388 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
3389 return SWIG_arg;
3390
3391 fail: SWIGUNUSED;
3392 }
3393 lua_error(L);
3394 return 0;
3395}
3396
3397
3398static int _wrap_edge(lua_State* L) {
3399 int argc;
3400 int argv[4]={
3401 1,2,3,4
3402 };
3403
3404 argc = lua_gettop(L);
3405 if (argc == 2) {
3406 int _v = 0;
3407 {
3408 void *ptr;
3409 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3410 _v = 0;
3411 } else {
3412 _v = 1;
3413 }
3414 }
3415 if (_v) {
3416 {
3417 void *ptr;
3418 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3419 _v = 0;
3420 } else {
3421 _v = 1;
3422 }
3423 }
3424 if (_v) {
3425 return _wrap_edge__SWIG_0(L);
3426 }
3427 }
3428 }
3429 if (argc == 2) {
3430 int _v = 0;
3431 {
3432 void *ptr;
3433 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3434 _v = 0;
3435 } else {
3436 _v = 1;
3437 }
3438 }
3439 if (_v) {
3440 {
3441 _v = SWIG_lua_isnilstring(L,argv[1]);
3442 }
3443 if (_v) {
3444 return _wrap_edge__SWIG_1(L);
3445 }
3446 }
3447 }
3448 if (argc == 2) {
3449 int _v = 0;
3450 {
3451 _v = SWIG_lua_isnilstring(L,argv[0]);
3452 }
3453 if (_v) {
3454 {
3455 void *ptr;
3456 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3457 _v = 0;
3458 } else {
3459 _v = 1;
3460 }
3461 }
3462 if (_v) {
3463 return _wrap_edge__SWIG_2(L);
3464 }
3465 }
3466 }
3467 if (argc == 3) {
3468 int _v = 0;
3469 {
3470 void *ptr;
3471 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3472 _v = 0;
3473 } else {
3474 _v = 1;
3475 }
3476 }
3477 if (_v) {
3478 {
3479 _v = SWIG_lua_isnilstring(L,argv[1]);
3480 }
3481 if (_v) {
3482 {
3483 _v = SWIG_lua_isnilstring(L,argv[2]);
3484 }
3485 if (_v) {
3486 return _wrap_edge__SWIG_3(L);
3487 }
3488 }
3489 }
3490 }
3491
3492 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'edge'\n"
3493 " Possible C/C++ prototypes are:\n"
3494 " edge(Agnode_t *,Agnode_t *)\n"
3495 " edge(Agnode_t *,char *)\n"
3496 " edge(char *,Agnode_t *)\n"
3497 " edge(Agraph_t *,char *,char *)\n");
3498 lua_error(L);return 0;
3499}
3500
3501
3502static int _wrap_setv__SWIG_0(lua_State* L) {
3503 {
3504 int SWIG_arg = 0;
3505 Agraph_t *arg1 = (Agraph_t *) 0 ;
3506 char *arg2 = (char *) 0 ;
3507 char *arg3 = (char *) 0 ;
3508 char *result = 0 ;
3509
3510 SWIG_check_num_args("setv",3,3)
3511 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agraph_t *");
3512 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3513 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3514
3515 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3517 }
3518
3519 arg2 = (char *)lua_tostring(L, 2);
3520 arg3 = (char *)lua_tostring(L, 3);
3521 result = (char *)setv(arg1,arg2,arg3);
3522 lua_pushstring(L,(const char *)result); SWIG_arg++;
3523 return SWIG_arg;
3524
3525 fail: SWIGUNUSED;
3526 }
3527 lua_error(L);
3528 return 0;
3529}
3530
3531
3532static int _wrap_setv__SWIG_1(lua_State* L) {
3533 {
3534 int SWIG_arg = 0;
3535 Agnode_t *arg1 = (Agnode_t *) 0 ;
3536 char *arg2 = (char *) 0 ;
3537 char *arg3 = (char *) 0 ;
3538 char *result = 0 ;
3539
3540 SWIG_check_num_args("setv",3,3)
3541 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agnode_t *");
3542 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3543 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3544
3545 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3547 }
3548
3549 arg2 = (char *)lua_tostring(L, 2);
3550 arg3 = (char *)lua_tostring(L, 3);
3551 result = (char *)setv(arg1,arg2,arg3);
3552 lua_pushstring(L,(const char *)result); SWIG_arg++;
3553 return SWIG_arg;
3554
3555 fail: SWIGUNUSED;
3556 }
3557 lua_error(L);
3558 return 0;
3559}
3560
3561
3562static int _wrap_setv__SWIG_2(lua_State* L) {
3563 {
3564 int SWIG_arg = 0;
3565 Agedge_t *arg1 = (Agedge_t *) 0 ;
3566 char *arg2 = (char *) 0 ;
3567 char *arg3 = (char *) 0 ;
3568 char *result = 0 ;
3569
3570 SWIG_check_num_args("setv",3,3)
3571 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agedge_t *");
3572 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("setv",2,"char *");
3573 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3574
3575 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3577 }
3578
3579 arg2 = (char *)lua_tostring(L, 2);
3580 arg3 = (char *)lua_tostring(L, 3);
3581 result = (char *)setv(arg1,arg2,arg3);
3582 lua_pushstring(L,(const char *)result); SWIG_arg++;
3583 return SWIG_arg;
3584
3585 fail: SWIGUNUSED;
3586 }
3587 lua_error(L);
3588 return 0;
3589}
3590
3591
3592static int _wrap_setv__SWIG_3(lua_State* L) {
3593 {
3594 int SWIG_arg = 0;
3595 Agraph_t *arg1 = (Agraph_t *) 0 ;
3596 Agsym_t *arg2 = (Agsym_t *) 0 ;
3597 char *arg3 = (char *) 0 ;
3598 char *result = 0 ;
3599
3600 SWIG_check_num_args("setv",3,3)
3601 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agraph_t *");
3602 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3603 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3604
3605 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3607 }
3608
3609
3610 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3612 }
3613
3614 arg3 = (char *)lua_tostring(L, 3);
3615 result = (char *)setv(arg1,arg2,arg3);
3616 lua_pushstring(L,(const char *)result); SWIG_arg++;
3617 return SWIG_arg;
3618
3619 fail: SWIGUNUSED;
3620 }
3621 lua_error(L);
3622 return 0;
3623}
3624
3625
3626static int _wrap_setv__SWIG_4(lua_State* L) {
3627 {
3628 int SWIG_arg = 0;
3629 Agnode_t *arg1 = (Agnode_t *) 0 ;
3630 Agsym_t *arg2 = (Agsym_t *) 0 ;
3631 char *arg3 = (char *) 0 ;
3632 char *result = 0 ;
3633
3634 SWIG_check_num_args("setv",3,3)
3635 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agnode_t *");
3636 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3637 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3638
3639 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3641 }
3642
3643
3644 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3646 }
3647
3648 arg3 = (char *)lua_tostring(L, 3);
3649 result = (char *)setv(arg1,arg2,arg3);
3650 lua_pushstring(L,(const char *)result); SWIG_arg++;
3651 return SWIG_arg;
3652
3653 fail: SWIGUNUSED;
3654 }
3655 lua_error(L);
3656 return 0;
3657}
3658
3659
3660static int _wrap_setv__SWIG_5(lua_State* L) {
3661 {
3662 int SWIG_arg = 0;
3663 Agedge_t *arg1 = (Agedge_t *) 0 ;
3664 Agsym_t *arg2 = (Agsym_t *) 0 ;
3665 char *arg3 = (char *) 0 ;
3666 char *result = 0 ;
3667
3668 SWIG_check_num_args("setv",3,3)
3669 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setv",1,"Agedge_t *");
3670 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setv",2,"Agsym_t *");
3671 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("setv",3,"char *");
3672
3673 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3675 }
3676
3677
3678 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3680 }
3681
3682 arg3 = (char *)lua_tostring(L, 3);
3683 result = (char *)setv(arg1,arg2,arg3);
3684 lua_pushstring(L,(const char *)result); SWIG_arg++;
3685 return SWIG_arg;
3686
3687 fail: SWIGUNUSED;
3688 }
3689 lua_error(L);
3690 return 0;
3691}
3692
3693
3694static int _wrap_setv(lua_State* L) {
3695 int argc;
3696 int argv[4]={
3697 1,2,3,4
3698 };
3699
3700 argc = lua_gettop(L);
3701 if (argc == 3) {
3702 int _v = 0;
3703 {
3704 void *ptr;
3705 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3706 _v = 0;
3707 } else {
3708 _v = 1;
3709 }
3710 }
3711 if (_v) {
3712 {
3713 void *ptr;
3714 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3715 _v = 0;
3716 } else {
3717 _v = 1;
3718 }
3719 }
3720 if (_v) {
3721 {
3722 _v = SWIG_lua_isnilstring(L,argv[2]);
3723 }
3724 if (_v) {
3725 return _wrap_setv__SWIG_3(L);
3726 }
3727 }
3728 }
3729 }
3730 if (argc == 3) {
3731 int _v = 0;
3732 {
3733 void *ptr;
3734 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3735 _v = 0;
3736 } else {
3737 _v = 1;
3738 }
3739 }
3740 if (_v) {
3741 {
3742 void *ptr;
3743 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3744 _v = 0;
3745 } else {
3746 _v = 1;
3747 }
3748 }
3749 if (_v) {
3750 {
3751 _v = SWIG_lua_isnilstring(L,argv[2]);
3752 }
3753 if (_v) {
3754 return _wrap_setv__SWIG_4(L);
3755 }
3756 }
3757 }
3758 }
3759 if (argc == 3) {
3760 int _v = 0;
3761 {
3762 void *ptr;
3763 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
3764 _v = 0;
3765 } else {
3766 _v = 1;
3767 }
3768 }
3769 if (_v) {
3770 {
3771 void *ptr;
3772 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
3773 _v = 0;
3774 } else {
3775 _v = 1;
3776 }
3777 }
3778 if (_v) {
3779 {
3780 _v = SWIG_lua_isnilstring(L,argv[2]);
3781 }
3782 if (_v) {
3783 return _wrap_setv__SWIG_5(L);
3784 }
3785 }
3786 }
3787 }
3788 if (argc == 3) {
3789 int _v = 0;
3790 {
3791 void *ptr;
3792 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
3793 _v = 0;
3794 } else {
3795 _v = 1;
3796 }
3797 }
3798 if (_v) {
3799 {
3800 _v = SWIG_lua_isnilstring(L,argv[1]);
3801 }
3802 if (_v) {
3803 {
3804 _v = SWIG_lua_isnilstring(L,argv[2]);
3805 }
3806 if (_v) {
3807 return _wrap_setv__SWIG_0(L);
3808 }
3809 }
3810 }
3811 }
3812 if (argc == 3) {
3813 int _v = 0;
3814 {
3815 void *ptr;
3816 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
3817 _v = 0;
3818 } else {
3819 _v = 1;
3820 }
3821 }
3822 if (_v) {
3823 {
3824 _v = SWIG_lua_isnilstring(L,argv[1]);
3825 }
3826 if (_v) {
3827 {
3828 _v = SWIG_lua_isnilstring(L,argv[2]);
3829 }
3830 if (_v) {
3831 return _wrap_setv__SWIG_1(L);
3832 }
3833 }
3834 }
3835 }
3836 if (argc == 3) {
3837 int _v = 0;
3838 {
3839 void *ptr;
3840 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
3841 _v = 0;
3842 } else {
3843 _v = 1;
3844 }
3845 }
3846 if (_v) {
3847 {
3848 _v = SWIG_lua_isnilstring(L,argv[1]);
3849 }
3850 if (_v) {
3851 {
3852 _v = SWIG_lua_isnilstring(L,argv[2]);
3853 }
3854 if (_v) {
3855 return _wrap_setv__SWIG_2(L);
3856 }
3857 }
3858 }
3859 }
3860
3861 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'setv'\n"
3862 " Possible C/C++ prototypes are:\n"
3863 " setv(Agraph_t *,char *,char *)\n"
3864 " setv(Agnode_t *,char *,char *)\n"
3865 " setv(Agedge_t *,char *,char *)\n"
3866 " setv(Agraph_t *,Agsym_t *,char *)\n"
3867 " setv(Agnode_t *,Agsym_t *,char *)\n"
3868 " setv(Agedge_t *,Agsym_t *,char *)\n");
3869 lua_error(L);return 0;
3870}
3871
3872
3873static int _wrap_getv__SWIG_0(lua_State* L) {
3874 {
3875 int SWIG_arg = 0;
3876 Agraph_t *arg1 = (Agraph_t *) 0 ;
3877 char *arg2 = (char *) 0 ;
3878 char *result = 0 ;
3879
3880 SWIG_check_num_args("getv",2,2)
3881 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agraph_t *");
3882 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3883
3884 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3886 }
3887
3888 arg2 = (char *)lua_tostring(L, 2);
3889 result = (char *)getv(arg1,arg2);
3890 lua_pushstring(L,(const char *)result); SWIG_arg++;
3891 return SWIG_arg;
3892
3893 fail: SWIGUNUSED;
3894 }
3895 lua_error(L);
3896 return 0;
3897}
3898
3899
3900static int _wrap_getv__SWIG_1(lua_State* L) {
3901 {
3902 int SWIG_arg = 0;
3903 Agnode_t *arg1 = (Agnode_t *) 0 ;
3904 char *arg2 = (char *) 0 ;
3905 char *result = 0 ;
3906
3907 SWIG_check_num_args("getv",2,2)
3908 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agnode_t *");
3909 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3910
3911 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3913 }
3914
3915 arg2 = (char *)lua_tostring(L, 2);
3916 result = (char *)getv(arg1,arg2);
3917 lua_pushstring(L,(const char *)result); SWIG_arg++;
3918 return SWIG_arg;
3919
3920 fail: SWIGUNUSED;
3921 }
3922 lua_error(L);
3923 return 0;
3924}
3925
3926
3927static int _wrap_getv__SWIG_2(lua_State* L) {
3928 {
3929 int SWIG_arg = 0;
3930 Agedge_t *arg1 = (Agedge_t *) 0 ;
3931 char *arg2 = (char *) 0 ;
3932 char *result = 0 ;
3933
3934 SWIG_check_num_args("getv",2,2)
3935 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agedge_t *");
3936 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("getv",2,"char *");
3937
3938 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
3940 }
3941
3942 arg2 = (char *)lua_tostring(L, 2);
3943 result = (char *)getv(arg1,arg2);
3944 lua_pushstring(L,(const char *)result); SWIG_arg++;
3945 return SWIG_arg;
3946
3947 fail: SWIGUNUSED;
3948 }
3949 lua_error(L);
3950 return 0;
3951}
3952
3953
3954static int _wrap_getv__SWIG_3(lua_State* L) {
3955 {
3956 int SWIG_arg = 0;
3957 Agraph_t *arg1 = (Agraph_t *) 0 ;
3958 Agsym_t *arg2 = (Agsym_t *) 0 ;
3959 char *result = 0 ;
3960
3961 SWIG_check_num_args("getv",2,2)
3962 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agraph_t *");
3963 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
3964
3965 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
3967 }
3968
3969
3970 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
3972 }
3973
3974 result = (char *)getv(arg1,arg2);
3975 lua_pushstring(L,(const char *)result); SWIG_arg++;
3976 return SWIG_arg;
3977
3978 fail: SWIGUNUSED;
3979 }
3980 lua_error(L);
3981 return 0;
3982}
3983
3984
3985static int _wrap_getv__SWIG_4(lua_State* L) {
3986 {
3987 int SWIG_arg = 0;
3988 Agnode_t *arg1 = (Agnode_t *) 0 ;
3989 Agsym_t *arg2 = (Agsym_t *) 0 ;
3990 char *result = 0 ;
3991
3992 SWIG_check_num_args("getv",2,2)
3993 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agnode_t *");
3994 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
3995
3996 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
3998 }
3999
4000
4001 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
4003 }
4004
4005 result = (char *)getv(arg1,arg2);
4006 lua_pushstring(L,(const char *)result); SWIG_arg++;
4007 return SWIG_arg;
4008
4009 fail: SWIGUNUSED;
4010 }
4011 lua_error(L);
4012 return 0;
4013}
4014
4015
4016static int _wrap_getv__SWIG_5(lua_State* L) {
4017 {
4018 int SWIG_arg = 0;
4019 Agedge_t *arg1 = (Agedge_t *) 0 ;
4020 Agsym_t *arg2 = (Agsym_t *) 0 ;
4021 char *result = 0 ;
4022
4023 SWIG_check_num_args("getv",2,2)
4024 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getv",1,"Agedge_t *");
4025 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("getv",2,"Agsym_t *");
4026
4027 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4029 }
4030
4031
4032 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
4034 }
4035
4036 result = (char *)getv(arg1,arg2);
4037 lua_pushstring(L,(const char *)result); SWIG_arg++;
4038 return SWIG_arg;
4039
4040 fail: SWIGUNUSED;
4041 }
4042 lua_error(L);
4043 return 0;
4044}
4045
4046
4047static int _wrap_getv(lua_State* L) {
4048 int argc;
4049 int argv[3]={
4050 1,2,3
4051 };
4052
4053 argc = lua_gettop(L);
4054 if (argc == 2) {
4055 int _v = 0;
4056 {
4057 void *ptr;
4058 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4059 _v = 0;
4060 } else {
4061 _v = 1;
4062 }
4063 }
4064 if (_v) {
4065 {
4066 void *ptr;
4067 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4068 _v = 0;
4069 } else {
4070 _v = 1;
4071 }
4072 }
4073 if (_v) {
4074 return _wrap_getv__SWIG_3(L);
4075 }
4076 }
4077 }
4078 if (argc == 2) {
4079 int _v = 0;
4080 {
4081 void *ptr;
4082 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4083 _v = 0;
4084 } else {
4085 _v = 1;
4086 }
4087 }
4088 if (_v) {
4089 {
4090 void *ptr;
4091 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4092 _v = 0;
4093 } else {
4094 _v = 1;
4095 }
4096 }
4097 if (_v) {
4098 return _wrap_getv__SWIG_4(L);
4099 }
4100 }
4101 }
4102 if (argc == 2) {
4103 int _v = 0;
4104 {
4105 void *ptr;
4106 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4107 _v = 0;
4108 } else {
4109 _v = 1;
4110 }
4111 }
4112 if (_v) {
4113 {
4114 void *ptr;
4115 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4116 _v = 0;
4117 } else {
4118 _v = 1;
4119 }
4120 }
4121 if (_v) {
4122 return _wrap_getv__SWIG_5(L);
4123 }
4124 }
4125 }
4126 if (argc == 2) {
4127 int _v = 0;
4128 {
4129 void *ptr;
4130 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4131 _v = 0;
4132 } else {
4133 _v = 1;
4134 }
4135 }
4136 if (_v) {
4137 {
4138 _v = SWIG_lua_isnilstring(L,argv[1]);
4139 }
4140 if (_v) {
4141 return _wrap_getv__SWIG_0(L);
4142 }
4143 }
4144 }
4145 if (argc == 2) {
4146 int _v = 0;
4147 {
4148 void *ptr;
4149 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4150 _v = 0;
4151 } else {
4152 _v = 1;
4153 }
4154 }
4155 if (_v) {
4156 {
4157 _v = SWIG_lua_isnilstring(L,argv[1]);
4158 }
4159 if (_v) {
4160 return _wrap_getv__SWIG_1(L);
4161 }
4162 }
4163 }
4164 if (argc == 2) {
4165 int _v = 0;
4166 {
4167 void *ptr;
4168 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4169 _v = 0;
4170 } else {
4171 _v = 1;
4172 }
4173 }
4174 if (_v) {
4175 {
4176 _v = SWIG_lua_isnilstring(L,argv[1]);
4177 }
4178 if (_v) {
4179 return _wrap_getv__SWIG_2(L);
4180 }
4181 }
4182 }
4183
4184 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'getv'\n"
4185 " Possible C/C++ prototypes are:\n"
4186 " getv(Agraph_t *,char *)\n"
4187 " getv(Agnode_t *,char *)\n"
4188 " getv(Agedge_t *,char *)\n"
4189 " getv(Agraph_t *,Agsym_t *)\n"
4190 " getv(Agnode_t *,Agsym_t *)\n"
4191 " getv(Agedge_t *,Agsym_t *)\n");
4192 lua_error(L);return 0;
4193}
4194
4195
4196static int _wrap_nameof__SWIG_0(lua_State* L) {
4197 {
4198 int SWIG_arg = 0;
4199 Agraph_t *arg1 = (Agraph_t *) 0 ;
4200 char *result = 0 ;
4201
4202 SWIG_check_num_args("nameof",1,1)
4203 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agraph_t *");
4204
4205 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4207 }
4208
4209 result = (char *)nameof(arg1);
4210 lua_pushstring(L,(const char *)result); SWIG_arg++;
4211 return SWIG_arg;
4212
4213 fail: SWIGUNUSED;
4214 }
4215 lua_error(L);
4216 return 0;
4217}
4218
4219
4220static int _wrap_nameof__SWIG_1(lua_State* L) {
4221 {
4222 int SWIG_arg = 0;
4223 Agnode_t *arg1 = (Agnode_t *) 0 ;
4224 char *result = 0 ;
4225
4226 SWIG_check_num_args("nameof",1,1)
4227 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agnode_t *");
4228
4229 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4231 }
4232
4233 result = (char *)nameof(arg1);
4234 lua_pushstring(L,(const char *)result); SWIG_arg++;
4235 return SWIG_arg;
4236
4237 fail: SWIGUNUSED;
4238 }
4239 lua_error(L);
4240 return 0;
4241}
4242
4243
4244static int _wrap_nameof__SWIG_2(lua_State* L) {
4245 {
4246 int SWIG_arg = 0;
4247 Agsym_t *arg1 = (Agsym_t *) 0 ;
4248 char *result = 0 ;
4249
4250 SWIG_check_num_args("nameof",1,1)
4251 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nameof",1,"Agsym_t *");
4252
4253 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agsym_t,0))){
4255 }
4256
4257 result = (char *)nameof(arg1);
4258 lua_pushstring(L,(const char *)result); SWIG_arg++;
4259 return SWIG_arg;
4260
4261 fail: SWIGUNUSED;
4262 }
4263 lua_error(L);
4264 return 0;
4265}
4266
4267
4268static int _wrap_nameof(lua_State* L) {
4269 int argc;
4270 int argv[2]={
4271 1,2
4272 };
4273
4274 argc = lua_gettop(L);
4275 if (argc == 1) {
4276 int _v = 0;
4277 {
4278 void *ptr;
4279 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4280 _v = 0;
4281 } else {
4282 _v = 1;
4283 }
4284 }
4285 if (_v) {
4286 return _wrap_nameof__SWIG_0(L);
4287 }
4288 }
4289 if (argc == 1) {
4290 int _v = 0;
4291 {
4292 void *ptr;
4293 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4294 _v = 0;
4295 } else {
4296 _v = 1;
4297 }
4298 }
4299 if (_v) {
4300 return _wrap_nameof__SWIG_1(L);
4301 }
4302 }
4303 if (argc == 1) {
4304 int _v = 0;
4305 {
4306 void *ptr;
4307 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4308 _v = 0;
4309 } else {
4310 _v = 1;
4311 }
4312 }
4313 if (_v) {
4314 return _wrap_nameof__SWIG_2(L);
4315 }
4316 }
4317
4318 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nameof'\n"
4319 " Possible C/C++ prototypes are:\n"
4320 " nameof(Agraph_t *)\n"
4321 " nameof(Agnode_t *)\n"
4322 " nameof(Agsym_t *)\n");
4323 lua_error(L);return 0;
4324}
4325
4326
4327static int _wrap_findsubg(lua_State* L) {
4328 {
4329 int SWIG_arg = 0;
4330 Agraph_t *arg1 = (Agraph_t *) 0 ;
4331 char *arg2 = (char *) 0 ;
4332 Agraph_t *result = 0 ;
4333
4334 SWIG_check_num_args("findsubg",2,2)
4335 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findsubg",1,"Agraph_t *");
4336 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findsubg",2,"char *");
4337
4338 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4339 SWIG_fail_ptr("findsubg",1,SWIGTYPE_p_Agraph_t);
4340 }
4341
4342 arg2 = (char *)lua_tostring(L, 2);
4343 result = (Agraph_t *)findsubg(arg1,arg2);
4344 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4345 return SWIG_arg;
4346
4347 fail: SWIGUNUSED;
4348 }
4349 lua_error(L);
4350 return 0;
4351}
4352
4353
4354static int _wrap_findnode(lua_State* L) {
4355 {
4356 int SWIG_arg = 0;
4357 Agraph_t *arg1 = (Agraph_t *) 0 ;
4358 char *arg2 = (char *) 0 ;
4359 Agnode_t *result = 0 ;
4360
4361 SWIG_check_num_args("findnode",2,2)
4362 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findnode",1,"Agraph_t *");
4363 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findnode",2,"char *");
4364
4365 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4366 SWIG_fail_ptr("findnode",1,SWIGTYPE_p_Agraph_t);
4367 }
4368
4369 arg2 = (char *)lua_tostring(L, 2);
4370 result = (Agnode_t *)findnode(arg1,arg2);
4371 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4372 return SWIG_arg;
4373
4374 fail: SWIGUNUSED;
4375 }
4376 lua_error(L);
4377 return 0;
4378}
4379
4380
4381static int _wrap_findedge(lua_State* L) {
4382 {
4383 int SWIG_arg = 0;
4384 Agnode_t *arg1 = (Agnode_t *) 0 ;
4385 Agnode_t *arg2 = (Agnode_t *) 0 ;
4386 Agedge_t *result = 0 ;
4387
4388 SWIG_check_num_args("findedge",2,2)
4389 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findedge",1,"Agnode_t *");
4390 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("findedge",2,"Agnode_t *");
4391
4392 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4393 SWIG_fail_ptr("findedge",1,SWIGTYPE_p_Agnode_t);
4394 }
4395
4396
4397 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
4398 SWIG_fail_ptr("findedge",2,SWIGTYPE_p_Agnode_t);
4399 }
4400
4401 result = (Agedge_t *)findedge(arg1,arg2);
4402 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
4403 return SWIG_arg;
4404
4405 fail: SWIGUNUSED;
4406 }
4407 lua_error(L);
4408 return 0;
4409}
4410
4411
4412static int _wrap_findattr__SWIG_0(lua_State* L) {
4413 {
4414 int SWIG_arg = 0;
4415 Agraph_t *arg1 = (Agraph_t *) 0 ;
4416 char *arg2 = (char *) 0 ;
4417 Agsym_t *result = 0 ;
4418
4419 SWIG_check_num_args("findattr",2,2)
4420 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agraph_t *");
4421 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4422
4423 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4424 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agraph_t);
4425 }
4426
4427 arg2 = (char *)lua_tostring(L, 2);
4428 result = (Agsym_t *)findattr(arg1,arg2);
4429 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4430 return SWIG_arg;
4431
4432 fail: SWIGUNUSED;
4433 }
4434 lua_error(L);
4435 return 0;
4436}
4437
4438
4439static int _wrap_findattr__SWIG_1(lua_State* L) {
4440 {
4441 int SWIG_arg = 0;
4442 Agnode_t *arg1 = (Agnode_t *) 0 ;
4443 char *arg2 = (char *) 0 ;
4444 Agsym_t *result = 0 ;
4445
4446 SWIG_check_num_args("findattr",2,2)
4447 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agnode_t *");
4448 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4449
4450 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4451 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agnode_t);
4452 }
4453
4454 arg2 = (char *)lua_tostring(L, 2);
4455 result = (Agsym_t *)findattr(arg1,arg2);
4456 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4457 return SWIG_arg;
4458
4459 fail: SWIGUNUSED;
4460 }
4461 lua_error(L);
4462 return 0;
4463}
4464
4465
4466static int _wrap_findattr__SWIG_2(lua_State* L) {
4467 {
4468 int SWIG_arg = 0;
4469 Agedge_t *arg1 = (Agedge_t *) 0 ;
4470 char *arg2 = (char *) 0 ;
4471 Agsym_t *result = 0 ;
4472
4473 SWIG_check_num_args("findattr",2,2)
4474 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("findattr",1,"Agedge_t *");
4475 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("findattr",2,"char *");
4476
4477 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4478 SWIG_fail_ptr("findattr",1,SWIGTYPE_p_Agedge_t);
4479 }
4480
4481 arg2 = (char *)lua_tostring(L, 2);
4482 result = (Agsym_t *)findattr(arg1,arg2);
4483 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
4484 return SWIG_arg;
4485
4486 fail: SWIGUNUSED;
4487 }
4488 lua_error(L);
4489 return 0;
4490}
4491
4492
4493static int _wrap_findattr(lua_State* L) {
4494 int argc;
4495 int argv[3]={
4496 1,2,3
4497 };
4498
4499 argc = lua_gettop(L);
4500 if (argc == 2) {
4501 int _v = 0;
4502 {
4503 void *ptr;
4504 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4505 _v = 0;
4506 } else {
4507 _v = 1;
4508 }
4509 }
4510 if (_v) {
4511 {
4512 _v = SWIG_lua_isnilstring(L,argv[1]);
4513 }
4514 if (_v) {
4515 return _wrap_findattr__SWIG_0(L);
4516 }
4517 }
4518 }
4519 if (argc == 2) {
4520 int _v = 0;
4521 {
4522 void *ptr;
4523 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4524 _v = 0;
4525 } else {
4526 _v = 1;
4527 }
4528 }
4529 if (_v) {
4530 {
4531 _v = SWIG_lua_isnilstring(L,argv[1]);
4532 }
4533 if (_v) {
4534 return _wrap_findattr__SWIG_1(L);
4535 }
4536 }
4537 }
4538 if (argc == 2) {
4539 int _v = 0;
4540 {
4541 void *ptr;
4542 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4543 _v = 0;
4544 } else {
4545 _v = 1;
4546 }
4547 }
4548 if (_v) {
4549 {
4550 _v = SWIG_lua_isnilstring(L,argv[1]);
4551 }
4552 if (_v) {
4553 return _wrap_findattr__SWIG_2(L);
4554 }
4555 }
4556 }
4557
4558 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'findattr'\n"
4559 " Possible C/C++ prototypes are:\n"
4560 " findattr(Agraph_t *,char *)\n"
4561 " findattr(Agnode_t *,char *)\n"
4562 " findattr(Agedge_t *,char *)\n");
4563 lua_error(L);return 0;
4564}
4565
4566
4567static int _wrap_headof(lua_State* L) {
4568 {
4569 int SWIG_arg = 0;
4570 Agedge_t *arg1 = (Agedge_t *) 0 ;
4571 Agnode_t *result = 0 ;
4572
4573 SWIG_check_num_args("headof",1,1)
4574 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("headof",1,"Agedge_t *");
4575
4576 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4578 }
4579
4580 result = (Agnode_t *)headof(arg1);
4581 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4582 return SWIG_arg;
4583
4584 fail: SWIGUNUSED;
4585 }
4586 lua_error(L);
4587 return 0;
4588}
4589
4590
4591static int _wrap_tailof(lua_State* L) {
4592 {
4593 int SWIG_arg = 0;
4594 Agedge_t *arg1 = (Agedge_t *) 0 ;
4595 Agnode_t *result = 0 ;
4596
4597 SWIG_check_num_args("tailof",1,1)
4598 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tailof",1,"Agedge_t *");
4599
4600 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4602 }
4603
4604 result = (Agnode_t *)tailof(arg1);
4605 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4606 return SWIG_arg;
4607
4608 fail: SWIGUNUSED;
4609 }
4610 lua_error(L);
4611 return 0;
4612}
4613
4614
4615static int _wrap_graphof__SWIG_0(lua_State* L) {
4616 {
4617 int SWIG_arg = 0;
4618 Agraph_t *arg1 = (Agraph_t *) 0 ;
4619 Agraph_t *result = 0 ;
4620
4621 SWIG_check_num_args("graphof",1,1)
4622 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agraph_t *");
4623
4624 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4626 }
4627
4628 result = (Agraph_t *)graphof(arg1);
4629 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4630 return SWIG_arg;
4631
4632 fail: SWIGUNUSED;
4633 }
4634 lua_error(L);
4635 return 0;
4636}
4637
4638
4639static int _wrap_graphof__SWIG_1(lua_State* L) {
4640 {
4641 int SWIG_arg = 0;
4642 Agedge_t *arg1 = (Agedge_t *) 0 ;
4643 Agraph_t *result = 0 ;
4644
4645 SWIG_check_num_args("graphof",1,1)
4646 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agedge_t *");
4647
4648 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4650 }
4651
4652 result = (Agraph_t *)graphof(arg1);
4653 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4654 return SWIG_arg;
4655
4656 fail: SWIGUNUSED;
4657 }
4658 lua_error(L);
4659 return 0;
4660}
4661
4662
4663static int _wrap_graphof__SWIG_2(lua_State* L) {
4664 {
4665 int SWIG_arg = 0;
4666 Agnode_t *arg1 = (Agnode_t *) 0 ;
4667 Agraph_t *result = 0 ;
4668
4669 SWIG_check_num_args("graphof",1,1)
4670 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("graphof",1,"Agnode_t *");
4671
4672 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4674 }
4675
4676 result = (Agraph_t *)graphof(arg1);
4677 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4678 return SWIG_arg;
4679
4680 fail: SWIGUNUSED;
4681 }
4682 lua_error(L);
4683 return 0;
4684}
4685
4686
4687static int _wrap_graphof(lua_State* L) {
4688 int argc;
4689 int argv[2]={
4690 1,2
4691 };
4692
4693 argc = lua_gettop(L);
4694 if (argc == 1) {
4695 int _v = 0;
4696 {
4697 void *ptr;
4698 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4699 _v = 0;
4700 } else {
4701 _v = 1;
4702 }
4703 }
4704 if (_v) {
4705 return _wrap_graphof__SWIG_0(L);
4706 }
4707 }
4708 if (argc == 1) {
4709 int _v = 0;
4710 {
4711 void *ptr;
4712 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4713 _v = 0;
4714 } else {
4715 _v = 1;
4716 }
4717 }
4718 if (_v) {
4719 return _wrap_graphof__SWIG_1(L);
4720 }
4721 }
4722 if (argc == 1) {
4723 int _v = 0;
4724 {
4725 void *ptr;
4726 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4727 _v = 0;
4728 } else {
4729 _v = 1;
4730 }
4731 }
4732 if (_v) {
4733 return _wrap_graphof__SWIG_2(L);
4734 }
4735 }
4736
4737 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'graphof'\n"
4738 " Possible C/C++ prototypes are:\n"
4739 " graphof(Agraph_t *)\n"
4740 " graphof(Agedge_t *)\n"
4741 " graphof(Agnode_t *)\n");
4742 lua_error(L);return 0;
4743}
4744
4745
4746static int _wrap_rootof(lua_State* L) {
4747 {
4748 int SWIG_arg = 0;
4749 Agraph_t *arg1 = (Agraph_t *) 0 ;
4750 Agraph_t *result = 0 ;
4751
4752 SWIG_check_num_args("rootof",1,1)
4753 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rootof",1,"Agraph_t *");
4754
4755 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4757 }
4758
4759 result = (Agraph_t *)rootof(arg1);
4760 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
4761 return SWIG_arg;
4762
4763 fail: SWIGUNUSED;
4764 }
4765 lua_error(L);
4766 return 0;
4767}
4768
4769
4770static int _wrap_protonode(lua_State* L) {
4771 {
4772 int SWIG_arg = 0;
4773 Agraph_t *arg1 = (Agraph_t *) 0 ;
4774 Agnode_t *result = 0 ;
4775
4776 SWIG_check_num_args("protonode",1,1)
4777 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("protonode",1,"Agraph_t *");
4778
4779 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4780 SWIG_fail_ptr("protonode",1,SWIGTYPE_p_Agraph_t);
4781 }
4782
4783 result = (Agnode_t *)protonode(arg1);
4784 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
4785 return SWIG_arg;
4786
4787 fail: SWIGUNUSED;
4788 }
4789 lua_error(L);
4790 return 0;
4791}
4792
4793
4794static int _wrap_protoedge(lua_State* L) {
4795 {
4796 int SWIG_arg = 0;
4797 Agraph_t *arg1 = (Agraph_t *) 0 ;
4798 Agedge_t *result = 0 ;
4799
4800 SWIG_check_num_args("protoedge",1,1)
4801 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("protoedge",1,"Agraph_t *");
4802
4803 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4804 SWIG_fail_ptr("protoedge",1,SWIGTYPE_p_Agraph_t);
4805 }
4806
4807 result = (Agedge_t *)protoedge(arg1);
4808 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
4809 return SWIG_arg;
4810
4811 fail: SWIGUNUSED;
4812 }
4813 lua_error(L);
4814 return 0;
4815}
4816
4817
4818static int _wrap_ok__SWIG_0(lua_State* L) {
4819 {
4820 int SWIG_arg = 0;
4821 Agraph_t *arg1 = (Agraph_t *) 0 ;
4822 bool result;
4823
4824 SWIG_check_num_args("ok",1,1)
4825 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agraph_t *");
4826
4827 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4829 }
4830
4831 result = (bool)ok(arg1);
4832 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4833 return SWIG_arg;
4834
4835 fail: SWIGUNUSED;
4836 }
4837 lua_error(L);
4838 return 0;
4839}
4840
4841
4842static int _wrap_ok__SWIG_1(lua_State* L) {
4843 {
4844 int SWIG_arg = 0;
4845 Agnode_t *arg1 = (Agnode_t *) 0 ;
4846 bool result;
4847
4848 SWIG_check_num_args("ok",1,1)
4849 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agnode_t *");
4850
4851 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
4853 }
4854
4855 result = (bool)ok(arg1);
4856 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4857 return SWIG_arg;
4858
4859 fail: SWIGUNUSED;
4860 }
4861 lua_error(L);
4862 return 0;
4863}
4864
4865
4866static int _wrap_ok__SWIG_2(lua_State* L) {
4867 {
4868 int SWIG_arg = 0;
4869 Agedge_t *arg1 = (Agedge_t *) 0 ;
4870 bool result;
4871
4872 SWIG_check_num_args("ok",1,1)
4873 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agedge_t *");
4874
4875 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
4877 }
4878
4879 result = (bool)ok(arg1);
4880 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4881 return SWIG_arg;
4882
4883 fail: SWIGUNUSED;
4884 }
4885 lua_error(L);
4886 return 0;
4887}
4888
4889
4890static int _wrap_ok__SWIG_3(lua_State* L) {
4891 {
4892 int SWIG_arg = 0;
4893 Agsym_t *arg1 = (Agsym_t *) 0 ;
4894 bool result;
4895
4896 SWIG_check_num_args("ok",1,1)
4897 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ok",1,"Agsym_t *");
4898
4899 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agsym_t,0))){
4901 }
4902
4903 result = (bool)ok(arg1);
4904 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
4905 return SWIG_arg;
4906
4907 fail: SWIGUNUSED;
4908 }
4909 lua_error(L);
4910 return 0;
4911}
4912
4913
4914static int _wrap_ok(lua_State* L) {
4915 int argc;
4916 int argv[2]={
4917 1,2
4918 };
4919
4920 argc = lua_gettop(L);
4921 if (argc == 1) {
4922 int _v = 0;
4923 {
4924 void *ptr;
4925 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
4926 _v = 0;
4927 } else {
4928 _v = 1;
4929 }
4930 }
4931 if (_v) {
4932 return _wrap_ok__SWIG_0(L);
4933 }
4934 }
4935 if (argc == 1) {
4936 int _v = 0;
4937 {
4938 void *ptr;
4939 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
4940 _v = 0;
4941 } else {
4942 _v = 1;
4943 }
4944 }
4945 if (_v) {
4946 return _wrap_ok__SWIG_1(L);
4947 }
4948 }
4949 if (argc == 1) {
4950 int _v = 0;
4951 {
4952 void *ptr;
4953 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
4954 _v = 0;
4955 } else {
4956 _v = 1;
4957 }
4958 }
4959 if (_v) {
4960 return _wrap_ok__SWIG_2(L);
4961 }
4962 }
4963 if (argc == 1) {
4964 int _v = 0;
4965 {
4966 void *ptr;
4967 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
4968 _v = 0;
4969 } else {
4970 _v = 1;
4971 }
4972 }
4973 if (_v) {
4974 return _wrap_ok__SWIG_3(L);
4975 }
4976 }
4977
4978 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'ok'\n"
4979 " Possible C/C++ prototypes are:\n"
4980 " ok(Agraph_t *)\n"
4981 " ok(Agnode_t *)\n"
4982 " ok(Agedge_t *)\n"
4983 " ok(Agsym_t *)\n");
4984 lua_error(L);return 0;
4985}
4986
4987
4988static int _wrap_firstsubg(lua_State* L) {
4989 {
4990 int SWIG_arg = 0;
4991 Agraph_t *arg1 = (Agraph_t *) 0 ;
4992 Agraph_t *result = 0 ;
4993
4994 SWIG_check_num_args("firstsubg",1,1)
4995 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstsubg",1,"Agraph_t *");
4996
4997 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
4998 SWIG_fail_ptr("firstsubg",1,SWIGTYPE_p_Agraph_t);
4999 }
5000
5001 result = (Agraph_t *)firstsubg(arg1);
5002 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5003 return SWIG_arg;
5004
5005 fail: SWIGUNUSED;
5006 }
5007 lua_error(L);
5008 return 0;
5009}
5010
5011
5012static int _wrap_nextsubg(lua_State* L) {
5013 {
5014 int SWIG_arg = 0;
5015 Agraph_t *arg1 = (Agraph_t *) 0 ;
5016 Agraph_t *arg2 = (Agraph_t *) 0 ;
5017 Agraph_t *result = 0 ;
5018
5019 SWIG_check_num_args("nextsubg",2,2)
5020 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextsubg",1,"Agraph_t *");
5021 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextsubg",2,"Agraph_t *");
5022
5023 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5024 SWIG_fail_ptr("nextsubg",1,SWIGTYPE_p_Agraph_t);
5025 }
5026
5027
5028 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agraph_t,0))){
5029 SWIG_fail_ptr("nextsubg",2,SWIGTYPE_p_Agraph_t);
5030 }
5031
5032 result = (Agraph_t *)nextsubg(arg1,arg2);
5033 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5034 return SWIG_arg;
5035
5036 fail: SWIGUNUSED;
5037 }
5038 lua_error(L);
5039 return 0;
5040}
5041
5042
5043static int _wrap_firstsupg(lua_State* L) {
5044 {
5045 int SWIG_arg = 0;
5046 Agraph_t *arg1 = (Agraph_t *) 0 ;
5047 Agraph_t *result = 0 ;
5048
5049 SWIG_check_num_args("firstsupg",1,1)
5050 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstsupg",1,"Agraph_t *");
5051
5052 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5053 SWIG_fail_ptr("firstsupg",1,SWIGTYPE_p_Agraph_t);
5054 }
5055
5056 result = (Agraph_t *)firstsupg(arg1);
5057 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5058 return SWIG_arg;
5059
5060 fail: SWIGUNUSED;
5061 }
5062 lua_error(L);
5063 return 0;
5064}
5065
5066
5067static int _wrap_nextsupg(lua_State* L) {
5068 {
5069 int SWIG_arg = 0;
5070 Agraph_t *arg1 = (Agraph_t *) 0 ;
5071 Agraph_t *arg2 = (Agraph_t *) 0 ;
5072 Agraph_t *result = 0 ;
5073
5074 SWIG_check_num_args("nextsupg",2,2)
5075 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextsupg",1,"Agraph_t *");
5076 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextsupg",2,"Agraph_t *");
5077
5078 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5079 SWIG_fail_ptr("nextsupg",1,SWIGTYPE_p_Agraph_t);
5080 }
5081
5082
5083 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agraph_t,0))){
5084 SWIG_fail_ptr("nextsupg",2,SWIGTYPE_p_Agraph_t);
5085 }
5086
5087 result = (Agraph_t *)nextsupg(arg1,arg2);
5088 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agraph_t,0); SWIG_arg++;
5089 return SWIG_arg;
5090
5091 fail: SWIGUNUSED;
5092 }
5093 lua_error(L);
5094 return 0;
5095}
5096
5097
5098static int _wrap_firstedge__SWIG_0(lua_State* L) {
5099 {
5100 int SWIG_arg = 0;
5101 Agraph_t *arg1 = (Agraph_t *) 0 ;
5102 Agedge_t *result = 0 ;
5103
5104 SWIG_check_num_args("firstedge",1,1)
5105 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstedge",1,"Agraph_t *");
5106
5107 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5108 SWIG_fail_ptr("firstedge",1,SWIGTYPE_p_Agraph_t);
5109 }
5110
5111 result = (Agedge_t *)firstedge(arg1);
5112 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5113 return SWIG_arg;
5114
5115 fail: SWIGUNUSED;
5116 }
5117 lua_error(L);
5118 return 0;
5119}
5120
5121
5122static int _wrap_nextedge__SWIG_0(lua_State* L) {
5123 {
5124 int SWIG_arg = 0;
5125 Agraph_t *arg1 = (Agraph_t *) 0 ;
5126 Agedge_t *arg2 = (Agedge_t *) 0 ;
5127 Agedge_t *result = 0 ;
5128
5129 SWIG_check_num_args("nextedge",2,2)
5130 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextedge",1,"Agraph_t *");
5131 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextedge",2,"Agedge_t *");
5132
5133 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5134 SWIG_fail_ptr("nextedge",1,SWIGTYPE_p_Agraph_t);
5135 }
5136
5137
5138 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5139 SWIG_fail_ptr("nextedge",2,SWIGTYPE_p_Agedge_t);
5140 }
5141
5142 result = (Agedge_t *)nextedge(arg1,arg2);
5143 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5144 return SWIG_arg;
5145
5146 fail: SWIGUNUSED;
5147 }
5148 lua_error(L);
5149 return 0;
5150}
5151
5152
5153static int _wrap_firstout__SWIG_0(lua_State* L) {
5154 {
5155 int SWIG_arg = 0;
5156 Agraph_t *arg1 = (Agraph_t *) 0 ;
5157 Agedge_t *result = 0 ;
5158
5159 SWIG_check_num_args("firstout",1,1)
5160 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstout",1,"Agraph_t *");
5161
5162 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5163 SWIG_fail_ptr("firstout",1,SWIGTYPE_p_Agraph_t);
5164 }
5165
5166 result = (Agedge_t *)firstout(arg1);
5167 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5168 return SWIG_arg;
5169
5170 fail: SWIGUNUSED;
5171 }
5172 lua_error(L);
5173 return 0;
5174}
5175
5176
5177static int _wrap_nextout__SWIG_0(lua_State* L) {
5178 {
5179 int SWIG_arg = 0;
5180 Agraph_t *arg1 = (Agraph_t *) 0 ;
5181 Agedge_t *arg2 = (Agedge_t *) 0 ;
5182 Agedge_t *result = 0 ;
5183
5184 SWIG_check_num_args("nextout",2,2)
5185 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextout",1,"Agraph_t *");
5186 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextout",2,"Agedge_t *");
5187
5188 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5190 }
5191
5192
5193 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5195 }
5196
5197 result = (Agedge_t *)nextout(arg1,arg2);
5198 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5199 return SWIG_arg;
5200
5201 fail: SWIGUNUSED;
5202 }
5203 lua_error(L);
5204 return 0;
5205}
5206
5207
5208static int _wrap_firstedge__SWIG_1(lua_State* L) {
5209 {
5210 int SWIG_arg = 0;
5211 Agnode_t *arg1 = (Agnode_t *) 0 ;
5212 Agedge_t *result = 0 ;
5213
5214 SWIG_check_num_args("firstedge",1,1)
5215 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstedge",1,"Agnode_t *");
5216
5217 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5218 SWIG_fail_ptr("firstedge",1,SWIGTYPE_p_Agnode_t);
5219 }
5220
5221 result = (Agedge_t *)firstedge(arg1);
5222 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5223 return SWIG_arg;
5224
5225 fail: SWIGUNUSED;
5226 }
5227 lua_error(L);
5228 return 0;
5229}
5230
5231
5232static int _wrap_firstedge(lua_State* L) {
5233 int argc;
5234 int argv[2]={
5235 1,2
5236 };
5237
5238 argc = lua_gettop(L);
5239 if (argc == 1) {
5240 int _v = 0;
5241 {
5242 void *ptr;
5243 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5244 _v = 0;
5245 } else {
5246 _v = 1;
5247 }
5248 }
5249 if (_v) {
5250 return _wrap_firstedge__SWIG_0(L);
5251 }
5252 }
5253 if (argc == 1) {
5254 int _v = 0;
5255 {
5256 void *ptr;
5257 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5258 _v = 0;
5259 } else {
5260 _v = 1;
5261 }
5262 }
5263 if (_v) {
5264 return _wrap_firstedge__SWIG_1(L);
5265 }
5266 }
5267
5268 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstedge'\n"
5269 " Possible C/C++ prototypes are:\n"
5270 " firstedge(Agraph_t *)\n"
5271 " firstedge(Agnode_t *)\n");
5272 lua_error(L);return 0;
5273}
5274
5275
5276static int _wrap_nextedge__SWIG_1(lua_State* L) {
5277 {
5278 int SWIG_arg = 0;
5279 Agnode_t *arg1 = (Agnode_t *) 0 ;
5280 Agedge_t *arg2 = (Agedge_t *) 0 ;
5281 Agedge_t *result = 0 ;
5282
5283 SWIG_check_num_args("nextedge",2,2)
5284 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextedge",1,"Agnode_t *");
5285 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextedge",2,"Agedge_t *");
5286
5287 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5288 SWIG_fail_ptr("nextedge",1,SWIGTYPE_p_Agnode_t);
5289 }
5290
5291
5292 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5293 SWIG_fail_ptr("nextedge",2,SWIGTYPE_p_Agedge_t);
5294 }
5295
5296 result = (Agedge_t *)nextedge(arg1,arg2);
5297 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5298 return SWIG_arg;
5299
5300 fail: SWIGUNUSED;
5301 }
5302 lua_error(L);
5303 return 0;
5304}
5305
5306
5307static int _wrap_nextedge(lua_State* L) {
5308 int argc;
5309 int argv[3]={
5310 1,2,3
5311 };
5312
5313 argc = lua_gettop(L);
5314 if (argc == 2) {
5315 int _v = 0;
5316 {
5317 void *ptr;
5318 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5319 _v = 0;
5320 } else {
5321 _v = 1;
5322 }
5323 }
5324 if (_v) {
5325 {
5326 void *ptr;
5327 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5328 _v = 0;
5329 } else {
5330 _v = 1;
5331 }
5332 }
5333 if (_v) {
5334 return _wrap_nextedge__SWIG_0(L);
5335 }
5336 }
5337 }
5338 if (argc == 2) {
5339 int _v = 0;
5340 {
5341 void *ptr;
5342 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5343 _v = 0;
5344 } else {
5345 _v = 1;
5346 }
5347 }
5348 if (_v) {
5349 {
5350 void *ptr;
5351 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5352 _v = 0;
5353 } else {
5354 _v = 1;
5355 }
5356 }
5357 if (_v) {
5358 return _wrap_nextedge__SWIG_1(L);
5359 }
5360 }
5361 }
5362
5363 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextedge'\n"
5364 " Possible C/C++ prototypes are:\n"
5365 " nextedge(Agraph_t *,Agedge_t *)\n"
5366 " nextedge(Agnode_t *,Agedge_t *)\n");
5367 lua_error(L);return 0;
5368}
5369
5370
5371static int _wrap_firstout__SWIG_1(lua_State* L) {
5372 {
5373 int SWIG_arg = 0;
5374 Agnode_t *arg1 = (Agnode_t *) 0 ;
5375 Agedge_t *result = 0 ;
5376
5377 SWIG_check_num_args("firstout",1,1)
5378 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstout",1,"Agnode_t *");
5379
5380 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5381 SWIG_fail_ptr("firstout",1,SWIGTYPE_p_Agnode_t);
5382 }
5383
5384 result = (Agedge_t *)firstout(arg1);
5385 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5386 return SWIG_arg;
5387
5388 fail: SWIGUNUSED;
5389 }
5390 lua_error(L);
5391 return 0;
5392}
5393
5394
5395static int _wrap_firstout(lua_State* L) {
5396 int argc;
5397 int argv[2]={
5398 1,2
5399 };
5400
5401 argc = lua_gettop(L);
5402 if (argc == 1) {
5403 int _v = 0;
5404 {
5405 void *ptr;
5406 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5407 _v = 0;
5408 } else {
5409 _v = 1;
5410 }
5411 }
5412 if (_v) {
5413 return _wrap_firstout__SWIG_0(L);
5414 }
5415 }
5416 if (argc == 1) {
5417 int _v = 0;
5418 {
5419 void *ptr;
5420 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5421 _v = 0;
5422 } else {
5423 _v = 1;
5424 }
5425 }
5426 if (_v) {
5427 return _wrap_firstout__SWIG_1(L);
5428 }
5429 }
5430
5431 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstout'\n"
5432 " Possible C/C++ prototypes are:\n"
5433 " firstout(Agraph_t *)\n"
5434 " firstout(Agnode_t *)\n");
5435 lua_error(L);return 0;
5436}
5437
5438
5439static int _wrap_nextout__SWIG_1(lua_State* L) {
5440 {
5441 int SWIG_arg = 0;
5442 Agnode_t *arg1 = (Agnode_t *) 0 ;
5443 Agedge_t *arg2 = (Agedge_t *) 0 ;
5444 Agedge_t *result = 0 ;
5445
5446 SWIG_check_num_args("nextout",2,2)
5447 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextout",1,"Agnode_t *");
5448 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextout",2,"Agedge_t *");
5449
5450 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5452 }
5453
5454
5455 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5457 }
5458
5459 result = (Agedge_t *)nextout(arg1,arg2);
5460 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5461 return SWIG_arg;
5462
5463 fail: SWIGUNUSED;
5464 }
5465 lua_error(L);
5466 return 0;
5467}
5468
5469
5470static int _wrap_nextout(lua_State* L) {
5471 int argc;
5472 int argv[3]={
5473 1,2,3
5474 };
5475
5476 argc = lua_gettop(L);
5477 if (argc == 2) {
5478 int _v = 0;
5479 {
5480 void *ptr;
5481 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5482 _v = 0;
5483 } else {
5484 _v = 1;
5485 }
5486 }
5487 if (_v) {
5488 {
5489 void *ptr;
5490 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5491 _v = 0;
5492 } else {
5493 _v = 1;
5494 }
5495 }
5496 if (_v) {
5497 return _wrap_nextout__SWIG_0(L);
5498 }
5499 }
5500 }
5501 if (argc == 2) {
5502 int _v = 0;
5503 {
5504 void *ptr;
5505 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5506 _v = 0;
5507 } else {
5508 _v = 1;
5509 }
5510 }
5511 if (_v) {
5512 {
5513 void *ptr;
5514 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5515 _v = 0;
5516 } else {
5517 _v = 1;
5518 }
5519 }
5520 if (_v) {
5521 return _wrap_nextout__SWIG_1(L);
5522 }
5523 }
5524 }
5525
5526 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextout'\n"
5527 " Possible C/C++ prototypes are:\n"
5528 " nextout(Agraph_t *,Agedge_t *)\n"
5529 " nextout(Agnode_t *,Agedge_t *)\n");
5530 lua_error(L);return 0;
5531}
5532
5533
5534static int _wrap_firsthead(lua_State* L) {
5535 {
5536 int SWIG_arg = 0;
5537 Agnode_t *arg1 = (Agnode_t *) 0 ;
5538 Agnode_t *result = 0 ;
5539
5540 SWIG_check_num_args("firsthead",1,1)
5541 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firsthead",1,"Agnode_t *");
5542
5543 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5544 SWIG_fail_ptr("firsthead",1,SWIGTYPE_p_Agnode_t);
5545 }
5546
5547 result = (Agnode_t *)firsthead(arg1);
5548 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5549 return SWIG_arg;
5550
5551 fail: SWIGUNUSED;
5552 }
5553 lua_error(L);
5554 return 0;
5555}
5556
5557
5558static int _wrap_nexthead(lua_State* L) {
5559 {
5560 int SWIG_arg = 0;
5561 Agnode_t *arg1 = (Agnode_t *) 0 ;
5562 Agnode_t *arg2 = (Agnode_t *) 0 ;
5563 Agnode_t *result = 0 ;
5564
5565 SWIG_check_num_args("nexthead",2,2)
5566 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nexthead",1,"Agnode_t *");
5567 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nexthead",2,"Agnode_t *");
5568
5569 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5570 SWIG_fail_ptr("nexthead",1,SWIGTYPE_p_Agnode_t);
5571 }
5572
5573
5574 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5575 SWIG_fail_ptr("nexthead",2,SWIGTYPE_p_Agnode_t);
5576 }
5577
5578 result = (Agnode_t *)nexthead(arg1,arg2);
5579 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5580 return SWIG_arg;
5581
5582 fail: SWIGUNUSED;
5583 }
5584 lua_error(L);
5585 return 0;
5586}
5587
5588
5589static int _wrap_firstin__SWIG_0(lua_State* L) {
5590 {
5591 int SWIG_arg = 0;
5592 Agraph_t *arg1 = (Agraph_t *) 0 ;
5593 Agedge_t *result = 0 ;
5594
5595 SWIG_check_num_args("firstin",1,1)
5596 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstin",1,"Agraph_t *");
5597
5598 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5600 }
5601
5602 result = (Agedge_t *)firstin(arg1);
5603 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5604 return SWIG_arg;
5605
5606 fail: SWIGUNUSED;
5607 }
5608 lua_error(L);
5609 return 0;
5610}
5611
5612
5613static int _wrap_nextin__SWIG_0(lua_State* L) {
5614 {
5615 int SWIG_arg = 0;
5616 Agnode_t *arg1 = (Agnode_t *) 0 ;
5617 Agedge_t *arg2 = (Agedge_t *) 0 ;
5618 Agedge_t *result = 0 ;
5619
5620 SWIG_check_num_args("nextin",2,2)
5621 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextin",1,"Agnode_t *");
5622 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextin",2,"Agedge_t *");
5623
5624 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5626 }
5627
5628
5629 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5631 }
5632
5633 result = (Agedge_t *)nextin(arg1,arg2);
5634 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5635 return SWIG_arg;
5636
5637 fail: SWIGUNUSED;
5638 }
5639 lua_error(L);
5640 return 0;
5641}
5642
5643
5644static int _wrap_firstin__SWIG_1(lua_State* L) {
5645 {
5646 int SWIG_arg = 0;
5647 Agnode_t *arg1 = (Agnode_t *) 0 ;
5648 Agedge_t *result = 0 ;
5649
5650 SWIG_check_num_args("firstin",1,1)
5651 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstin",1,"Agnode_t *");
5652
5653 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5655 }
5656
5657 result = (Agedge_t *)firstin(arg1);
5658 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5659 return SWIG_arg;
5660
5661 fail: SWIGUNUSED;
5662 }
5663 lua_error(L);
5664 return 0;
5665}
5666
5667
5668static int _wrap_firstin(lua_State* L) {
5669 int argc;
5670 int argv[2]={
5671 1,2
5672 };
5673
5674 argc = lua_gettop(L);
5675 if (argc == 1) {
5676 int _v = 0;
5677 {
5678 void *ptr;
5679 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5680 _v = 0;
5681 } else {
5682 _v = 1;
5683 }
5684 }
5685 if (_v) {
5686 return _wrap_firstin__SWIG_0(L);
5687 }
5688 }
5689 if (argc == 1) {
5690 int _v = 0;
5691 {
5692 void *ptr;
5693 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5694 _v = 0;
5695 } else {
5696 _v = 1;
5697 }
5698 }
5699 if (_v) {
5700 return _wrap_firstin__SWIG_1(L);
5701 }
5702 }
5703
5704 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstin'\n"
5705 " Possible C/C++ prototypes are:\n"
5706 " firstin(Agraph_t *)\n"
5707 " firstin(Agnode_t *)\n");
5708 lua_error(L);return 0;
5709}
5710
5711
5712static int _wrap_nextin__SWIG_1(lua_State* L) {
5713 {
5714 int SWIG_arg = 0;
5715 Agraph_t *arg1 = (Agraph_t *) 0 ;
5716 Agedge_t *arg2 = (Agedge_t *) 0 ;
5717 Agedge_t *result = 0 ;
5718
5719 SWIG_check_num_args("nextin",2,2)
5720 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextin",1,"Agraph_t *");
5721 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextin",2,"Agedge_t *");
5722
5723 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5725 }
5726
5727
5728 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agedge_t,0))){
5730 }
5731
5732 result = (Agedge_t *)nextin(arg1,arg2);
5733 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agedge_t,0); SWIG_arg++;
5734 return SWIG_arg;
5735
5736 fail: SWIGUNUSED;
5737 }
5738 lua_error(L);
5739 return 0;
5740}
5741
5742
5743static int _wrap_nextin(lua_State* L) {
5744 int argc;
5745 int argv[3]={
5746 1,2,3
5747 };
5748
5749 argc = lua_gettop(L);
5750 if (argc == 2) {
5751 int _v = 0;
5752 {
5753 void *ptr;
5754 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
5755 _v = 0;
5756 } else {
5757 _v = 1;
5758 }
5759 }
5760 if (_v) {
5761 {
5762 void *ptr;
5763 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5764 _v = 0;
5765 } else {
5766 _v = 1;
5767 }
5768 }
5769 if (_v) {
5770 return _wrap_nextin__SWIG_0(L);
5771 }
5772 }
5773 }
5774 if (argc == 2) {
5775 int _v = 0;
5776 {
5777 void *ptr;
5778 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5779 _v = 0;
5780 } else {
5781 _v = 1;
5782 }
5783 }
5784 if (_v) {
5785 {
5786 void *ptr;
5787 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5788 _v = 0;
5789 } else {
5790 _v = 1;
5791 }
5792 }
5793 if (_v) {
5794 return _wrap_nextin__SWIG_1(L);
5795 }
5796 }
5797 }
5798
5799 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextin'\n"
5800 " Possible C/C++ prototypes are:\n"
5801 " nextin(Agnode_t *,Agedge_t *)\n"
5802 " nextin(Agraph_t *,Agedge_t *)\n");
5803 lua_error(L);return 0;
5804}
5805
5806
5807static int _wrap_firsttail(lua_State* L) {
5808 {
5809 int SWIG_arg = 0;
5810 Agnode_t *arg1 = (Agnode_t *) 0 ;
5811 Agnode_t *result = 0 ;
5812
5813 SWIG_check_num_args("firsttail",1,1)
5814 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firsttail",1,"Agnode_t *");
5815
5816 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5817 SWIG_fail_ptr("firsttail",1,SWIGTYPE_p_Agnode_t);
5818 }
5819
5820 result = (Agnode_t *)firsttail(arg1);
5821 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5822 return SWIG_arg;
5823
5824 fail: SWIGUNUSED;
5825 }
5826 lua_error(L);
5827 return 0;
5828}
5829
5830
5831static int _wrap_nexttail(lua_State* L) {
5832 {
5833 int SWIG_arg = 0;
5834 Agnode_t *arg1 = (Agnode_t *) 0 ;
5835 Agnode_t *arg2 = (Agnode_t *) 0 ;
5836 Agnode_t *result = 0 ;
5837
5838 SWIG_check_num_args("nexttail",2,2)
5839 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nexttail",1,"Agnode_t *");
5840 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nexttail",2,"Agnode_t *");
5841
5842 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
5843 SWIG_fail_ptr("nexttail",1,SWIGTYPE_p_Agnode_t);
5844 }
5845
5846
5847 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5848 SWIG_fail_ptr("nexttail",2,SWIGTYPE_p_Agnode_t);
5849 }
5850
5851 result = (Agnode_t *)nexttail(arg1,arg2);
5852 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5853 return SWIG_arg;
5854
5855 fail: SWIGUNUSED;
5856 }
5857 lua_error(L);
5858 return 0;
5859}
5860
5861
5862static int _wrap_firstnode__SWIG_0(lua_State* L) {
5863 {
5864 int SWIG_arg = 0;
5865 Agraph_t *arg1 = (Agraph_t *) 0 ;
5866 Agnode_t *result = 0 ;
5867
5868 SWIG_check_num_args("firstnode",1,1)
5869 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstnode",1,"Agraph_t *");
5870
5871 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5872 SWIG_fail_ptr("firstnode",1,SWIGTYPE_p_Agraph_t);
5873 }
5874
5875 result = (Agnode_t *)firstnode(arg1);
5876 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5877 return SWIG_arg;
5878
5879 fail: SWIGUNUSED;
5880 }
5881 lua_error(L);
5882 return 0;
5883}
5884
5885
5886static int _wrap_nextnode__SWIG_0(lua_State* L) {
5887 {
5888 int SWIG_arg = 0;
5889 Agraph_t *arg1 = (Agraph_t *) 0 ;
5890 Agnode_t *arg2 = (Agnode_t *) 0 ;
5891 Agnode_t *result = 0 ;
5892
5893 SWIG_check_num_args("nextnode",2,2)
5894 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextnode",1,"Agraph_t *");
5895 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextnode",2,"Agnode_t *");
5896
5897 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
5898 SWIG_fail_ptr("nextnode",1,SWIGTYPE_p_Agraph_t);
5899 }
5900
5901
5902 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
5903 SWIG_fail_ptr("nextnode",2,SWIGTYPE_p_Agnode_t);
5904 }
5905
5906 result = (Agnode_t *)nextnode(arg1,arg2);
5907 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5908 return SWIG_arg;
5909
5910 fail: SWIGUNUSED;
5911 }
5912 lua_error(L);
5913 return 0;
5914}
5915
5916
5917static int _wrap_firstnode__SWIG_1(lua_State* L) {
5918 {
5919 int SWIG_arg = 0;
5920 Agedge_t *arg1 = (Agedge_t *) 0 ;
5921 Agnode_t *result = 0 ;
5922
5923 SWIG_check_num_args("firstnode",1,1)
5924 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstnode",1,"Agedge_t *");
5925
5926 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
5927 SWIG_fail_ptr("firstnode",1,SWIGTYPE_p_Agedge_t);
5928 }
5929
5930 result = (Agnode_t *)firstnode(arg1);
5931 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
5932 return SWIG_arg;
5933
5934 fail: SWIGUNUSED;
5935 }
5936 lua_error(L);
5937 return 0;
5938}
5939
5940
5941static int _wrap_firstnode(lua_State* L) {
5942 int argc;
5943 int argv[2]={
5944 1,2
5945 };
5946
5947 argc = lua_gettop(L);
5948 if (argc == 1) {
5949 int _v = 0;
5950 {
5951 void *ptr;
5952 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
5953 _v = 0;
5954 } else {
5955 _v = 1;
5956 }
5957 }
5958 if (_v) {
5959 return _wrap_firstnode__SWIG_0(L);
5960 }
5961 }
5962 if (argc == 1) {
5963 int _v = 0;
5964 {
5965 void *ptr;
5966 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
5967 _v = 0;
5968 } else {
5969 _v = 1;
5970 }
5971 }
5972 if (_v) {
5973 return _wrap_firstnode__SWIG_1(L);
5974 }
5975 }
5976
5977 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstnode'\n"
5978 " Possible C/C++ prototypes are:\n"
5979 " firstnode(Agraph_t *)\n"
5980 " firstnode(Agedge_t *)\n");
5981 lua_error(L);return 0;
5982}
5983
5984
5985static int _wrap_nextnode__SWIG_1(lua_State* L) {
5986 {
5987 int SWIG_arg = 0;
5988 Agedge_t *arg1 = (Agedge_t *) 0 ;
5989 Agnode_t *arg2 = (Agnode_t *) 0 ;
5990 Agnode_t *result = 0 ;
5991
5992 SWIG_check_num_args("nextnode",2,2)
5993 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextnode",1,"Agedge_t *");
5994 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextnode",2,"Agnode_t *");
5995
5996 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
5997 SWIG_fail_ptr("nextnode",1,SWIGTYPE_p_Agedge_t);
5998 }
5999
6000
6001 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agnode_t,0))){
6002 SWIG_fail_ptr("nextnode",2,SWIGTYPE_p_Agnode_t);
6003 }
6004
6005 result = (Agnode_t *)nextnode(arg1,arg2);
6006 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agnode_t,0); SWIG_arg++;
6007 return SWIG_arg;
6008
6009 fail: SWIGUNUSED;
6010 }
6011 lua_error(L);
6012 return 0;
6013}
6014
6015
6016static int _wrap_nextnode(lua_State* L) {
6017 int argc;
6018 int argv[3]={
6019 1,2,3
6020 };
6021
6022 argc = lua_gettop(L);
6023 if (argc == 2) {
6024 int _v = 0;
6025 {
6026 void *ptr;
6027 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6028 _v = 0;
6029 } else {
6030 _v = 1;
6031 }
6032 }
6033 if (_v) {
6034 {
6035 void *ptr;
6036 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6037 _v = 0;
6038 } else {
6039 _v = 1;
6040 }
6041 }
6042 if (_v) {
6043 return _wrap_nextnode__SWIG_0(L);
6044 }
6045 }
6046 }
6047 if (argc == 2) {
6048 int _v = 0;
6049 {
6050 void *ptr;
6051 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6052 _v = 0;
6053 } else {
6054 _v = 1;
6055 }
6056 }
6057 if (_v) {
6058 {
6059 void *ptr;
6060 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6061 _v = 0;
6062 } else {
6063 _v = 1;
6064 }
6065 }
6066 if (_v) {
6067 return _wrap_nextnode__SWIG_1(L);
6068 }
6069 }
6070 }
6071
6072 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextnode'\n"
6073 " Possible C/C++ prototypes are:\n"
6074 " nextnode(Agraph_t *,Agnode_t *)\n"
6075 " nextnode(Agedge_t *,Agnode_t *)\n");
6076 lua_error(L);return 0;
6077}
6078
6079
6080static int _wrap_firstattr__SWIG_0(lua_State* L) {
6081 {
6082 int SWIG_arg = 0;
6083 Agraph_t *arg1 = (Agraph_t *) 0 ;
6084 Agsym_t *result = 0 ;
6085
6086 SWIG_check_num_args("firstattr",1,1)
6087 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agraph_t *");
6088
6089 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6090 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agraph_t);
6091 }
6092
6093 result = (Agsym_t *)firstattr(arg1);
6094 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6095 return SWIG_arg;
6096
6097 fail: SWIGUNUSED;
6098 }
6099 lua_error(L);
6100 return 0;
6101}
6102
6103
6104static int _wrap_nextattr__SWIG_0(lua_State* L) {
6105 {
6106 int SWIG_arg = 0;
6107 Agraph_t *arg1 = (Agraph_t *) 0 ;
6108 Agsym_t *arg2 = (Agsym_t *) 0 ;
6109 Agsym_t *result = 0 ;
6110
6111 SWIG_check_num_args("nextattr",2,2)
6112 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agraph_t *");
6113 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6114
6115 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6116 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agraph_t);
6117 }
6118
6119
6120 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6121 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6122 }
6123
6124 result = (Agsym_t *)nextattr(arg1,arg2);
6125 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6126 return SWIG_arg;
6127
6128 fail: SWIGUNUSED;
6129 }
6130 lua_error(L);
6131 return 0;
6132}
6133
6134
6135static int _wrap_firstattr__SWIG_1(lua_State* L) {
6136 {
6137 int SWIG_arg = 0;
6138 Agedge_t *arg1 = (Agedge_t *) 0 ;
6139 Agsym_t *result = 0 ;
6140
6141 SWIG_check_num_args("firstattr",1,1)
6142 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agedge_t *");
6143
6144 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6145 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agedge_t);
6146 }
6147
6148 result = (Agsym_t *)firstattr(arg1);
6149 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6150 return SWIG_arg;
6151
6152 fail: SWIGUNUSED;
6153 }
6154 lua_error(L);
6155 return 0;
6156}
6157
6158
6159static int _wrap_nextattr__SWIG_1(lua_State* L) {
6160 {
6161 int SWIG_arg = 0;
6162 Agedge_t *arg1 = (Agedge_t *) 0 ;
6163 Agsym_t *arg2 = (Agsym_t *) 0 ;
6164 Agsym_t *result = 0 ;
6165
6166 SWIG_check_num_args("nextattr",2,2)
6167 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agedge_t *");
6168 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6169
6170 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6171 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agedge_t);
6172 }
6173
6174
6175 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6176 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6177 }
6178
6179 result = (Agsym_t *)nextattr(arg1,arg2);
6180 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6181 return SWIG_arg;
6182
6183 fail: SWIGUNUSED;
6184 }
6185 lua_error(L);
6186 return 0;
6187}
6188
6189
6190static int _wrap_firstattr__SWIG_2(lua_State* L) {
6191 {
6192 int SWIG_arg = 0;
6193 Agnode_t *arg1 = (Agnode_t *) 0 ;
6194 Agsym_t *result = 0 ;
6195
6196 SWIG_check_num_args("firstattr",1,1)
6197 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("firstattr",1,"Agnode_t *");
6198
6199 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6200 SWIG_fail_ptr("firstattr",1,SWIGTYPE_p_Agnode_t);
6201 }
6202
6203 result = (Agsym_t *)firstattr(arg1);
6204 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6205 return SWIG_arg;
6206
6207 fail: SWIGUNUSED;
6208 }
6209 lua_error(L);
6210 return 0;
6211}
6212
6213
6214static int _wrap_firstattr(lua_State* L) {
6215 int argc;
6216 int argv[2]={
6217 1,2
6218 };
6219
6220 argc = lua_gettop(L);
6221 if (argc == 1) {
6222 int _v = 0;
6223 {
6224 void *ptr;
6225 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6226 _v = 0;
6227 } else {
6228 _v = 1;
6229 }
6230 }
6231 if (_v) {
6232 return _wrap_firstattr__SWIG_0(L);
6233 }
6234 }
6235 if (argc == 1) {
6236 int _v = 0;
6237 {
6238 void *ptr;
6239 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6240 _v = 0;
6241 } else {
6242 _v = 1;
6243 }
6244 }
6245 if (_v) {
6246 return _wrap_firstattr__SWIG_1(L);
6247 }
6248 }
6249 if (argc == 1) {
6250 int _v = 0;
6251 {
6252 void *ptr;
6253 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6254 _v = 0;
6255 } else {
6256 _v = 1;
6257 }
6258 }
6259 if (_v) {
6260 return _wrap_firstattr__SWIG_2(L);
6261 }
6262 }
6263
6264 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'firstattr'\n"
6265 " Possible C/C++ prototypes are:\n"
6266 " firstattr(Agraph_t *)\n"
6267 " firstattr(Agedge_t *)\n"
6268 " firstattr(Agnode_t *)\n");
6269 lua_error(L);return 0;
6270}
6271
6272
6273static int _wrap_nextattr__SWIG_2(lua_State* L) {
6274 {
6275 int SWIG_arg = 0;
6276 Agnode_t *arg1 = (Agnode_t *) 0 ;
6277 Agsym_t *arg2 = (Agsym_t *) 0 ;
6278 Agsym_t *result = 0 ;
6279
6280 SWIG_check_num_args("nextattr",2,2)
6281 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("nextattr",1,"Agnode_t *");
6282 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("nextattr",2,"Agsym_t *");
6283
6284 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6285 SWIG_fail_ptr("nextattr",1,SWIGTYPE_p_Agnode_t);
6286 }
6287
6288
6289 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Agsym_t,0))){
6290 SWIG_fail_ptr("nextattr",2,SWIGTYPE_p_Agsym_t);
6291 }
6292
6293 result = (Agsym_t *)nextattr(arg1,arg2);
6294 SWIG_NewPointerObj(L,result,SWIGTYPE_p_Agsym_t,0); SWIG_arg++;
6295 return SWIG_arg;
6296
6297 fail: SWIGUNUSED;
6298 }
6299 lua_error(L);
6300 return 0;
6301}
6302
6303
6304static int _wrap_nextattr(lua_State* L) {
6305 int argc;
6306 int argv[3]={
6307 1,2,3
6308 };
6309
6310 argc = lua_gettop(L);
6311 if (argc == 2) {
6312 int _v = 0;
6313 {
6314 void *ptr;
6315 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6316 _v = 0;
6317 } else {
6318 _v = 1;
6319 }
6320 }
6321 if (_v) {
6322 {
6323 void *ptr;
6324 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6325 _v = 0;
6326 } else {
6327 _v = 1;
6328 }
6329 }
6330 if (_v) {
6331 return _wrap_nextattr__SWIG_0(L);
6332 }
6333 }
6334 }
6335 if (argc == 2) {
6336 int _v = 0;
6337 {
6338 void *ptr;
6339 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6340 _v = 0;
6341 } else {
6342 _v = 1;
6343 }
6344 }
6345 if (_v) {
6346 {
6347 void *ptr;
6348 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6349 _v = 0;
6350 } else {
6351 _v = 1;
6352 }
6353 }
6354 if (_v) {
6355 return _wrap_nextattr__SWIG_1(L);
6356 }
6357 }
6358 }
6359 if (argc == 2) {
6360 int _v = 0;
6361 {
6362 void *ptr;
6363 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6364 _v = 0;
6365 } else {
6366 _v = 1;
6367 }
6368 }
6369 if (_v) {
6370 {
6371 void *ptr;
6372 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_Agsym_t, 0)) {
6373 _v = 0;
6374 } else {
6375 _v = 1;
6376 }
6377 }
6378 if (_v) {
6379 return _wrap_nextattr__SWIG_2(L);
6380 }
6381 }
6382 }
6383
6384 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'nextattr'\n"
6385 " Possible C/C++ prototypes are:\n"
6386 " nextattr(Agraph_t *,Agsym_t *)\n"
6387 " nextattr(Agedge_t *,Agsym_t *)\n"
6388 " nextattr(Agnode_t *,Agsym_t *)\n");
6389 lua_error(L);return 0;
6390}
6391
6392
6393static int _wrap_rm__SWIG_0(lua_State* L) {
6394 {
6395 int SWIG_arg = 0;
6396 Agraph_t *arg1 = (Agraph_t *) 0 ;
6397 bool result;
6398
6399 SWIG_check_num_args("rm",1,1)
6400 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agraph_t *");
6401
6402 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6404 }
6405
6406 result = (bool)rm(arg1);
6407 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6408 return SWIG_arg;
6409
6410 fail: SWIGUNUSED;
6411 }
6412 lua_error(L);
6413 return 0;
6414}
6415
6416
6417static int _wrap_rm__SWIG_1(lua_State* L) {
6418 {
6419 int SWIG_arg = 0;
6420 Agnode_t *arg1 = (Agnode_t *) 0 ;
6421 bool result;
6422
6423 SWIG_check_num_args("rm",1,1)
6424 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agnode_t *");
6425
6426 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agnode_t,0))){
6428 }
6429
6430 result = (bool)rm(arg1);
6431 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6432 return SWIG_arg;
6433
6434 fail: SWIGUNUSED;
6435 }
6436 lua_error(L);
6437 return 0;
6438}
6439
6440
6441static int _wrap_rm__SWIG_2(lua_State* L) {
6442 {
6443 int SWIG_arg = 0;
6444 Agedge_t *arg1 = (Agedge_t *) 0 ;
6445 bool result;
6446
6447 SWIG_check_num_args("rm",1,1)
6448 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("rm",1,"Agedge_t *");
6449
6450 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agedge_t,0))){
6452 }
6453
6454 result = (bool)rm(arg1);
6455 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6456 return SWIG_arg;
6457
6458 fail: SWIGUNUSED;
6459 }
6460 lua_error(L);
6461 return 0;
6462}
6463
6464
6465static int _wrap_rm(lua_State* L) {
6466 int argc;
6467 int argv[2]={
6468 1,2
6469 };
6470
6471 argc = lua_gettop(L);
6472 if (argc == 1) {
6473 int _v = 0;
6474 {
6475 void *ptr;
6476 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6477 _v = 0;
6478 } else {
6479 _v = 1;
6480 }
6481 }
6482 if (_v) {
6483 return _wrap_rm__SWIG_0(L);
6484 }
6485 }
6486 if (argc == 1) {
6487 int _v = 0;
6488 {
6489 void *ptr;
6490 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agnode_t, 0)) {
6491 _v = 0;
6492 } else {
6493 _v = 1;
6494 }
6495 }
6496 if (_v) {
6497 return _wrap_rm__SWIG_1(L);
6498 }
6499 }
6500 if (argc == 1) {
6501 int _v = 0;
6502 {
6503 void *ptr;
6504 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agedge_t, 0)) {
6505 _v = 0;
6506 } else {
6507 _v = 1;
6508 }
6509 }
6510 if (_v) {
6511 return _wrap_rm__SWIG_2(L);
6512 }
6513 }
6514
6515 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'rm'\n"
6516 " Possible C/C++ prototypes are:\n"
6517 " rm(Agraph_t *)\n"
6518 " rm(Agnode_t *)\n"
6519 " rm(Agedge_t *)\n");
6520 lua_error(L);return 0;
6521}
6522
6523
6524static int _wrap_layout(lua_State* L) {
6525 {
6526 int SWIG_arg = 0;
6527 Agraph_t *arg1 = (Agraph_t *) 0 ;
6528 char *arg2 = (char *) 0 ;
6529 bool result;
6530
6531 SWIG_check_num_args("layout",2,2)
6532 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("layout",1,"Agraph_t *");
6533 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("layout",2,"char const *");
6534
6535 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6537 }
6538
6539 arg2 = (char *)lua_tostring(L, 2);
6540 result = (bool)layout(arg1,(char const *)arg2);
6541 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6542 return SWIG_arg;
6543
6544 fail: SWIGUNUSED;
6545 }
6546 lua_error(L);
6547 return 0;
6548}
6549
6550
6551static int _wrap_render__SWIG_0(lua_State* L) {
6552 {
6553 int SWIG_arg = 0;
6554 Agraph_t *arg1 = (Agraph_t *) 0 ;
6555 bool result;
6556
6557 SWIG_check_num_args("render",1,1)
6558 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6559
6560 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6562 }
6563
6564 result = (bool)render(arg1);
6565 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6566 return SWIG_arg;
6567
6568 fail: SWIGUNUSED;
6569 }
6570 lua_error(L);
6571 return 0;
6572}
6573
6574
6575static int _wrap_render__SWIG_1(lua_State* L) {
6576 {
6577 int SWIG_arg = 0;
6578 Agraph_t *arg1 = (Agraph_t *) 0 ;
6579 char *arg2 = (char *) 0 ;
6580 bool result;
6581
6582 SWIG_check_num_args("render",2,2)
6583 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6584 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6585
6586 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6588 }
6589
6590 arg2 = (char *)lua_tostring(L, 2);
6591 result = (bool)render(arg1,(char const *)arg2);
6592 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6593 return SWIG_arg;
6594
6595 fail: SWIGUNUSED;
6596 }
6597 lua_error(L);
6598 return 0;
6599}
6600
6601
6602static int _wrap_render__SWIG_2(lua_State* L) {
6603 {
6604 int SWIG_arg = 0;
6605 Agraph_t *arg1 = (Agraph_t *) 0 ;
6606 char *arg2 = (char *) 0 ;
6607 FILE *arg3 = (FILE *) 0 ;
6608 bool result;
6609
6610 SWIG_check_num_args("render",3,3)
6611 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6612 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6613 if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("render",3,"FILE *");
6614
6615 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6617 }
6618
6619 arg2 = (char *)lua_tostring(L, 2);
6620
6621 if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&arg3,SWIGTYPE_p_FILE,0))){
6622 SWIG_fail_ptr("render",3,SWIGTYPE_p_FILE);
6623 }
6624
6625 result = (bool)render(arg1,(char const *)arg2,arg3);
6626 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6627 return SWIG_arg;
6628
6629 fail: SWIGUNUSED;
6630 }
6631 lua_error(L);
6632 return 0;
6633}
6634
6635
6636static int _wrap_render__SWIG_3(lua_State* L) {
6637 {
6638 int SWIG_arg = 0;
6639 Agraph_t *arg1 = (Agraph_t *) 0 ;
6640 char *arg2 = (char *) 0 ;
6641 char *arg3 = (char *) 0 ;
6642 bool result;
6643
6644 SWIG_check_num_args("render",3,3)
6645 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("render",1,"Agraph_t *");
6646 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("render",2,"char const *");
6647 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("render",3,"char const *");
6648
6649 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6651 }
6652
6653 arg2 = (char *)lua_tostring(L, 2);
6654 arg3 = (char *)lua_tostring(L, 3);
6655 result = (bool)render(arg1,(char const *)arg2,(char const *)arg3);
6656 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6657 return SWIG_arg;
6658
6659 fail: SWIGUNUSED;
6660 }
6661 lua_error(L);
6662 return 0;
6663}
6664
6665
6666static int _wrap_render(lua_State* L) {
6667 int argc;
6668 int argv[4]={
6669 1,2,3,4
6670 };
6671
6672 argc = lua_gettop(L);
6673 if (argc == 1) {
6674 int _v = 0;
6675 {
6676 void *ptr;
6677 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6678 _v = 0;
6679 } else {
6680 _v = 1;
6681 }
6682 }
6683 if (_v) {
6684 return _wrap_render__SWIG_0(L);
6685 }
6686 }
6687 if (argc == 2) {
6688 int _v = 0;
6689 {
6690 void *ptr;
6691 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6692 _v = 0;
6693 } else {
6694 _v = 1;
6695 }
6696 }
6697 if (_v) {
6698 {
6699 _v = SWIG_lua_isnilstring(L,argv[1]);
6700 }
6701 if (_v) {
6702 return _wrap_render__SWIG_1(L);
6703 }
6704 }
6705 }
6706 if (argc == 3) {
6707 int _v = 0;
6708 {
6709 void *ptr;
6710 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6711 _v = 0;
6712 } else {
6713 _v = 1;
6714 }
6715 }
6716 if (_v) {
6717 {
6718 _v = SWIG_lua_isnilstring(L,argv[1]);
6719 }
6720 if (_v) {
6721 {
6722 void *ptr;
6723 if (SWIG_isptrtype(L,argv[2])==0 || SWIG_ConvertPtr(L,argv[2], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
6724 _v = 0;
6725 } else {
6726 _v = 1;
6727 }
6728 }
6729 if (_v) {
6730 return _wrap_render__SWIG_2(L);
6731 }
6732 }
6733 }
6734 }
6735 if (argc == 3) {
6736 int _v = 0;
6737 {
6738 void *ptr;
6739 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6740 _v = 0;
6741 } else {
6742 _v = 1;
6743 }
6744 }
6745 if (_v) {
6746 {
6747 _v = SWIG_lua_isnilstring(L,argv[1]);
6748 }
6749 if (_v) {
6750 {
6751 _v = SWIG_lua_isnilstring(L,argv[2]);
6752 }
6753 if (_v) {
6754 return _wrap_render__SWIG_3(L);
6755 }
6756 }
6757 }
6758 }
6759
6760 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'render'\n"
6761 " Possible C/C++ prototypes are:\n"
6762 " render(Agraph_t *)\n"
6763 " render(Agraph_t *,char const *)\n"
6764 " render(Agraph_t *,char const *,FILE *)\n"
6765 " render(Agraph_t *,char const *,char const *)\n");
6766 lua_error(L);return 0;
6767}
6768
6769
6770static int _wrap_renderresult(lua_State* L) {
6771 {
6772 int SWIG_arg = 0;
6773 Agraph_t *arg1 = (Agraph_t *) 0 ;
6774 char *arg2 = (char *) 0 ;
6775 char *arg3 = (char *) 0 ;
6776
6777 SWIG_check_num_args("renderresult",3,3)
6778 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderresult",1,"Agraph_t *");
6779 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderresult",2,"char const *");
6780 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("renderresult",3,"char *");
6781
6782 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6783 SWIG_fail_ptr("renderresult",1,SWIGTYPE_p_Agraph_t);
6784 }
6785
6786 arg2 = (char *)lua_tostring(L, 2);
6787 arg3 = (char *)lua_tostring(L, 3);
6788 renderresult(arg1,(char const *)arg2,arg3);
6789
6790 return SWIG_arg;
6791
6792 fail: SWIGUNUSED;
6793 }
6794 lua_error(L);
6795 return 0;
6796}
6797
6798
6799static int _wrap_renderchannel(lua_State* L) {
6800 {
6801 int SWIG_arg = 0;
6802 Agraph_t *arg1 = (Agraph_t *) 0 ;
6803 char *arg2 = (char *) 0 ;
6804 char *arg3 = (char *) 0 ;
6805 bool result;
6806
6807 SWIG_check_num_args("renderchannel",3,3)
6808 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderchannel",1,"Agraph_t *");
6809 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderchannel",2,"char const *");
6810 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("renderchannel",3,"char const *");
6811
6812 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6813 SWIG_fail_ptr("renderchannel",1,SWIGTYPE_p_Agraph_t);
6814 }
6815
6816 arg2 = (char *)lua_tostring(L, 2);
6817 arg3 = (char *)lua_tostring(L, 3);
6818 result = (bool)renderchannel(arg1,(char const *)arg2,(char const *)arg3);
6819 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6820 return SWIG_arg;
6821
6822 fail: SWIGUNUSED;
6823 }
6824 lua_error(L);
6825 return 0;
6826}
6827
6828
6829static int _wrap_renderdata(lua_State* L) {
6830 {
6831 int SWIG_arg = 0;
6832 Agraph_t *arg1 = (Agraph_t *) 0 ;
6833 char *arg2 = (char *) 0 ;
6834 char *result = 0 ;
6835
6836 SWIG_check_num_args("renderdata",2,2)
6837 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("renderdata",1,"Agraph_t *");
6838 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("renderdata",2,"char const *");
6839
6840 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6841 SWIG_fail_ptr("renderdata",1,SWIGTYPE_p_Agraph_t);
6842 }
6843
6844 arg2 = (char *)lua_tostring(L, 2);
6845 result = (char *)renderdata(arg1,(char const *)arg2);
6846 lua_pushstring(L,(const char *)result); SWIG_arg++;
6847 return SWIG_arg;
6848
6849 fail: SWIGUNUSED;
6850 }
6851 lua_error(L);
6852 return 0;
6853}
6854
6855
6856static int _wrap_write__SWIG_0(lua_State* L) {
6857 {
6858 int SWIG_arg = 0;
6859 Agraph_t *arg1 = (Agraph_t *) 0 ;
6860 char *arg2 = (char *) 0 ;
6861 bool result;
6862
6863 SWIG_check_num_args("write",2,2)
6864 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("write",1,"Agraph_t *");
6865 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("write",2,"char const *");
6866
6867 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6869 }
6870
6871 arg2 = (char *)lua_tostring(L, 2);
6872 result = (bool)write(arg1,(char const *)arg2);
6873 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6874 return SWIG_arg;
6875
6876 fail: SWIGUNUSED;
6877 }
6878 lua_error(L);
6879 return 0;
6880}
6881
6882
6883static int _wrap_write__SWIG_1(lua_State* L) {
6884 {
6885 int SWIG_arg = 0;
6886 Agraph_t *arg1 = (Agraph_t *) 0 ;
6887 FILE *arg2 = (FILE *) 0 ;
6888 bool result;
6889
6890 SWIG_check_num_args("write",2,2)
6891 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("write",1,"Agraph_t *");
6892 if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("write",2,"FILE *");
6893
6894 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6896 }
6897
6898
6899 if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_FILE,0))){
6900 SWIG_fail_ptr("write",2,SWIGTYPE_p_FILE);
6901 }
6902
6903 result = (bool)write(arg1,arg2);
6904 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6905 return SWIG_arg;
6906
6907 fail: SWIGUNUSED;
6908 }
6909 lua_error(L);
6910 return 0;
6911}
6912
6913
6914static int _wrap_write(lua_State* L) {
6915 int argc;
6916 int argv[3]={
6917 1,2,3
6918 };
6919
6920 argc = lua_gettop(L);
6921 if (argc == 2) {
6922 int _v = 0;
6923 {
6924 void *ptr;
6925 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6926 _v = 0;
6927 } else {
6928 _v = 1;
6929 }
6930 }
6931 if (_v) {
6932 {
6933 void *ptr;
6934 if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_FILE, 0)) {
6935 _v = 0;
6936 } else {
6937 _v = 1;
6938 }
6939 }
6940 if (_v) {
6941 return _wrap_write__SWIG_1(L);
6942 }
6943 }
6944 }
6945 if (argc == 2) {
6946 int _v = 0;
6947 {
6948 void *ptr;
6949 if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Agraph_t, 0)) {
6950 _v = 0;
6951 } else {
6952 _v = 1;
6953 }
6954 }
6955 if (_v) {
6956 {
6957 _v = SWIG_lua_isnilstring(L,argv[1]);
6958 }
6959 if (_v) {
6960 return _wrap_write__SWIG_0(L);
6961 }
6962 }
6963 }
6964
6965 SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'write'\n"
6966 " Possible C/C++ prototypes are:\n"
6967 " write(Agraph_t *,char const *)\n"
6968 " write(Agraph_t *,FILE *)\n");
6969 lua_error(L);return 0;
6970}
6971
6972
6973static int _wrap_tred(lua_State* L) {
6974 {
6975 int SWIG_arg = 0;
6976 Agraph_t *arg1 = (Agraph_t *) 0 ;
6977 bool result;
6978
6979 SWIG_check_num_args("tred",1,1)
6980 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("tred",1,"Agraph_t *");
6981
6982 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Agraph_t,0))){
6984 }
6985
6986 result = (bool)tred(arg1);
6987 lua_pushboolean(L,(int)(result!=0)); SWIG_arg++;
6988 return SWIG_arg;
6989
6990 fail: SWIGUNUSED;
6991 }
6992 lua_error(L);
6993 return 0;
6994}
6995
6996
6998 {0,0,0}
6999};
7001 {0,0,0,0,0,0}
7002};
7004 { "digraph", _wrap_digraph},
7005 { "strictgraph", _wrap_strictgraph},
7006 { "strictdigraph", _wrap_strictdigraph},
7007 { "readstring", _wrap_readstring},
7008 { "read", _wrap_read},
7009 { "graph", _wrap_graph},
7010 { "node", _wrap_node},
7011 { "edge", _wrap_edge},
7012 { "setv", _wrap_setv},
7013 { "getv", _wrap_getv},
7014 { "nameof", _wrap_nameof},
7015 { "findsubg", _wrap_findsubg},
7016 { "findnode", _wrap_findnode},
7017 { "findedge", _wrap_findedge},
7018 { "findattr", _wrap_findattr},
7019 { "headof", _wrap_headof},
7020 { "tailof", _wrap_tailof},
7021 { "graphof", _wrap_graphof},
7022 { "rootof", _wrap_rootof},
7023 { "protonode", _wrap_protonode},
7024 { "protoedge", _wrap_protoedge},
7025 { "ok", _wrap_ok},
7026 { "firstsubg", _wrap_firstsubg},
7027 { "nextsubg", _wrap_nextsubg},
7028 { "firstsupg", _wrap_firstsupg},
7029 { "nextsupg", _wrap_nextsupg},
7030 { "firstedge", _wrap_firstedge},
7031 { "nextedge", _wrap_nextedge},
7032 { "firstout", _wrap_firstout},
7033 { "nextout", _wrap_nextout},
7034 { "firsthead", _wrap_firsthead},
7035 { "nexthead", _wrap_nexthead},
7036 { "firstin", _wrap_firstin},
7037 { "nextin", _wrap_nextin},
7038 { "firsttail", _wrap_firsttail},
7039 { "nexttail", _wrap_nexttail},
7040 { "firstnode", _wrap_firstnode},
7041 { "nextnode", _wrap_nextnode},
7042 { "firstattr", _wrap_firstattr},
7043 { "nextattr", _wrap_nextattr},
7044 { "rm", _wrap_rm},
7045 { "layout", _wrap_layout},
7046 { "render", _wrap_render},
7047 { "renderresult", _wrap_renderresult},
7048 { "renderchannel", _wrap_renderchannel},
7049 { "renderdata", _wrap_renderdata},
7050 { "write", _wrap_write},
7051 { "tred", _wrap_tred},
7052 {0,0}
7053};
7055 0
7056};
7060
7069#ifdef __cplusplus
7070}
7071#endif
7072
7073/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7074
7075static swig_type_info _swigt__p_Agedge_t = {"_p_Agedge_t", "Agedge_t *", 0, 0, (void*)0, 0};
7076static swig_type_info _swigt__p_Agnode_t = {"_p_Agnode_t", "Agnode_t *", 0, 0, (void*)0, 0};
7077static swig_type_info _swigt__p_Agraph_t = {"_p_Agraph_t", "Agraph_t *", 0, 0, (void*)0, 0};
7078static swig_type_info _swigt__p_Agsym_t = {"_p_Agsym_t", "Agsym_t *", 0, 0, (void*)0, 0};
7079static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
7080
7088
7089static swig_cast_info _swigc__p_Agedge_t[] = { {&_swigt__p_Agedge_t, 0, 0, 0},{0, 0, 0, 0}};
7090static swig_cast_info _swigc__p_Agnode_t[] = { {&_swigt__p_Agnode_t, 0, 0, 0},{0, 0, 0, 0}};
7091static swig_cast_info _swigc__p_Agraph_t[] = { {&_swigt__p_Agraph_t, 0, 0, 0},{0, 0, 0, 0}};
7092static swig_cast_info _swigc__p_Agsym_t[] = { {&_swigt__p_Agsym_t, 0, 0, 0},{0, 0, 0, 0}};
7093static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
7094
7102
7103
7104/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7105
7106/* -----------------------------------------------------------------------------
7107 * Type initialization:
7108 * This problem is tough by the requirement that no dynamic
7109 * memory is used. Also, since swig_type_info structures store pointers to
7110 * swig_cast_info structures and swig_cast_info structures store pointers back
7111 * to swig_type_info structures, we need some lookup code at initialization.
7112 * The idea is that swig generates all the structures that are needed.
7113 * The runtime then collects these partially filled structures.
7114 * The SWIG_InitializeModule function takes these initial arrays out of
7115 * swig_module, and does all the lookup, filling in the swig_module.types
7116 * array with the correct data and linking the correct swig_cast_info
7117 * structures together.
7118 *
7119 * The generated swig_type_info structures are assigned statically to an initial
7120 * array. We just loop through that array, and handle each type individually.
7121 * First we lookup if this type has been already loaded, and if so, use the
7122 * loaded structure instead of the generated one. Then we have to fill in the
7123 * cast linked list. The cast data is initially stored in something like a
7124 * two-dimensional array. Each row corresponds to a type (there are the same
7125 * number of rows as there are in the swig_type_initial array). Each entry in
7126 * a column is one of the swig_cast_info structures for that type.
7127 * The cast_initial array is actually an array of arrays, because each row has
7128 * a variable number of columns. So to actually build the cast linked list,
7129 * we find the array of casts associated with the type, and loop through it
7130 * adding the casts to the list. The one last trick we need to do is making
7131 * sure the type pointer in the swig_cast_info struct is correct.
7132 *
7133 * First off, we lookup the cast->type name to see if it is already loaded.
7134 * There are three cases to handle:
7135 * 1) If the cast->type has already been loaded AND the type we are adding
7136 * casting info to has not been loaded (it is in this module), THEN we
7137 * replace the cast->type pointer with the type pointer that has already
7138 * been loaded.
7139 * 2) If BOTH types (the one we are adding casting info to, and the
7140 * cast->type) are loaded, THEN the cast info has already been loaded by
7141 * the previous module so we just ignore it.
7142 * 3) Finally, if cast->type has not already been loaded, then we add that
7143 * swig_cast_info to the linked list (because the cast->type) pointer will
7144 * be correct.
7145 * ----------------------------------------------------------------------------- */
7146
7147#ifdef __cplusplus
7148extern "C" {
7149#if 0
7150} /* c-mode */
7151#endif
7152#endif
7153
7154#if 0
7155#define SWIGRUNTIME_DEBUG
7156#endif
7157
7158#ifndef SWIG_INIT_CLIENT_DATA_TYPE
7159#define SWIG_INIT_CLIENT_DATA_TYPE void *
7160#endif
7161
7162SWIGRUNTIME void
7164 size_t i;
7165 swig_module_info *module_head, *iter;
7166 int init;
7167
7168 /* check to see if the circular list has been setup, if not, set it up */
7169 if (swig_module.next==0) {
7170 /* Initialize the swig_module */
7174 init = 1;
7175 } else {
7176 init = 0;
7177 }
7178
7179 /* Try and load any already created modules */
7180 module_head = SWIG_GetModule(clientdata);
7181 if (!module_head) {
7182 /* This is the first module loaded for this interpreter */
7183 /* so set the swig module into the interpreter */
7184 SWIG_SetModule(clientdata, &swig_module);
7185 } else {
7186 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7187 iter=module_head;
7188 do {
7189 if (iter==&swig_module) {
7190 /* Our module is already in the list, so there's nothing more to do. */
7191 return;
7192 }
7193 iter=iter->next;
7194 } while (iter!= module_head);
7195
7196 /* otherwise we must add our module into the list */
7197 swig_module.next = module_head->next;
7198 module_head->next = &swig_module;
7199 }
7200
7201 /* When multiple interpreters are used, a module could have already been initialized in
7202 a different interpreter, but not yet have a pointer in this interpreter.
7203 In this case, we do not want to continue adding types... everything should be
7204 set up already */
7205 if (init == 0) return;
7206
7207 /* Now work on filling in swig_module.types */
7208#ifdef SWIGRUNTIME_DEBUG
7209 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
7210#endif
7211 for (i = 0; i < swig_module.size; ++i) {
7212 swig_type_info *type = 0;
7213 swig_type_info *ret;
7214 swig_cast_info *cast;
7215
7216#ifdef SWIGRUNTIME_DEBUG
7217 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7218#endif
7219
7220 /* if there is another module already loaded */
7221 if (swig_module.next != &swig_module) {
7223 }
7224 if (type) {
7225 /* Overwrite clientdata field */
7226#ifdef SWIGRUNTIME_DEBUG
7227 printf("SWIG_InitializeModule: found type %s\n", type->name);
7228#endif
7230 type->clientdata = swig_module.type_initial[i]->clientdata;
7231#ifdef SWIGRUNTIME_DEBUG
7232 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7233#endif
7234 }
7235 } else {
7237 }
7238
7239 /* Insert casting types */
7240 cast = swig_module.cast_initial[i];
7241 while (cast->type) {
7242
7243 /* Don't need to add information already in the list */
7244 ret = 0;
7245#ifdef SWIGRUNTIME_DEBUG
7246 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7247#endif
7248 if (swig_module.next != &swig_module) {
7250#ifdef SWIGRUNTIME_DEBUG
7251 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7252#endif
7253 }
7254 if (ret) {
7255 if (type == swig_module.type_initial[i]) {
7256#ifdef SWIGRUNTIME_DEBUG
7257 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7258#endif
7259 cast->type = ret;
7260 ret = 0;
7261 } else {
7262 /* Check for casting already in the list */
7263 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7264#ifdef SWIGRUNTIME_DEBUG
7265 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7266#endif
7267 if (!ocast) ret = 0;
7268 }
7269 }
7270
7271 if (!ret) {
7272#ifdef SWIGRUNTIME_DEBUG
7273 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7274#endif
7275 if (type->cast) {
7276 type->cast->prev = cast;
7277 cast->next = type->cast;
7278 }
7279 type->cast = cast;
7280 }
7281 cast++;
7282 }
7283 /* Set entry in modules->types array equal to the type */
7284 swig_module.types[i] = type;
7285 }
7286 swig_module.types[i] = 0;
7287
7288#ifdef SWIGRUNTIME_DEBUG
7289 printf("**** SWIG_InitializeModule: Cast List ******\n");
7290 for (i = 0; i < swig_module.size; ++i) {
7291 int j = 0;
7293 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
7294 while (cast->type) {
7295 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7296 cast++;
7297 ++j;
7298 }
7299 printf("---- Total casts: %d\n",j);
7300 }
7301 printf("**** SWIG_InitializeModule: Cast List ******\n");
7302#endif
7303}
7304
7305/* This function will propagate the clientdata field of type to
7306* any new swig_type_info structures that have been added into the list
7307* of equivalent types. It is like calling
7308* SWIG_TypeClientData(type, clientdata) a second time.
7309*/
7310SWIGRUNTIME void
7312 size_t i;
7313 swig_cast_info *equiv;
7314 static int init_run = 0;
7315
7316 if (init_run) return;
7317 init_run = 1;
7318
7319 for (i = 0; i < swig_module.size; i++) {
7320 if (swig_module.types[i]->clientdata) {
7321 equiv = swig_module.types[i]->cast;
7322 while (equiv) {
7323 if (!equiv->converter) {
7324 if (equiv->type && !equiv->type->clientdata)
7326 }
7327 equiv = equiv->next;
7328 }
7329 }
7330 }
7331}
7332
7333#ifdef __cplusplus
7334#if 0
7335{ /* c-mode */
7336#endif
7337}
7338#endif
7339
7340
7341
7342/* Forward declaration of where the user's %init{} gets inserted */
7343void SWIG_init_user(lua_State* L );
7344
7345#ifdef __cplusplus
7346extern "C" {
7347#endif
7348/* this is the initialization function
7349 added at the very end of the code
7350 the function is always called SWIG_init, but an earlier #define will rename it
7351*/
7352#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
7353LUALIB_API int SWIG_init(lua_State* L)
7354#else
7355SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
7356#endif
7357{
7358#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
7359 int i;
7360 int globalRegister = 0;
7361 /* start with global table */
7363 /* SWIG's internal initialisation */
7364 SWIG_InitializeModule((void*)L);
7366#endif
7367
7368#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
7369 /* add a global fn */
7372#endif
7373
7374#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7375 /* set up base class pointers (the hierarchy) */
7376 for (i = 0; swig_types[i]; i++){
7377 if (swig_types[i]->clientdata){
7379 }
7380 }
7381#ifdef SWIG_LUA_MODULE_GLOBAL
7382 globalRegister = 1;
7383#endif
7384
7385
7386#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
7388#endif
7389
7390#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
7391 for (i = 0; swig_types[i]; i++){
7392 if (swig_types[i]->clientdata){
7394 }
7395 }
7396#endif
7397
7398#if defined(SWIG_LUA_ELUA_EMULATE)
7399 lua_newtable(L);
7400 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
7401 SWIG_Lua_elua_emulate_register_clear(L);
7402 if(globalRegister) {
7403 lua_pushstring(L,swig_SwigModule.name);
7404 lua_pushvalue(L,-2);
7405 lua_rawset(L,-4);
7406 }
7407#endif
7408
7409#endif
7410
7411#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7412 /* invoke user-specific initialization */
7414 /* end module */
7415 /* Note: We do not clean up the stack here (Lua will do this for us). At this
7416 point, we have the globals table and out module table on the stack. Returning
7417 one value makes the module table the result of the require command. */
7418 return 1;
7419#else
7420 return 0;
7421#endif
7422}
7423
7424#ifdef __cplusplus
7425}
7426#endif
7427
7428
7429const char* SWIG_LUACODE=
7430 "";
7431
7432void SWIG_init_user(lua_State* L)
7433{
7434 /* exec Lua code if applicable */
7436}
7437
int compare(Agobj_t *l, Agobj_t *r)
Definition actions.c:687
static void init(int argc, char *argv[], double *angle, double *accuracy, int *check_edges_with_same_endpoint, int *seed, char **color_scheme, int *lightness)
disc key
Definition exparse.y:214
expr procedure type
Definition exparse.y:211
static int flags
Definition gc.c:61
static double len(glCompPoint p)
Definition glutils.c:150
static Dt_t * L
Definition gmlparse.c:92
edge
Definition gmlparse.y:279
node NULL
Definition grammar.y:149
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:7163
static swig_type_info _swigt__p_Agsym_t
Definition gv_lua.cpp:7078
bool ok(Agraph_t *g)
Definition gv.cpp:368
static swig_cast_info _swigc__p_Agraph_t[]
Definition gv_lua.cpp:7091
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:5208
#define SWIG_DOSTRING_FAIL(S)
Definition gv_lua.cpp:2695
static swig_cast_info * swig_cast_initial[]
Definition gv_lua.cpp:7095
static int _wrap_nextedge(lua_State *L)
Definition gv_lua.cpp:5307
static int _wrap_findattr__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4466
bool tred(Agraph_t *g)
Definition gv.cpp:734
static int _wrap_getv__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3873
#define lua_rawlen
Definition gv_lua.cpp:906
static int _wrap_nextout(lua_State *L)
Definition gv_lua.cpp:5470
Agraph_t * firstsubg(Agraph_t *g)
Definition gv.cpp:373
static int _wrap_firstattr__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6135
static int _wrap_strictgraph(lua_State *L)
Definition gv_lua.cpp:3042
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:67
static int _wrap_renderchannel(lua_State *L)
Definition gv_lua.cpp:6799
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:3122
Agraph_t * nextsubg(Agraph_t *g, Agraph_t *sg)
Definition gv.cpp:379
Agraph_t * readstring(char *string)
Definition gv.cpp:55
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:6417
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:136
static int _wrap_graphof__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4639
static int _wrap_firstattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6080
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:253
static int _wrap_firsttail(lua_State *L)
Definition gv_lua.cpp:5807
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:5589
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:4268
void renderresult(Agraph_t *g, const char *format, char *outdata)
Definition gv.cpp:696
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:7093
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:4381
static int _wrap_renderresult(lua_State *L)
Definition gv_lua.cpp:6770
#define SWIGTYPE_p_Agnode_t
Definition gv_lua.cpp:2729
static int _wrap_ok__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4818
struct swig_cast_info swig_cast_info
static int _wrap_strictdigraph(lua_State *L)
Definition gv_lua.cpp:3062
#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:43
static int _wrap_setv__SWIG_4(lua_State *L)
Definition gv_lua.cpp:3626
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:158
Agedge_t * nextout(Agraph_t *g, Agedge_t *e)
Definition gv.cpp:401
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:5276
static int _wrap_firstsupg(lua_State *L)
Definition gv_lua.cpp:5043
static int _wrap_renderdata(lua_State *L)
Definition gv_lua.cpp:6829
static int _wrap_read__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3102
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:6575
static int _wrap_tailof(lua_State *L)
Definition gv_lua.cpp:4591
#define SWIG_ConvertPtr(L, idx, ptr, type, flags)
Definition gv_lua.cpp:1070
static int _wrap_getv(lua_State *L)
Definition gv_lua.cpp:4047
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:5743
static int _wrap_nextnode(lua_State *L)
Definition gv_lua.cpp:6016
Agraph_t * rootof(Agraph_t *g)
Definition gv.cpp:333
static swig_cast_info _swigc__p_Agnode_t[]
Definition gv_lua.cpp:7090
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:3185
#define SWIG_fail_arg(func_name, argnum, type)
Definition gv_lua.cpp:1088
Agnode_t * headof(Agedge_t *e)
Definition gv.cpp:293
#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:500
#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:49
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:5232
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:654
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:388
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:6914
static int _wrap_findsubg(lua_State *L)
Definition gv_lua.cpp:4327
static int _wrap_node(lua_State *L)
Definition gv_lua.cpp:3256
static int _wrap_graph__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3002
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:5985
static int _wrap_firstout__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5153
static int _wrap_findattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4412
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
Definition gv_lua.cpp:1854
Agedge_t * firstedge(Agraph_t *g)
Definition gv.cpp:415
Agraph_t * graphof(Agraph_t *g)
Definition gv.cpp:309
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:6190
static int _wrap_getv__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3900
static int _wrap_firstin(lua_State *L)
Definition gv_lua.cpp:5668
static int _wrap_firsthead(lua_State *L)
Definition gv_lua.cpp:5534
char * nameof(Agraph_t *g)
Definition gv.cpp:349
static int _wrap_nextin__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5712
#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:524
#define SWIG_INIT_CLIENT_DATA_TYPE
Definition gv_lua.cpp:7159
static int _wrap_edge__SWIG_1(lua_State *L)
Definition gv_lua.cpp:3314
Agedge_t * firstout(Agraph_t *g)
Definition gv.cpp:390
#define SWIG_POINTER_RELEASE
Definition gv_lua.cpp:192
static swig_lua_class * swig_SwigModule_classes[]
Definition gv_lua.cpp:7054
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:3954
#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:3694
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:6883
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:4890
static int _wrap_nameof__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4244
static int _wrap_graphof__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4663
static int _wrap_nextattr__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6104
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:7057
#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:4439
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:6602
static int _wrap_nextsubg(lua_State *L)
Definition gv_lua.cpp:5012
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:6973
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:621
static int _wrap_getv__SWIG_5(lua_State *L)
Definition gv_lua.cpp:4016
static int _wrap_nextout__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5177
static swig_type_info _swigt__p_Agraph_t
Definition gv_lua.cpp:7077
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:7000
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:3532
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:555
#define SWIG_POINTER_NO_NULL
Definition gv_lua.cpp:190
static int _wrap_firstout__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5371
static int _wrap_protonode(lua_State *L)
Definition gv_lua.cpp:4770
Agnode_t * tailof(Agedge_t *e)
Definition gv.cpp:301
bool write(Agraph_t *g, const char *filename)
Definition gv.cpp:723
static int _wrap_render__SWIG_3(lua_State *L)
Definition gv_lua.cpp:6636
char * renderdata(Agraph_t *g, const char *format)
Definition gv.cpp:705
#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:3660
static int _wrap_firstattr(lua_State *L)
Definition gv_lua.cpp:6214
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:4567
static int _wrap_firstedge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5098
static int _wrap_edge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3283
static int _wrap_nextattr(lua_State *L)
Definition gv_lua.cpp:6304
#define SWIG_NullReferenceError
Definition gv_lua.cpp:757
static int _wrap_firstout(lua_State *L)
Definition gv_lua.cpp:5395
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:5558
#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:340
static int _wrap_nameof__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4220
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:7089
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
Definition gv_lua.cpp:645
bool rm(Agraph_t *g)
Definition gv.cpp:590
Agnode_t * findnode(Agraph_t *g, char *name)
Definition gv.cpp:259
static int _wrap_layout(lua_State *L)
Definition gv_lua.cpp:6524
static int _wrap_firstin__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5644
#define SWIGTYPE_p_Agedge_t
Definition gv_lua.cpp:2728
static int _wrap_rm__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6441
Agnode_t * nexttail(Agnode_t *n, Agnode_t *t)
Definition gv.cpp:509
static int _wrap_firstnode__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5862
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:386
static int _wrap_nextattr__SWIG_2(lua_State *L)
Definition gv_lua.cpp:6273
static int _wrap_edge(lua_State *L)
Definition gv_lua.cpp:3398
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:2992
static int _wrap_firstnode(lua_State *L)
Definition gv_lua.cpp:5941
#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:5613
Agsym_t * findattr(Agraph_t *g, char *name)
Definition gv.cpp:273
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:7003
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:3985
SWIGRUNTIME void SWIG_PropagateClientData(void)
Definition gv_lua.cpp:7311
static int _wrap_ok(lua_State *L)
Definition gv_lua.cpp:4914
static int _wrap_graphof(lua_State *L)
Definition gv_lua.cpp:4687
static int _wrap_getv__SWIG_2(lua_State *L)
Definition gv_lua.cpp:3927
Agraph_t * digraph(char *name)
Definition gv.cpp:37
#define lua_pushglobaltable(L)
Definition gv_lua.cpp:930
static int _wrap_render__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6551
static int _wrap_firstsubg(lua_State *L)
Definition gv_lua.cpp:4988
#define SWIG_init_user
Definition gv_lua.cpp:2742
static int _wrap_rootof(lua_State *L)
Definition gv_lua.cpp:4746
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:3592
Agedge_t * firstin(Agraph_t *g)
Definition gv.cpp:467
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:530
#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:7079
Agedge_t * nextin(Agnode_t *n, Agedge_t *e)
Definition gv.cpp:494
Agraph_t * graph(char *name)
Definition gv.cpp:31
static int _wrap_firstnode__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5917
static int _wrap_render(lua_State *L)
Definition gv_lua.cpp:6666
static int _wrap_findattr(lua_State *L)
Definition gv_lua.cpp:4493
static int _wrap_protoedge(lua_State *L)
Definition gv_lua.cpp:4794
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:6465
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:7061
static int _wrap_findnode(lua_State *L)
Definition gv_lua.cpp:4354
#define SWIGTYPE_p_FILE
Definition gv_lua.cpp:2732
Agsym_t * firstattr(Agraph_t *g)
Definition gv.cpp:548
static int _wrap_nexttail(lua_State *L)
Definition gv_lua.cpp:5831
static int _wrap_write__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6856
static int _wrap_edge__SWIG_2(lua_State *L)
Definition gv_lua.cpp:3341
static int _wrap_graph(lua_State *L)
Definition gv_lua.cpp:3212
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:3082
static int _wrap_nextedge__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5122
static swig_type_info * swig_type_initial[]
Definition gv_lua.cpp:7081
static int _wrap_ok__SWIG_2(lua_State *L)
Definition gv_lua.cpp:4866
static int _wrap_ok__SWIG_1(lua_State *L)
Definition gv_lua.cpp:4842
static int _wrap_graphof__SWIG_0(lua_State *L)
Definition gv_lua.cpp:4615
static int _wrap_edge__SWIG_3(lua_State *L)
Definition gv_lua.cpp:3368
static swig_lua_attribute swig_SwigModule_attributes[]
Definition gv_lua.cpp:6997
static swig_cast_info _swigc__p_Agsym_t[]
Definition gv_lua.cpp:7092
static int _wrap_read(lua_State *L)
Definition gv_lua.cpp:3146
Agedge_t * nextedge(Agraph_t *g, Agedge_t *e)
Definition gv.cpp:417
static int _wrap_nextnode__SWIG_0(lua_State *L)
Definition gv_lua.cpp:5886
#define SWIG_LUACODE
Definition gv_lua.cpp:2744
Agedge_t * findedge(Agnode_t *t, Agnode_t *h)
Definition gv.cpp:265
#define SWIG_LUA_INT
Definition gv_lua.cpp:985
static int _wrap_setv__SWIG_0(lua_State *L)
Definition gv_lua.cpp:3502
static int _wrap_nextsupg(lua_State *L)
Definition gv_lua.cpp:5067
#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:4196
Agnode_t * firsthead(Agnode_t *n)
Definition gv.cpp:431
static swig_type_info _swigt__p_Agnode_t
Definition gv_lua.cpp:7076
#define SWIG_LUA_BINARY
Definition gv_lua.cpp:989
bool render(Agraph_t *g)
Definition gv.cpp:630
static int _wrap_rm__SWIG_0(lua_State *L)
Definition gv_lua.cpp:6393
static swig_type_info _swigt__p_Agedge_t
Definition gv_lua.cpp:7075
#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:3562
#define SWIG_OK
Definition gv_lua.cpp:277
Agnode_t * nexthead(Agnode_t *n, Agnode_t *h)
Definition gv.cpp:440
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:3022
#define SWIG_Lua_add_boolean(L, n, b)
Definition gv_lua.cpp:1108
Agedge_t * protoedge(Agraph_t *g)
Definition gv.cpp:344
static int _wrap_nextattr__SWIG_1(lua_State *L)
Definition gv_lua.cpp:6159
#define lua_rawgetp(L, index, ptr)
Definition gv_lua.cpp:945
static int _wrap_nextout__SWIG_1(lua_State *L)
Definition gv_lua.cpp:5439
#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:421
GVIO_API const char * format
Definition gvio.h:51
static gvloadimage_engine_t engine
agxbuf * str
Definition htmlparse.c:97
static Agedge_t * top(gv_stack_t *sp)
Definition tred.c:71
static int table[NTYPES][NTYPES]
Definition mincross.c:1752
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:639
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