swig/SWIG/Examples/test-suite/template_opaque.i
Marcelo Matus c45abed30a fix warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6197 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-01 08:47:47 +00:00

29 lines
451 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 (size_t i = 0; i < v.size(); ++i) {
v[i] = OpaqueStruct();
}
}
}
}
%template(OpaqueVectorType) std::vector<A::OpaqueType>;