swig/SWIG/Examples/test-suite/template_opaque.i
Marcelo Matus dad66b6ee6 add template + opaque type test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-27 11:44:33 +00:00

29 lines
448 B
OpenEdge ABL

%module template_opaque
%include std_vector.i
%{
namespace A
{
struct OpaqueStruct
{
};
}
%}
%inline {
namespace A {
struct OpaqueStruct;
typedef struct OpaqueStruct OpaqueType;
typedef std::vector<OpaqueType> OpaqueVectorType;
void FillVector(OpaqueVectorType& v)
{
for (int i = 0; i < v.size(); ++i) {
v[i] = OpaqueStruct();
}
}
}
}
%template(OpaqueVectorType) std::vector<A::OpaqueType>;