git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
30 lines
434 B
OpenEdge ABL
30 lines
434 B
OpenEdge ABL
%module valuewrapper_const
|
|
|
|
%inline %{
|
|
// B requires swig to use the SwigValueWrapper
|
|
class B
|
|
{
|
|
private:
|
|
B() { }
|
|
public:
|
|
B(const B&){ }
|
|
};
|
|
|
|
// A returns a B and a const B
|
|
class A
|
|
{
|
|
B b;
|
|
public:
|
|
A(const B& b) : b(b) { }
|
|
// this one works SwigValueWrapper< B > result;
|
|
B GetB() {
|
|
return b;
|
|
}
|
|
// this one is incorrect B result;
|
|
const B GetBconst() const {
|
|
return b;
|
|
}
|
|
};
|
|
|
|
%}
|
|
|