%module namespace_class %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Ala::Ola; #ifdef SWIGD %warnfilter(SWIGWARN_IGNORE_OPERATOR_LT); #endif %inline %{ template void foobar(T t) {} namespace test { template void barfoo(T t) {} } %} %template(FooBarInt) ::foobar; %template(BarFooInt) test::barfoo; %inline %{ template struct Bar_T { }; namespace test { enum Hello { Hi }; struct Test; struct Bar { Hello foo(Hello h) { return h; } }; namespace hola { struct Bor; struct Foo; struct Foobar; template struct BarT { }; template class FooT; } template class hola::FooT { public: Hello foo(Hello h) { return h; } T bar(T h) { return h; } }; namespace hola { template <> class FooT; template <> class FooT; } template <> class hola::FooT { public: double moo(double h) { return h; } }; int a; struct hola::Foo : Bar { Hello bar(Hello h) { return h; } }; } struct test::Test { Hello foo(Hello h) { return h; } }; struct test::hola::Bor { Hello foo(Hello h) { return h; } }; namespace test { struct hola::Foobar : Bar { Hello bar(Hello h) { return h; } }; } template <> class test::hola::FooT { public: int quack(int h) { return h; } }; %} namespace test { namespace hola { %template(FooT_i) FooT; } %template(FooT_H) hola::FooT; } %template(FooT_d) ::test::hola::FooT; %template(BarT_H) test::hola::BarT; %inline %{ namespace hi { namespace hello { template struct PooT; } namespace hello { template struct PooT { }; } } %} %template(Poo_i) hi::hello::PooT; %inline %{ template struct BooT { }; namespace test { typedef ::BooT BooT_H; } %} namespace test { %template(BooT_H) ::BooT; } %template(BooT_i) ::BooT; %inline %{ namespace jafar { namespace jmath { class EulerT3D { public: static void hello(){} template static void toFrame(const VecFrame& frame_, const Vec&v_,const VecRes& vRes){} template void operator ()(T& x){} template void operator < (T& x){} template operator Bar_T () {} }; } } %} %template(toFrame) jafar::jmath::EulerT3D::toFrame; %template(callint) jafar::jmath::EulerT3D::operator(); %template(lessint) jafar::jmath::EulerT3D::operator < ; %template(callfooi) jafar::jmath::EulerT3D::operator() >; %template(lessfooi) jafar::jmath::EulerT3D::operator < < test::hola::FooT >; %inline %{ namespace { /* the unnamed namespace is 'private', so, the following declarations shouldn't be wrapped */ class Private1 { }; } namespace a { namespace { class Private2 { }; } } %} %inline %{ class Ala { public : Ala() {} class Ola { public: Ola() {} void eek() {} }; template static void hi() { } }; %} %template(hi) Ala::hi; %extend jafar::jmath::EulerT3D { } %rename(FLACFile) TagLib::FLAC::File; %inline { namespace TagLib { class File { public: File() {} }; class AudioProperties { }; class AudioPropertiesFile { public: typedef TagLib::File File; }; namespace FLAC { class File; class Properties : public AudioProperties { public: Properties(File *) {} }; class PropertiesFile : public AudioPropertiesFile { public: PropertiesFile(File * = 0) {} }; namespace bar { class PropertiesFree : public AudioProperties { public: PropertiesFree(File *) {} }; } class FooFilePrivate : private PropertiesFile { public: FooFilePrivate(File *) {} }; class FooFile : public PropertiesFile { public: FooFile(File *) {} }; class File { public: File() {} }; } } }