From: Chris N. <cn...@it...> - 2009-05-01 14:48:22
|
Hi all, I've just been writing a new synapse class, and ran in to a few templating issues. I appreciate the flexibility of the Generic* design, however I'm having problems with it and the current PCSIM / python build system. I created a new generic synapse type, originally intending to have it substitute the GenericStaticSpikingSynapse in a few of my own custom synapse classes. However it seems that when building the python objects, they require explicit #includes of the classes that will be passed as template parameters. For those classes that are being passed as template parameters to my class, e.g. typedef GenericMySpikingSynapse< GenericCurrentBasedSpikingSynapse< ExponentialDecaySpikeResponse > > GenericMySpikingSynapseType I can just include the appropriate headers in my class header, which is not elegant, but is a workaround. However the next step is problematic, as I want to use my class as a template parameter to existing classes, e.g. typedef GenericFroemkeDanStdpSynapse< GenericEachPairStdpSynapse< GenericMySpikingSynapseType > > GenericMyFroemkeDanStdpSynapseType so I need to add my class header to existing framework class headers, which starts to get quite messy. Now I realise that you (the designers that is) undoubtedly know all this, as you've done that very thing in your own classes. I guess my question is, is there any nicer workaround anyone can think of than modifying the existing objects, or are there any build system / structural changes happening that will alleviate this problem? I don't understand the complete python <-> c++ architecture, so I'm not sure how deep the problem lies. Cheers, Chris. |