adding more cases

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-01 01:17:56 +00:00
commit 52fe09a938
10 changed files with 79 additions and 14 deletions

View file

@ -1,13 +1,26 @@
%module li_std_stream
%inline %{
struct A;
%}
%include <std_iostream.i>
%include <std_sstream.i>
%pythoncallback(1) A::bar;
%callback(1) A::bar;
%inline %{
struct A
struct B {
virtual ~B()
{
}
};
struct A : B
{
void __add__(int a)
{
@ -25,8 +38,22 @@
{
return pf(a);
}
};
std::ostream& __rlshift__(std::ostream& out)
{
out << "A class";
return out;
}
};
%}
%extend std::basic_ostream<char, std::char_traits<char> >{
std::basic_ostream<char, std::char_traits<char> >&
operator<<(const A& a)
{
*self << "A class";
return *self;
}
}