git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9086 626c5289-ae23-0410-ae9c-e8d60b6d4f22
58 lines
905 B
OpenEdge ABL
58 lines
905 B
OpenEdge ABL
%module("templatereduce") li_std_map
|
|
|
|
%include std_pair.i
|
|
%include std_map.i
|
|
%include std_multimap.i
|
|
|
|
%inline %{
|
|
struct A{
|
|
int val;
|
|
|
|
A(int v = 0): val(v)
|
|
{
|
|
}
|
|
|
|
};
|
|
%}
|
|
|
|
namespace std
|
|
{
|
|
%template(pairii) pair<int, int>;
|
|
%template(pairAA) pair<int, A>;
|
|
%template(pairA) pair<int, A*>;
|
|
%template(mapA) map<int, A*>;
|
|
%template(mmapA) multimap<int, A*>;
|
|
|
|
%template(paircA1) pair<const int, A*>;
|
|
%template(paircA2) pair<const int, const A*>;
|
|
%template(pairiiA) pair<int,pair<int, A*> >;
|
|
%template(pairiiAc) pair<int,const pair<int, A*> >;
|
|
|
|
|
|
%template() pair<swig::PyObject_ptr, swig::PyObject_ptr>;
|
|
%template(pymap) map<swig::PyObject_ptr, swig::PyObject_ptr>;
|
|
|
|
}
|
|
|
|
|
|
|
|
%inline
|
|
{
|
|
std::pair<int, A*>
|
|
p_identa(std::pair<int, A*> p) {
|
|
return p;
|
|
}
|
|
|
|
std::map<int,A*> m_identa(const std::map<int,A*>& v)
|
|
{
|
|
return v;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace std
|
|
{
|
|
%template(mapii) map<int,int>;
|
|
}
|