Merged jcorgan/ptrfix -r8827:8843 into the trunk.
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 9 Jul 2008 18:59:37 +0000 (18:59 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 9 Jul 2008 18:59:37 +0000 (18:59 +0000)
commit395e1fa650428899dee0f123cb7bf432732280c5
treed84e105db26cfcca921c7446f001b31aef042984
parent73a2e8ac45347d1c1a12518557fb641dff3233b5
Merged jcorgan/ptrfix -r8827:8843 into the trunk.

Fix that allows C++ classes derived from gr_hier_block2 to
use the new self() method to get a magic object that can be passed
to connect or disconnect to refer to their own inputs and outputs.

Note that the constructor wrapper of all classes derived from
gr_hier_block2 (and thus gr_top_block too) MUST USE the new
gnuradio::get_initial_sptr function to get the initial shared pointer.
gnuradio::get_initial_sptr works on all block types, and should be
used in all new code. See qa_gr_hier_block2_derived.{h,cc} for an
example.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8844 221aa14e-8319-0410-a670-987f0aec2ac5
14 files changed:
gnuradio-core/src/lib/general/gr_kludge_copy.cc
gnuradio-core/src/lib/runtime/Makefile.am
gnuradio-core/src/lib/runtime/gr_basic_block.h
gnuradio-core/src/lib/runtime/gr_hier_block2.cc
gnuradio-core/src/lib/runtime/gr_hier_block2.h
gnuradio-core/src/lib/runtime/gr_hier_block2_detail.cc
gnuradio-core/src/lib/runtime/gr_sptr_magic.cc [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_sptr_magic.h [new file with mode: 0644]
gnuradio-core/src/lib/runtime/gr_top_block.cc
gnuradio-core/src/lib/runtime/qa_gr_hier_block2.cc
gnuradio-core/src/lib/runtime/qa_gr_hier_block2.h
gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.cc [new file with mode: 0644]
gnuradio-core/src/lib/runtime/qa_gr_hier_block2_derived.h [new file with mode: 0644]
gnuradio-core/src/lib/runtime/qa_runtime.cc