From: Andras V. <and...@ui...> - 2012-09-26 14:51:42
|
Dear Raimar, The constructors are templatized for the same reason they are templatized in interaction elements (cf. e.g. ParticleOrthogonalToCavity): in order that they accept both stack objects and shared_pointers (and any combination of these possibilities for the several arguments in ParticleOrthogonalToCavity and the like). Then, the different possibilities get dispatched by cpputils::sharedPointerize. However, in the case of Act and BinarySystem it's an overkill because a simple overload would do perfectly (not to mention that at the moment there aren't really maker functions for interaction elements). So, if you think it solves the problem, feel free to replace the template constructor by a pair of overloaded constructors. Hope this helps, András On Wed, Sep 26, 2012 at 4:11 PM, Raimar Sandner <rai...@ui...> wrote: > Dear András, > > I am currently trying to understand the new shared pointer branch and to adapt > the Python interface accordingly. > > Why is the interaction now a template argument, e.g. in binary::make and the > constructor of Act? Unfortunately this further complicates exposing these > functions to Python. > > For binary::make it is possible to work around it by exposing binary::doMake > directly instead. For Act we would have to take the specific interaction into > account when we decide if a new Act-instantiation has to be compiled for > Python on demand, so we have to compile more often. > > I do not understand why the template is needed in the first place. Why not > deduce the Interaction class from SubSystemsInteraction as before? This way > the same instantiation can be used for every Interaction with the correct > rank. > > Best regards, > Raimar > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Cppqed-support mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppqed-support |