1 <swigxml:swig name="namespaces" xmlns:swigxml="http://jniplusplus.sourceforge.net" xmlns:swig="http://swig.sourceforge.net" xmlns:c="http://www.ansi.org" >
4 <swig:file name="../../Lib/swig.swg" >
5 <swigxml:type string="include" />
7 <swig:file name="example_xml.i" >
9 <swig:module name="my_example" />
10 <c:enum name="color" >
12 <c:enumvalue name="RED" >
13 <swigxml:value string="RED" />
15 <c:enumvalue name="BLUE" />
16 <c:enumvalue name="GREEN" />
21 <c:access name="public" />
22 <c:function name="Foo" >
25 <swigxml:type string="int" />
27 <c:enum name="speed" >
29 <c:enumvalue name="IMPULSE" />
30 <c:enumvalue name="WARP" />
31 <c:enumvalue name="LUDICROUS" />
34 <c:function name="enum_test" >
36 <swigxml:parm name="s" >
37 <swigxml:type string="speed" />
40 <swigxml:type string="void" />
43 <swigxml:classtype string="class" />
44 <swigxml:namespace string="Foo" />
46 <c:function name="enum_test" >
48 <swigxml:parm name="c" >
49 <swigxml:type string="color" />
51 <swigxml:parm name="s" >
52 <swigxml:type string="Foo::speed" />
55 <swigxml:type string="void" />
57 <swig:file name="../../Lib/pointer.i" >
59 <swig:module name="pointer" />
65 The pointer.i library provides run-time support for managing and
66 manipulating a variety of C/C++ pointer values. In particular,
67 you can create various kinds of objects and dereference common
68 pointer types. This is done through a common set of functions:
70 ptrvalue - Dereferences a pointer
71 ptrset - Set the value of an object referenced by
73 ptrcreate - Create a new object and return a pointer.
74 ptrfree - Free the memory allocated by ptrcreate.
75 ptradd - Increment/decrement a pointer value.
77 When creating, dereferencing, or setting the value of pointer
78 variable, only the common C datatypes of int, short, long, float,
79 double, char, and char * are currently supported. Other
80 datatypes may generate an error.
82 One of the more interesting aspects of this library is that
83 it operates with a wide range of datatypes. For example,
84 the "ptrvalue" function can dereference "double *", "int *",
85 "long *", "char *", and other datatypes. Since SWIG encodes
86 pointers with type information, this can be done transparently
87 and in most cases, you can dereference a pointer without
88 ever knowing what type it actually is.
90 This library is primarily designed for utility, not high
91 performance (the dynamic determination of pointer types takes
92 more work than most normal wrapper functions). As a result,
93 you may achieve better performance by writing customized
94 "helper" functions if you're making lots of calls to these
95 functions in inner loops or other intensive operations.
97 <swigxml:section string="doc" />
102 <swigxml:type string="p.int" />
105 <swigxml:type string="p.short" />
108 <swigxml:type string="p.long" />
111 <swigxml:type string="p.float" />
114 <swigxml:type string="p.double" />
117 <swigxml:type string="p.char" />
120 <swigxml:type string="p.p.char" />
123 <swigxml:type string="p.void" />
127 <swig:file name="../../Lib/xml/ptrlang.i" >
132 #include &lt;ctype.h>
134 /* Types used by the library */
135 static swig_type_info *SWIG_POINTER_int_p = 0;
136 static swig_type_info *SWIG_POINTER_short_p =0;
137 static swig_type_info *SWIG_POINTER_long_p = 0;
138 static swig_type_info *SWIG_POINTER_float_p = 0;
139 static swig_type_info *SWIG_POINTER_double_p = 0;
140 static swig_type_info *SWIG_POINTER_char_p = 0;
141 static swig_type_info *SWIG_POINTER_char_pp = 0;
142 static swig_type_info *SWIG_POINTER_void_p = 0;
148 SWIG_POINTER_int_p = SWIG_TypeQuery("int *");
149 SWIG_POINTER_short_p = SWIG_TypeQuery("short *");
150 SWIG_POINTER_long_p = SWIG_TypeQuery("long *");
151 SWIG_POINTER_float_p = SWIG_TypeQuery("float *");
152 SWIG_POINTER_double_p = SWIG_TypeQuery("double *");
153 SWIG_POINTER_char_p = SWIG_TypeQuery("char *");
154 SWIG_POINTER_char_pp = SWIG_TypeQuery("char **");
155 SWIG_POINTER_void_p = SWIG_TypeQuery("void *");
157 <swigxml:section string="init" />
165 #define isspace(c) (c == ' ')
169 /*------------------------------------------------------------------
170 ptrvalue(ptr,type = 0)
172 Attempts to dereference a pointer value. If type is given, it
173 will try to use that type. Otherwise, this function will attempt
174 to "guess" the proper datatype by checking against all of the
176 ------------------------------------------------------------------ */
179 static SV *_ptrvalue(CPerlObj *pPerl,SV *_PTRVALUE, int index, char *type) {
180 #define ptrvalue(a,b,c) _ptrvalue(pPerl,a,b,c)
182 static SV *_ptrvalue(SV *_PTRVALUE, int index, char *type) {
183 #define ptrvalue(a,b,c) _ptrvalue(a,b,c)
189 if (SWIG_ConvertPtr(_PTRVALUE, &ptr, 0) &lt; 0) {
190 croak("Type error it ptrvalue. Argument is not a valid pointer value.");
192 /* If no datatype was passed, try a few common datatypes first */
195 /* No datatype was passed. Type to figure out if it's a common one */
197 if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_int_p) >= 0) {
199 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_double_p) >= 0) {
201 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_short_p) >= 0) {
203 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_long_p) >= 0) {
205 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_float_p) >= 0) {
207 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_char_p) >= 0) {
209 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_char_pp) >= 0) {
217 croak("Unable to dereference NULL pointer.");
221 /* Now we have a datatype. Try to figure out what to do about it */
222 if (strcmp(type,"int") == 0) {
223 obj = sv_newmortal();
224 sv_setiv(obj,(IV) *(((int *) ptr) + index));
225 } else if (strcmp(type,"double") == 0) {
226 obj = sv_newmortal();
227 sv_setnv(obj,(double) *(((double *) ptr)+index));
228 } else if (strcmp(type,"short") == 0) {
229 obj = sv_newmortal();
230 sv_setiv(obj,(IV) *(((short *) ptr) + index));
231 } else if (strcmp(type,"long") == 0) {
232 obj = sv_newmortal();
233 sv_setiv(obj,(IV) *(((long *) ptr) + index));
234 } else if (strcmp(type,"float") == 0) {
235 obj = sv_newmortal();
236 sv_setnv(obj,(double) *(((float *) ptr)+index));
237 } else if (strcmp(type,"char") == 0) {
238 obj = sv_newmortal();
239 sv_setpv(obj,((char *) ptr)+index);
240 } else if (strcmp(type,"char *") == 0) {
241 char *c = *(((char **) ptr)+index);
242 obj = sv_newmortal();
246 sv_setpv(obj,"NULL");
248 croak("Unable to dereference unsupported datatype.");
255 /*------------------------------------------------------------------
256 ptrcreate(type,value = 0,numelements = 1)
258 Attempts to create a new object of given type. Type must be
259 a basic C datatype. Will not create complex objects.
260 ------------------------------------------------------------------ */
262 static SV *_ptrcreate(CPerlObj *pPerl, char *type, SV *value, int numelements) {
263 #define ptrcreate(a,b,c) _ptrcreate(pPerl,a,b,c)
265 static SV *_ptrcreate(char *type, SV *value, int numelements) {
266 #define ptrcreate(a,b,c) _ptrcreate(a,b,c)
272 swig_type_info *cast = 0;
274 /* Check the type string against a variety of possibilities */
276 if (strcmp(type,"int") == 0) {
277 sz = sizeof(int)*numelements;
278 cast = SWIG_POINTER_int_p;
279 } else if (strcmp(type,"short") == 0) {
280 sz = sizeof(short)*numelements;
281 cast = SWIG_POINTER_short_p;
282 } else if (strcmp(type,"long") == 0) {
283 sz = sizeof(long)*numelements;
284 cast = SWIG_POINTER_long_p;
285 } else if (strcmp(type,"double") == 0) {
286 sz = sizeof(double)*numelements;
287 cast = SWIG_POINTER_double_p;
288 } else if (strcmp(type,"float") == 0) {
289 sz = sizeof(float)*numelements;
290 cast = SWIG_POINTER_float_p;
291 } else if (strcmp(type,"char") == 0) {
292 sz = sizeof(char)*numelements;
293 cast = SWIG_POINTER_char_p;
294 } else if (strcmp(type,"char *") == 0) {
295 sz = sizeof(char *)*(numelements+1);
296 cast = SWIG_POINTER_char_pp;
297 } else if (strcmp(type,"void") == 0) {
299 cast = SWIG_POINTER_void_p;
301 croak("Unable to create unknown datatype.");
305 /* Create the new object */
307 ptr = (void *) malloc(sz);
309 croak("Out of memory in ptrcreate.");
313 /* Now try to set its default value */
316 if (strcmp(type,"int") == 0) {
318 ivalue = (int) SvIV(value);
320 for (i = 0; i &lt; numelements; i++)
322 } else if (strcmp(type,"short") == 0) {
325 ivalue = (short) SvIV(value);
327 for (i = 0; i &lt; numelements; i++)
329 } else if (strcmp(type,"long") == 0) {
332 ivalue = (long) SvIV(value);
334 for (i = 0; i &lt; numelements; i++)
336 } else if (strcmp(type,"double") == 0) {
339 ivalue = (double) SvNV(value);
341 for (i = 0; i &lt; numelements; i++)
343 } else if (strcmp(type,"float") == 0) {
346 ivalue = (float) SvNV(value);
348 for (i = 0; i &lt; numelements; i++)
350 } else if (strcmp(type,"char") == 0) {
352 ivalue = (char *) SvPV(value,PL_na);
354 strncpy(ip,ivalue,numelements-1);
355 } else if (strcmp(type,"char *") == 0) {
358 ivalue = (char *) SvPV(value,PL_na);
360 for (i = 0; i &lt; numelements; i++) {
362 ip[i] = (char *) malloc(strlen(ivalue)+1);
363 strcpy(ip[i],ivalue);
371 /* Create the pointer value */
374 obj = sv_newmortal();
375 SWIG_MakePtr(obj,ptr,cast);
379 /*------------------------------------------------------------------
380 ptrset(ptr,value,index = 0,type = 0)
382 Attempts to set the value of a pointer variable. If type is
383 given, we will use that type. Otherwise, we'll guess the datatype.
384 ------------------------------------------------------------------ */
387 static void _ptrset(CPerlObj *pPerl,SV *_PTRVALUE, SV *value, int index, char *type) {
388 #define ptrset(a,b,c,d) _ptrset(pPerl,a,b,c,d)
390 static void _ptrset(SV *_PTRVALUE, SV *value, int index, char *type) {
391 #define ptrset(a,b,c,d) _ptrset(a,b,c,d)
397 if (SWIG_ConvertPtr(_PTRVALUE, &ptr, 0) &lt; 0) {
398 croak("Type error it ptrvalue. Argument is not a valid pointer value.");
400 /* If no datatype was passed, try a few common datatypes first */
402 /* No datatype was passed. Type to figure out if it's a common one */
403 if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_int_p) >= 0) {
405 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_double_p) >= 0) {
407 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_short_p) >= 0) {
409 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_long_p) >= 0) {
411 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_float_p) >= 0) {
413 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_char_p) >= 0) {
415 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_char_pp) >= 0) {
423 croak("Unable to set NULL pointer.");
427 /* Now we have a datatype. Try to figure out what to do about it */
428 if (strcmp(type,"int") == 0) {
429 *(((int *) ptr)+index) = (int) SvIV(value);
430 } else if (strcmp(type,"double") == 0) {
431 *(((double *) ptr)+index) = (double) SvNV(value);
432 } else if (strcmp(type,"short") == 0) {
433 *(((short *) ptr)+index) = (short) SvIV(value);
434 } else if (strcmp(type,"long") == 0) {
435 *(((long *) ptr)+index) = (long) SvIV(value);
436 } else if (strcmp(type,"float") == 0) {
437 *(((float *) ptr)+index) = (float) SvNV(value);
438 } else if (strcmp(type,"char") == 0) {
439 char *c = SvPV(value,PL_na);
440 strcpy(((char *) ptr)+index, c);
441 } else if (strcmp(type,"char *") == 0) {
442 char *c = SvPV(value,PL_na);
443 char **ca = (char **) ptr;
444 if (ca[index]) free(ca[index]);
445 if (strcmp(c,"NULL") == 0) {
448 ca[index] = (char *) malloc(strlen(c)+1);
452 croak("Unable to set unsupported datatype.");
457 /*------------------------------------------------------------------
460 Adds a value to an existing pointer value. Will do a type-dependent
461 add for basic datatypes. For other datatypes, will do a byte-add.
462 ------------------------------------------------------------------ */
465 static SV *_ptradd(CPerlObj *pPerl, SV *_PTRVALUE, int offset) {
466 #define ptradd(a,b) _ptradd(pPerl,a,b)
468 static SV *_ptradd(SV *_PTRVALUE, int offset) {
469 #define ptradd(a,b) _ptradd(a,b)
474 swig_type_info *type;
477 /* Try to handle a few common datatypes first */
479 if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_int_p) >= 0) {
480 ptr = (void *) (((int *) ptr) + offset);
481 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_double_p) >= 0) {
482 ptr = (void *) (((double *) ptr) + offset);
483 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_short_p) >= 0) {
484 ptr = (void *) (((short *) ptr) + offset);
485 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_long_p) >= 0) {
486 ptr = (void *) (((long *) ptr) + offset);
487 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_float_p) >= 0) {
488 ptr = (void *) (((float *) ptr) + offset);
489 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,SWIG_POINTER_char_p) >= 0) {
490 ptr = (void *) (((char *) ptr) + offset);
491 } else if (SWIG_ConvertPtr(_PTRVALUE,&ptr,0) >= 0) {
492 ptr = (void *) (((char *) ptr) + offset);
494 croak("Type error in ptradd. Argument is not a valid pointer value.");
497 printf("ptradd = %x\n", ptr);
498 tname = HvNAME(SvSTASH(SvRV(_PTRVALUE)));
499 obj = sv_newmortal();
500 sv_setref_pv(obj,tname,ptr);
504 /*------------------------------------------------------------------
507 Destroys a pointer value
508 ------------------------------------------------------------------ */
510 void _ptrfree(CPerlObj *pPerl, SV *_PTRVALUE) {
511 #define ptrfree(a) _ptrfree(pPerl, a)
513 void _ptrfree(SV *_PTRVALUE) {
514 #define ptrfree(a) _ptrfree(a)
519 if (SWIG_ConvertPtr(_PTRVALUE,&ptr,0) &lt; 0) {
520 croak("Type error in ptrfree. Argument is not a valid pointer value.");
524 /* Check to see if this pointer is a char ** */
525 if (SWIG_ConvertPtr(_PTRVALUE,&junk,SWIG_POINTER_char_pp) >= 0) {
526 char **c = (char **) ptr;
541 <swig:typemap name="ptr" >
546 <swigxml:method string="in" />
547 <swigxml:type string="p.SV" />
548 <swigxml:lang string="perl5" />
550 <swig:typemap name="value" >
555 <swigxml:method string="in" />
556 <swigxml:type string="p.SV" />
557 <swigxml:lang string="perl5" />
559 <swig:typemap name="ptrcast" >
565 <swigxml:method string="out" />
566 <swigxml:type string="p.SV" />
567 <swigxml:lang string="perl5" />
569 <swig:typemap name="ptrvalue" >
575 <swigxml:method string="out" />
576 <swigxml:type string="p.SV" />
577 <swigxml:lang string="perl5" />
579 <swig:typemap name="ptrcreate" >
585 <swigxml:method string="out" />
586 <swigxml:type string="p.SV" />
587 <swigxml:lang string="perl5" />
589 <swig:typemap name="ptradd" >
595 <swigxml:method string="out" />
596 <swigxml:type string="p.SV" />
597 <swigxml:lang string="perl5" />
599 <swig:typemap name="ptrset" >
602 if ($source == -1) return NULL;
604 <swigxml:method string="ret" />
605 <swigxml:type string="int" />
606 <swigxml:lang string="perl5" />
608 <c:function name="ptrvalue" >
610 <swigxml:parm name="ptr" >
611 <swigxml:type string="p.SV" />
613 <swigxml:parm name="index" >
614 <swigxml:value string="0" />
615 <swigxml:type string="int" />
617 <swigxml:parm name="type" >
618 <swigxml:value string="0" />
619 <swigxml:type string="p.char" />
622 <swigxml:type string="p.SV" />
624 <c:function name="ptrset" >
626 <swigxml:parm name="ptr" >
627 <swigxml:type string="p.SV" />
629 <swigxml:parm name="value" >
630 <swigxml:type string="p.SV" />
632 <swigxml:parm name="index" >
633 <swigxml:value string="0" />
634 <swigxml:type string="int" />
636 <swigxml:parm name="type" >
637 <swigxml:value string="0" />
638 <swigxml:type string="p.char" />
641 <swigxml:type string="void" />
643 <c:function name="ptrcreate" >
645 <swigxml:parm name="type" >
646 <swigxml:type string="p.char" />
648 <swigxml:parm name="value" >
649 <swigxml:value string="0" />
650 <swigxml:type string="p.SV" />
652 <swigxml:parm name="nitems" >
653 <swigxml:value string="1" />
654 <swigxml:type string="int" />
657 <swigxml:type string="p.SV" />
659 <c:function name="ptrfree" >
661 <swigxml:parm name="ptr" >
662 <swigxml:type string="p.SV" />
665 <swigxml:type string="void" />
667 <c:function name="ptradd" >
669 <swigxml:parm name="ptr" >
670 <swigxml:type string="p.SV" />
672 <swigxml:parm name="offset" >
673 <swigxml:type string="int" />
676 <swigxml:type string="p.SV" />
679 <swigxml:type string="include" />
682 <swigxml:type string="include" />
684 <swig:file name="../../Lib/xml/typemaps.i" >
686 <swig:typemap name="INPUT" >
688 <swigxml:parm name="temp" >
689 <swigxml:type string="double" />
694 temp = (double) SvNV($source);
697 <swigxml:method string="in" />
698 <swigxml:type string="p.double" />
699 <swigxml:lang string="perl5" />
701 <swig:typemap name="INPUT" >
703 <swigxml:parm name="temp" >
704 <swigxml:type string="float" />
709 temp = (float) SvNV($source);
712 <swigxml:method string="in" />
713 <swigxml:type string="p.float" />
714 <swigxml:lang string="perl5" />
716 <swig:typemap name="INPUT" >
718 <swigxml:parm name="temp" >
719 <swigxml:type string="int" />
724 temp = (int) SvIV($source);
727 <swigxml:method string="in" />
728 <swigxml:type string="p.int" />
729 <swigxml:lang string="perl5" />
731 <swig:typemap name="INPUT" >
733 <swigxml:parm name="temp" >
734 <swigxml:type string="short" />
739 temp = (short) SvIV($source);
742 <swigxml:method string="in" />
743 <swigxml:type string="p.short" />
744 <swigxml:lang string="perl5" />
746 <swig:typemap name="INPUT" >
748 <swigxml:parm name="temp" >
749 <swigxml:type string="long" />
754 temp = (long) SvIV($source);
757 <swigxml:method string="in" />
758 <swigxml:type string="p.long" />
759 <swigxml:lang string="perl5" />
761 <swig:typemap name="INPUT" >
763 <swigxml:parm name="temp" >
764 <swigxml:type string="unsigned int" />
769 temp = (unsigned int) SvIV($source);
772 <swigxml:method string="in" />
773 <swigxml:type string="p.unsigned int" />
774 <swigxml:lang string="perl5" />
776 <swig:typemap name="INPUT" >
778 <swigxml:parm name="temp" >
779 <swigxml:type string="unsigned short" />
784 temp = (unsigned short) SvIV($source);
787 <swigxml:method string="in" />
788 <swigxml:type string="p.unsigned short" />
789 <swigxml:lang string="perl5" />
791 <swig:typemap name="INPUT" >
793 <swigxml:parm name="temp" >
794 <swigxml:type string="unsigned long" />
799 temp = (unsigned long) SvIV($source);
802 <swigxml:method string="in" />
803 <swigxml:type string="p.unsigned long" />
804 <swigxml:lang string="perl5" />
806 <swig:typemap name="INPUT" >
808 <swigxml:parm name="temp" >
809 <swigxml:type string="unsigned char" />
814 temp = (unsigned char) SvIV($source);
817 <swigxml:method string="in" />
818 <swigxml:type string="p.unsigned char" />
819 <swigxml:lang string="perl5" />
821 <swig:typemap name="OUTPUT" >
823 <swigxml:parm name="temp" >
824 <swigxml:type string="int" />
831 <swigxml:method string="ignore" />
832 <swigxml:type string="p.int" />
833 <swigxml:lang string="perl5" />
835 <swig:typemap name="OUTPUT" >
837 <swigxml:parm name="temp" >
838 <swigxml:type string="short" />
843 $target = &amp;temp;
845 <swigxml:method string="ignore" />
846 <swigxml:type string="p.short" />
847 <swigxml:lang string="perl5" />
849 <swig:typemap name="OUTPUT" >
851 <swigxml:parm name="temp" >
852 <swigxml:type string="long" />
857 $target = &amp;amp;temp;
859 <swigxml:method string="ignore" />
860 <swigxml:type string="p.long" />
861 <swigxml:lang string="perl5" />
863 <swig:typemap name="OUTPUT" >
865 <swigxml:parm name="temp" >
866 <swigxml:type string="unsigned int" />
871 $target = &amp;amp;amp;temp;
873 <swigxml:method string="ignore" />
874 <swigxml:type string="p.unsigned int" />
875 <swigxml:lang string="perl5" />
877 <swig:typemap name="OUTPUT" >
879 <swigxml:parm name="temp" >
880 <swigxml:type string="unsigned short" />
885 $target = &amp;amp;amp;amp;temp;
887 <swigxml:method string="ignore" />
888 <swigxml:type string="p.unsigned short" />
889 <swigxml:lang string="perl5" />
891 <swig:typemap name="OUTPUT" >
893 <swigxml:parm name="temp" >
894 <swigxml:type string="unsigned long" />
899 $target = &amp;amp;amp;amp;amp;temp;
901 <swigxml:method string="ignore" />
902 <swigxml:type string="p.unsigned long" />
903 <swigxml:lang string="perl5" />
905 <swig:typemap name="OUTPUT" >
907 <swigxml:parm name="temp" >
908 <swigxml:type string="unsigned char" />
913 $target = &amp;amp;amp;amp;amp;amp;temp;
915 <swigxml:method string="ignore" />
916 <swigxml:type string="p.unsigned char" />
917 <swigxml:lang string="perl5" />
919 <swig:typemap name="OUTPUT" >
921 <swigxml:parm name="temp" >
922 <swigxml:type string="float" />
927 $target = &amp;amp;amp;amp;amp;amp;amp;temp;
929 <swigxml:method string="ignore" />
930 <swigxml:type string="p.float" />
931 <swigxml:lang string="perl5" />
933 <swig:typemap name="OUTPUT" >
935 <swigxml:parm name="temp" >
936 <swigxml:type string="double" />
941 $target = &amp;amp;amp;amp;amp;amp;amp;amp;temp;
943 <swigxml:method string="ignore" />
944 <swigxml:type string="p.double" />
945 <swigxml:lang string="perl5" />
947 <swig:typemap name="OUTPUT" >
950 if (argvi >= items) {
953 $target = sv_newmortal();
954 sv_setiv($target,(IV) *($source));
957 <swigxml:method string="argout" />
958 <swigxml:type string="p.int" />
959 <swigxml:lang string="perl5" />
961 <swig:typemap name="OUTPUT" >
964 if (argvi >= items) {
967 $target = sv_newmortal();
968 sv_setiv($target,(IV) *($source));
971 <swigxml:method string="argout" />
972 <swigxml:type string="p.short" />
973 <swigxml:lang string="perl5" />
975 <swig:typemap name="OUTPUT" >
978 if (argvi >= items) {
981 $target = sv_newmortal();
982 sv_setiv($target,(IV) *($source));
985 <swigxml:method string="argout" />
986 <swigxml:type string="p.long" />
987 <swigxml:lang string="perl5" />
989 <swig:typemap name="OUTPUT" >
992 if (argvi >= items) {
995 $target = sv_newmortal();
996 sv_setiv($target,(IV) *($source));
999 <swigxml:method string="argout" />
1000 <swigxml:type string="p.unsigned int" />
1001 <swigxml:lang string="perl5" />
1003 <swig:typemap name="OUTPUT" >
1006 if (argvi >= items) {
1009 $target = sv_newmortal();
1010 sv_setiv($target,(IV) *($source));
1013 <swigxml:method string="argout" />
1014 <swigxml:type string="p.unsigned short" />
1015 <swigxml:lang string="perl5" />
1017 <swig:typemap name="OUTPUT" >
1020 if (argvi >= items) {
1023 $target = sv_newmortal();
1024 sv_setiv($target,(IV) *($source));
1027 <swigxml:method string="argout" />
1028 <swigxml:type string="p.unsigned long" />
1029 <swigxml:lang string="perl5" />
1031 <swig:typemap name="OUTPUT" >
1034 if (argvi >= items) {
1037 $target = sv_newmortal();
1038 sv_setiv($target,(IV) *($source));
1041 <swigxml:method string="argout" />
1042 <swigxml:type string="p.unsigned char" />
1043 <swigxml:lang string="perl5" />
1045 <swig:typemap name="OUTPUT" >
1048 if (argvi >= items) {
1051 $target = sv_newmortal();
1052 sv_setnv($target,(double) *($source));
1055 <swigxml:method string="argout" />
1056 <swigxml:type string="p.float" />
1057 <swigxml:lang string="perl5" />
1059 <swig:typemap name="OUTPUT" >
1062 if (argvi >= items) {
1065 $target = sv_newmortal();
1066 sv_setnv($target,(double) *($source));
1069 <swigxml:method string="argout" />
1070 <swigxml:type string="p.double" />
1071 <swigxml:lang string="perl5" />
1073 <swig:typemap name="BOTH" >
1074 <swigxml:srctype string="p.int" />
1075 <swigxml:method string="in" />
1076 <swigxml:type string="p.int" />
1077 <swigxml:lang string="perl5" />
1078 <swigxml:srcname string="INPUT" />
1080 <swig:typemap name="BOTH" >
1081 <swigxml:srctype string="p.short" />
1082 <swigxml:method string="in" />
1083 <swigxml:type string="p.short" />
1084 <swigxml:lang string="perl5" />
1085 <swigxml:srcname string="INPUT" />
1087 <swig:typemap name="BOTH" >
1088 <swigxml:srctype string="p.long" />
1089 <swigxml:method string="in" />
1090 <swigxml:type string="p.long" />
1091 <swigxml:lang string="perl5" />
1092 <swigxml:srcname string="INPUT" />
1094 <swig:typemap name="BOTH" >
1095 <swigxml:srctype string="p.unsigned" />
1096 <swigxml:method string="in" />
1097 <swigxml:type string="p.unsigned" />
1098 <swigxml:lang string="perl5" />
1099 <swigxml:srcname string="INPUT" />
1101 <swig:typemap name="BOTH" >
1102 <swigxml:srctype string="p.unsigned short" />
1103 <swigxml:method string="in" />
1104 <swigxml:type string="p.unsigned short" />
1105 <swigxml:lang string="perl5" />
1106 <swigxml:srcname string="INPUT" />
1108 <swig:typemap name="BOTH" >
1109 <swigxml:srctype string="p.unsigned long" />
1110 <swigxml:method string="in" />
1111 <swigxml:type string="p.unsigned long" />
1112 <swigxml:lang string="perl5" />
1113 <swigxml:srcname string="INPUT" />
1115 <swig:typemap name="BOTH" >
1116 <swigxml:srctype string="p.unsigned char" />
1117 <swigxml:method string="in" />
1118 <swigxml:type string="p.unsigned char" />
1119 <swigxml:lang string="perl5" />
1120 <swigxml:srcname string="INPUT" />
1122 <swig:typemap name="BOTH" >
1123 <swigxml:srctype string="p.float" />
1124 <swigxml:method string="in" />
1125 <swigxml:type string="p.float" />
1126 <swigxml:lang string="perl5" />
1127 <swigxml:srcname string="INPUT" />
1129 <swig:typemap name="BOTH" >
1130 <swigxml:srctype string="p.double" />
1131 <swigxml:method string="in" />
1132 <swigxml:type string="p.double" />
1133 <swigxml:lang string="perl5" />
1134 <swigxml:srcname string="INPUT" />
1136 <swig:typemap name="BOTH" >
1137 <swigxml:srctype string="p.int" />
1138 <swigxml:method string="argout" />
1139 <swigxml:type string="p.int" />
1140 <swigxml:lang string="perl5" />
1141 <swigxml:srcname string="OUTPUT" />
1143 <swig:typemap name="BOTH" >
1144 <swigxml:srctype string="p.short" />
1145 <swigxml:method string="argout" />
1146 <swigxml:type string="p.short" />
1147 <swigxml:lang string="perl5" />
1148 <swigxml:srcname string="OUTPUT" />
1150 <swig:typemap name="BOTH" >
1151 <swigxml:srctype string="p.long" />
1152 <swigxml:method string="argout" />
1153 <swigxml:type string="p.long" />
1154 <swigxml:lang string="perl5" />
1155 <swigxml:srcname string="OUTPUT" />
1157 <swig:typemap name="BOTH" >
1158 <swigxml:srctype string="p.unsigned" />
1159 <swigxml:method string="argout" />
1160 <swigxml:type string="p.unsigned" />
1161 <swigxml:lang string="perl5" />
1162 <swigxml:srcname string="OUTPUT" />
1164 <swig:typemap name="BOTH" >
1165 <swigxml:srctype string="p.unsigned short" />
1166 <swigxml:method string="argout" />
1167 <swigxml:type string="p.unsigned short" />
1168 <swigxml:lang string="perl5" />
1169 <swigxml:srcname string="OUTPUT" />
1171 <swig:typemap name="BOTH" >
1172 <swigxml:srctype string="p.unsigned long" />
1173 <swigxml:method string="argout" />
1174 <swigxml:type string="p.unsigned long" />
1175 <swigxml:lang string="perl5" />
1176 <swigxml:srcname string="OUTPUT" />
1178 <swig:typemap name="BOTH" >
1179 <swigxml:srctype string="p.unsigned char" />
1180 <swigxml:method string="argout" />
1181 <swigxml:type string="p.unsigned char" />
1182 <swigxml:lang string="perl5" />
1183 <swigxml:srcname string="OUTPUT" />
1185 <swig:typemap name="BOTH" >
1186 <swigxml:srctype string="p.float" />
1187 <swigxml:method string="argout" />
1188 <swigxml:type string="p.float" />
1189 <swigxml:lang string="perl5" />
1190 <swigxml:srcname string="OUTPUT" />
1192 <swig:typemap name="BOTH" >
1193 <swigxml:srctype string="p.double" />
1194 <swigxml:method string="argout" />
1195 <swigxml:type string="p.double" />
1196 <swigxml:lang string="perl5" />
1197 <swigxml:srcname string="OUTPUT" />
1199 <swig:typemap name="REFERENCE" >
1201 <swigxml:parm name="dvalue" >
1202 <swigxml:type string="double" />
1208 if (!SvROK($source)) {
1209 croak("expected a reference");
1211 tempsv = SvRV($source);
1212 if ((!SvNOK(tempsv)) && (!SvIOK(tempsv))) {
1213 printf("Received %d\n", SvTYPE(tempsv));
1214 croak("Expected a double reference.");
1216 dvalue = SvNV(tempsv);
1217 $target = &dvalue;
1219 <swigxml:method string="in" />
1220 <swigxml:type string="p.double" />
1221 <swigxml:lang string="perl5" />
1223 <swig:typemap name="REFERENCE" >
1225 <swigxml:parm name="dvalue" >
1226 <swigxml:type string="float" />
1232 if (!SvROK($source)) {
1233 croak("expected a reference");
1235 tempsv = SvRV($source);
1236 if ((!SvNOK(tempsv)) && (!SvIOK(tempsv))) {
1237 croak("expected a double reference");
1239 dvalue = (float) SvNV(tempsv);
1240 $target = &dvalue;
1242 <swigxml:method string="in" />
1243 <swigxml:type string="p.float" />
1244 <swigxml:lang string="perl5" />
1246 <swig:typemap name="REFERENCE" >
1248 <swigxml:parm name="dvalue" >
1249 <swigxml:type string="int" />
1255 if (!SvROK($source)) {
1256 croak("expected a reference");
1258 tempsv = SvRV($source);
1259 if (!SvIOK(tempsv)) {
1260 croak("expected a integer reference");
1262 dvalue = SvIV(tempsv);
1263 $target = &dvalue;
1265 <swigxml:method string="in" />
1266 <swigxml:type string="p.int" />
1267 <swigxml:lang string="perl5" />
1269 <swig:typemap name="REFERENCE" >
1271 <swigxml:parm name="dvalue" >
1272 <swigxml:type string="short" />
1278 if (!SvROK($source)) {
1279 croak("expected a reference");
1281 tempsv = SvRV($source);
1282 if (!SvIOK(tempsv)) {
1283 croak("expected a integer reference");
1285 dvalue = (short) SvIV(tempsv);
1286 $target = &dvalue;
1288 <swigxml:method string="in" />
1289 <swigxml:type string="p.short" />
1290 <swigxml:lang string="perl5" />
1292 <swig:typemap name="REFERENCE" >
1294 <swigxml:parm name="dvalue" >
1295 <swigxml:type string="long" />
1301 if (!SvROK($source)) {
1302 croak("expected a reference");
1304 tempsv = SvRV($source);
1305 if (!SvIOK(tempsv)) {
1306 croak("expected a integer reference");
1308 dvalue = (long) SvIV(tempsv);
1309 $target = &dvalue;
1311 <swigxml:method string="in" />
1312 <swigxml:type string="p.long" />
1313 <swigxml:lang string="perl5" />
1315 <swig:typemap name="REFERENCE" >
1317 <swigxml:parm name="dvalue" >
1318 <swigxml:type string="unsigned int" />
1324 if (!SvROK($source)) {
1325 croak("expected a reference");
1327 tempsv = SvRV($source);
1328 if (!SvIOK(tempsv)) {
1329 croak("expected a integer reference");
1331 dvalue = (unsigned int) SvIV(tempsv);
1332 $target = &dvalue;
1334 <swigxml:method string="in" />
1335 <swigxml:type string="p.unsigned int" />
1336 <swigxml:lang string="perl5" />
1338 <swig:typemap name="REFERENCE" >
1340 <swigxml:parm name="dvalue" >
1341 <swigxml:type string="unsigned short" />
1347 if (!SvROK($source)) {
1348 croak("expected a reference");
1350 tempsv = SvRV($source);
1351 if (!SvIOK(tempsv)) {
1352 croak("expected a integer reference");
1354 dvalue = (unsigned short) SvIV(tempsv);
1355 $target = &dvalue;
1357 <swigxml:method string="in" />
1358 <swigxml:type string="p.unsigned short" />
1359 <swigxml:lang string="perl5" />
1361 <swig:typemap name="REFERENCE" >
1363 <swigxml:parm name="dvalue" >
1364 <swigxml:type string="unsigned long" />
1370 if (!SvROK($source)) {
1371 croak("expected a reference");
1373 tempsv = SvRV($source);
1374 if (!SvIOK(tempsv)) {
1375 croak("expected a integer reference");
1377 dvalue = (unsigned long) SvIV(tempsv);
1378 $target = &dvalue;
1380 <swigxml:method string="in" />
1381 <swigxml:type string="p.unsigned long" />
1382 <swigxml:lang string="perl5" />
1384 <swig:typemap name="REFERENCE" >
1388 tempsv = SvRV($arg);
1389 sv_setnv(tempsv, (double) *$source);
1391 <swigxml:method string="argout" />
1392 <swigxml:type string="p.double" />
1393 <swigxml:lang string="perl5" />
1395 <swig:typemap name="REFERENCE" >
1399 tempsv = SvRV($arg);
1400 sv_setnv(tempsv, (double) *$source);
1402 <swigxml:method string="argout" />
1403 <swigxml:type string="p.float" />
1404 <swigxml:lang string="perl5" />
1406 <swig:typemap name="REFERENCE" >
1410 tempsv = SvRV($arg);
1411 sv_setiv(tempsv, (int) *$source);
1413 <swigxml:method string="argout" />
1414 <swigxml:type string="p.int" />
1415 <swigxml:lang string="perl5" />
1417 <swig:typemap name="REFERENCE" >
1421 tempsv = SvRV($arg);
1422 sv_setiv(tempsv, (int) *$source);
1424 <swigxml:method string="argout" />
1425 <swigxml:type string="p.short" />
1426 <swigxml:lang string="perl5" />
1428 <swig:typemap name="REFERENCE" >
1432 tempsv = SvRV($arg);
1433 sv_setiv(tempsv, (int) *$source);
1435 <swigxml:method string="argout" />
1436 <swigxml:type string="p.long" />
1437 <swigxml:lang string="perl5" />
1439 <swig:typemap name="REFERENCE" >
1443 tempsv = SvRV($arg);
1444 sv_setiv(tempsv, (int) *$source);
1446 <swigxml:method string="argout" />
1447 <swigxml:type string="p.unsigned int" />
1448 <swigxml:lang string="perl5" />
1450 <swig:typemap name="REFERENCE" >
1454 tempsv = SvRV($arg);
1455 sv_setiv(tempsv, (int) *$source);
1457 <swigxml:method string="argout" />
1458 <swigxml:type string="p.unsigned short" />
1459 <swigxml:lang string="perl5" />
1461 <swig:typemap name="REFERENCE" >
1465 tempsv = SvRV($arg);
1466 sv_setiv(tempsv, (int) *$source);
1468 <swigxml:method string="argout" />
1469 <swigxml:type string="p.unsigned long" />
1470 <swigxml:lang string="perl5" />
1473 <swigxml:type string="include" />
1478 WHATEVER MAKES YOU HAPPY AS RESULT
1480 <swigxml:method string="out" />
1481 <swigxml:type string="p.int" />
1486 WHATEVER MAKES YOU HAPPY AS PARAMETER
1488 <swigxml:method string="in" />
1489 <swigxml:type string="p.int" />
1491 <swig:pragma name="DEBUG" >
1492 <swigxml:value string="false" />
1493 <swigxml:lang string="xml" />
1495 <c:function name="my_gcd" >
1497 <swigxml:parm name="x" >
1498 <swigxml:type string="p.q(const).char" />
1500 <swigxml:parm name="y" >
1501 <swigxml:type string="a().p.int" />
1503 <swigxml:parm name="r" >
1504 <swigxml:type string="p.int" />
1506 <swigxml:parm name="op" >
1507 <swigxml:type string="p.f(int,int).int" />
1510 <swigxml:storage string="extern" />
1511 <swigxml:type string="p.int" />
1513 <c:variable name="my_foo" >
1514 <swigxml:storage string="extern" />
1515 <swigxml:type string="double" />
1517 <c:function name="my_void" >
1518 <swigxml:type string="void" />
1520 <c:function name="my_empty" >
1521 <swigxml:type string="int" />
1523 <c:variable name="my_dutch" >
1524 <swigxml:value string="1.0" />
1525 <swigxml:type string="q(const).double" />
1527 <c:class name="my_union" >
1529 <c:variable name="my_iii" >
1530 <swigxml:type string="int" />
1532 <c:variable name="my_ccc" >
1533 <swigxml:type string="char" />
1536 <swigxml:classtype string="union" />
1537 <swigxml:namespace string="my_union" />
1539 <c:class name="my_struct" >
1541 <c:access name="public" />
1542 <c:destructor name="my_struct" >
1543 <swigxml:storage string="virtual" />
1545 <c:function name="my_foo" >
1546 <swigxml:type string="int" />
1548 <c:access name="protected" />
1549 <c:variable name="my_bar" >
1550 <swigxml:type string="int" />
1552 <c:variable name="x" >
1553 <swigxml:type string="double" />
1555 <c:variable name="y" >
1556 <swigxml:type string="double" />
1558 <c:function name="area" >
1559 <swigxml:abstract string="1" />
1560 <swigxml:storage string="virtual" />
1561 <swigxml:type string="double" />
1563 <c:variable name="nshapes" >
1564 <swigxml:storage string="static" />
1565 <swigxml:type string="int" />
1568 <swigxml:classtype string="struct" />
1569 <swigxml:namespace string="my_struct" />
1571 <c:class name="my_class" >
1573 <c:access name="public" />
1574 <c:function name="my_class" >
1576 <swigxml:parm name="c" >
1577 <swigxml:type string="char" />
1580 <swigxml:type string="int" />
1582 <c:access name="private" />
1583 <c:destructor name="my_class" />
1584 <c:function name="my_func" >
1587 <swigxml:type string="my_class" />
1589 <swigxml:parm name="x" >
1590 <swigxml:type string="p.p.char" />
1592 <swigxml:parm name="y" >
1593 <swigxml:type string="a().int" />
1595 <swigxml:parm name="r" >
1596 <swigxml:type string="r.q(const).int" />
1599 <swigxml:storage string="virtual" />
1600 <swigxml:type string="p.q(const).int" />
1602 <c:variable name="my_foo" >
1603 <swigxml:type string="a(128).double" />
1605 <c:variable name="i" >
1606 <swigxml:type string="q(const).my_int" />
1609 <swigxml:classtype string="class" />
1611 <swigxml:item name="my_struct" />
1612 <swigxml:item name="my_union" />
1614 <swigxml:namespace string="my_class" />
1616 <c:typedef name="my_int" >
1617 <swigxml:type string="int" />
1620 <swigxml:type string="include" />