7
%newobject Bar::get_new_foo;
9
%typemap(in, numinputs=0) Foo** foo (Foo *temp) {
10
/* %typemap(in, numinputs=0) Foo** foo */
14
%typemap(argout) Foo** foo {
15
/* %typemap(argout) Foo** foo */
16
$result = SWIG_NewPointerObj((void *) *$1, $*1_descriptor, 0);
19
%apply SWIGTYPE *DISOWN {Foo* ownedFoo};
29
/* Helper method that can be called from Ruby that checks
30
that two Ruby objects are pointing to the same underlying
32
bool cpp_equal(const Foo* other)
34
return (this == other);
37
/* Just a simple method to call on Foo*/
51
Bar(): owned_(new Foo), unowned_(0)
60
/* Test that track objects works with %newobject */
61
static Foo* get_new_foo()
66
/* Test the same foo Ruby object is created each time */
72
/* Test that track objects works with argout parameters.*/
73
void get_owned_foo_by_argument(Foo** foo)
78
/* Test that track objects works with the DISOWN typemap.*/
79
void set_owned_foo(Foo* ownedFoo)
85
Foo* get_unowned_foo()
90
void set_unowned_foo(Foo* foo)