On Thu, Nov 10, 2005 at 09:19:44AM +0000, Terry Barnaby wrote: > > Just a quick update on this. > I have managed to get a basic C++ only interface to GnuRadio working. > For my use all I needed to do was re-implement the flow_graph class > in C++ rather than Python. This has enabled me to create a C++ only > implementation that works for me.
Good. > My current C++ flow_graph class is not complete, but it seems that it > would be reasonbly easy to fully implement this in C++ rather than > Python. If GnuRadio moved the flow_graph class to C++ this would allow > the core of GnuRadio to be used directly from C++ ... Yes, but you'd lose access to all the hierarchical blocks. > One little point is the forced use of the Boost shared_ptr to create > GnuRadio objects (Constructer is protected). It would make the C++ > API cleaner if it was possible to create the Objects directly rather > than only via a Boost shared_ptr. Is there any issues in allowing > the Objects to be created and managed by the application ? To keep life sane in a world that includes Python and it's reference counting, and where there are potentially many data structures (C++ and Python) holding onto pointers to objects, the boost shrared pointer stuff is a big win. It keeps every part of the application from having to worry about lifetime management. Admittedly there is a bit more code to write for each object: the public constructor that returns the shared pointer wrapped raw pointer, but this seems like a small penalty to pay to eliminate object lifetime management bugs. Glad to hear you've got it working for you! Eric _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
