|
Boost Users : |
From: Qinfeng(Javen) Shi (shiqinfeng_at_[hidden])
Date: 2006-08-27 02:55:50
Dear All,
How can I wrap a c++ template function(not a member of any class) by pyste
or manually?
/**************************************/
for example :
template<class T>
void push(v_array<T>& v, const T &new_ele)
{
while(v.index >= v.length)
{
v.length = 2*v.length + 3;
v.elements = (T *)realloc(v.elements,sizeof(T) * v.length);
}
v[v.index++] = new_ele;
}
/***************************************/
Here v_array is a class.
I know how to wrap a c++ template class into python by pyste.
But what should I do if the template function is not a member of a class.
(I don't want to put the function"push()" into a class).
Any suggestion will be appreciated.
Thanks!
Javen
Research School of Information Sciences and Engineering
Australian National University
Locked Bag 8001
Canberra ACT 2601
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net