swig/Examples/test-suite/using_namespace.i
Olly Betts 7dfd9aae31 WARN_* constants are user visible, so keep existing WARN_PHP4_* for
backward compatibility, but add preferred forms WARN_PHP_* and use
these ourselves.

Rename Lib/php4 to Lib/php, Source/Modules/php4.cxx to Source/Modules/php.cxx.
 
Add typemaps for const reference so Examples/test-suite/apply_signed_char.i
works.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 00:09:56 +00:00

76 lines
1.1 KiB
OpenEdge ABL

%module(ruby_minherit="1") using_namespace
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) hi::hi0; /* Ruby, wrong class name */
%warnfilter(SWIGWARN_RUBY_WRONG_NAME) hi::hi1; /* Ruby, wrong class name */
%warnfilter(SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
SWIGWARN_PHP_MULTIPLE_INHERITANCE) Hi<hello::Hello, hi::hi0>; // C#, Java, PHP multiple inheritance
%inline %{
namespace hello
{
struct Hello
{
};
template <class _T1, class _T2>
struct Hi : _T1, _T2
{
int value1() const
{
return 1;
}
int value2() const
{
return 2;
}
};
}
namespace hi
{
struct hi0
{
};
}
%}
namespace hello
{
%template(Hi_hi0) Hi<hello::Hello, hi::hi0>;
}
%inline %{
namespace hi
{
struct hi1 : private hello::Hi< hello::Hello, hi0 >
{
using hello::Hi< hello::Hello, hi::hi0 >::value1;
using hello::Hi< hello::Hello, hi0 >::value2;
};
}
%}
%inline {
namespace foo {
typedef double mytype;
}
// global namespace
typedef float mytype;
using namespace foo;
struct X {
::mytype d;
};
}