mirror of https://github.com/swig/swig
40 lines
624 B
OpenEdge ABL
40 lines
624 B
OpenEdge ABL
%module template_opaque
|
|
%include "std_vector.i"
|
|
|
|
%{
|
|
namespace A
|
|
{
|
|
struct OpaqueStruct
|
|
{
|
|
int x;
|
|
};
|
|
}
|
|
|
|
enum Hello { hi, hello };
|
|
|
|
%}
|
|
|
|
|
|
%inline {
|
|
namespace A {
|
|
struct OpaqueStruct;
|
|
typedef struct OpaqueStruct OpaqueType;
|
|
typedef enum Hello Hi;
|
|
typedef std::vector<OpaqueType> OpaqueVectorType;
|
|
typedef std::vector<Hi> OpaqueVectorEnum;
|
|
|
|
void FillVector(OpaqueVectorType& v)
|
|
{
|
|
for (size_t i = 0; i < v.size(); ++i) {
|
|
v[i] = OpaqueStruct();
|
|
}
|
|
}
|
|
|
|
void FillVector(const OpaqueVectorEnum& v)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|
|
%template(OpaqueVectorType) std::vector<A::OpaqueType>;
|