« Return to Thread: namespace alias in C++ to C#

Re: namespace alias in C++ to C#

by David Piepgrass :: Rate this Message:

Reply to Author | View in Thread

> To answer my own question I placed the following in my .i file:
>
> namespace foo {
>    class Handle
>      public:
>       ....
>    };
> }
>
> class Handle
>     public:
>       ....
> };
>
> This handles both namespaced references to Handle and non namespace
> references.
> Is there possible a more elegant way to resolve this?

Might I suggest:

namespace foo {
   class Handle
     public:
      ....
   };
}
typedef foo::Handle Handle;

------------------------------------------------------------------------------
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

 « Return to Thread: namespace alias in C++ to C#