From: Nabeelah A. <nab...@uq...> - 2009-07-21 00:55:29
|
Hello (again), So now that creating synapses works perfectly, I wanted to create a template class that I could create other synapses from, i.e. template<class BaseSyn> class GenericTestSynapse : public BaseSyn { /* SNIP */ }; and then create a synapse from it: class TestStaticSpikingSynapse : public GenericTestSynapse< GenericStaticSpikingSynapse< GenericCurrentBasedSpikingSynapse< ExponentialDecaySpikeResponse > > > { SIMOBJECT( TestStaticSpikingSynapse, AdvancePhase::SpikeDriven ) /* SNIP */ }; I tried implementing both the template class GenericTestSynapse and TestStaticSpikingSynapse through the extension module, however, I get a long string of errors when I try to use TestStaticSpikingSynapse in a python model: File "GenericClassTest.py", line 89, in <module> net2.connect (inp_nrn2, n2, inp_s2) Boost.Python.ArgumentError: Python argument types in SimNetwork.connect(SingleThreadNetwork, long, long, TestStaticSpikingSynapse) did not match C++ signature: connect(SimNetwork {lvalue}, std::vector<long long, std::allocator<long long > > src, std::vector<long long, std::allocator<long long> > dst, SimObjectFactor y model, ConnectionIterator {lvalue} decider, bool collect=False) connect(SimNetwork {lvalue}, std::vector<long long, std::allocator<long long > > src, std::vector<long long, std::allocator<long long> > dst, ConnectionItera tor {lvalue} decider) connect(SimNetwork {lvalue}, std::vector<long long, std::allocator<long long > > src, std::vector<long long, std::allocator<long long> > dst, Time delay) connect(SimNetwork {lvalue}, long long src, long long dst, SimObjectFactory connector) etc etc. However, if I put the GenericTestSynapse class into the /simobjects directory of my PCSIM install, edit CMakeLists.txt to include it, and then do a clean install of PCSIM, my TestSpikingSynapse (still implemented through the extension module) works perfectly. Is there something I'm doing wrong or is it not possible to implement template classes with the extension module? Thanks, Nabeelah |