« Return to Thread: Template and method pointeur

Template and method pointeur

by linkjuice :: Rate this Message:

Reply to Author | View in Thread

Hello everybody,

I'm trying to wrap several c++ class in c#.
I have a problem with a template method. I think I understand the way templates are managed through SWIG but this one is quiet complex:

class  RegistrationManager
{

public:
        template <class T>
        void registerService(std::string iServiceName,
                        ServiceObject::Status_t  (T::*method)(string iPack,string iService, Message& Message), std::string iClassName, std::string iMethodName);
...}


I include this decalration in the interface file with the template instanciation required :

%template(registerServiceObject) RegistrationManager::registerService<ServiceObject>;

ServiceObject is a class previously defined.

Here is what swig generates in c# :

public void registerServiceObject(string iServiceName, SWIGTYPE_m_T__f_r_q_const__otf__ServicePack_t_r_q_const__otf__Service_t_r_otf__InboundMessage__otf__RunnableObject__Status_t method, string iClassName, string iMethodName)
 
As you can see the second parameter is quiet weird. Do I forgot to do something?



 

 « Return to Thread: Template and method pointeur

LightInTheBox - Buy quality products at wholesale price!