/tags/rel-1-3-15/SWIG/Examples/test-suite/private_assign.i
Swig | 21 lines | 17 code | 4 blank | 0 comment | 0 complexity | 977047f3f4c34fa1d67a3556b6db4c56 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- // A class with a private assignment operator.
- // This is rare, but sometimes used with singletons and
- // objects that have complicated state.
- %module private_assign
- %inline %{
- class Foo {
- private:
- Foo &operator=(const Foo &f) {
- return *this;
- }
- public:
- void bar() { }
- };
- Foo blah() {
- return Foo();
- };
- %}