|
From: | Michael Dickens |
Subject: | Re: [Discuss-gnuradio] C++ Templates and SWIG |
Date: | Tue, 20 Jan 2009 14:06:47 -0500 |
Hi Martin - On Jan 20, 2009, at 10:53 AM, Martin Braun wrote:
I am probably going to need some templates in C++ blocks in the near future, so I had a look at the code in gnuradio-core, where the templates are processed before the compiler gets to see the code (all the *X.cc.t files). If I read correctly, there was some discussion a while ago to change this to C++ templates.
Yes, see < http://lists.gnu.org/archive/html/discuss-gnuradio/2007-08/msg00361.html > and follow-up threads. Maybe Eric or Johnathan can chime in on any transition plans or thoughts?
Question: could this now be done with C++ templates, or is there a (SWIGgy) reason to use the custom template system?
I've done this in my personal block making space; it works cleanly and well in those cases I've tried. That said, I'm sure there are cases where using GR's template method makes more sense. Further, using C++ templates can result in messy and/or non-obvious programming ... I don't have a good examples, but I'm confident that these are the cases since they're part of the "power of C++". - MLD
[Prev in Thread] | Current Thread | [Next in Thread] |