From: Pecevski D. <de...@ig...> - 2009-07-21 08:33:30
|
Hi Nabeelah, Can you send me the code of both GenericTestSynapse and TestStaticSpikingSynapse? regards, Dejan Nabeelah Ali wrote: > 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 > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > ------------------------------------------------------------------------ > > _______________________________________________ > Pcsim-users mailing list > Pcs...@li... > https://lists.sourceforge.net/lists/listinfo/pcsim-users > -- _______________________________________________ Dejan Pecevski Institute for Theoretical Computer Science Graz University of Technology Inffeldgasse 16b, A-8010 Graz, Austria Tel. +43 316 873 5849 |