gr_hier_block2.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef INCLUDED_GR_HIER_BLOCK2_H
00023 #define INCLUDED_GR_HIER_BLOCK2_H
00024
00025 #include <gr_basic_block.h>
00026
00031 gr_hier_block2_sptr gr_make_hier_block2(const std::string &name,
00032 gr_io_signature_sptr input_signature,
00033 gr_io_signature_sptr output_signature);
00034
00035 class gr_hier_block2_detail;
00036
00042 class gr_hier_block2 : public gr_basic_block
00043 {
00044 private:
00045 friend class gr_hier_block2_detail;
00046 friend gr_hier_block2_sptr gr_make_hier_block2(const std::string &name,
00047 gr_io_signature_sptr input_signature,
00048 gr_io_signature_sptr output_signature);
00049
00053 gr_hier_block2_detail *d_detail;
00054
00055 protected:
00056 gr_hier_block2(const std::string &name,
00057 gr_io_signature_sptr input_signature,
00058 gr_io_signature_sptr output_signature);
00059
00060 public:
00061 virtual ~gr_hier_block2();
00062
00069 typedef gr_basic_block_sptr opaque_self;
00070
00077 opaque_self self();
00078
00085 void connect(gr_basic_block_sptr block);
00086
00094 void connect(gr_basic_block_sptr src, int src_port,
00095 gr_basic_block_sptr dst, int dst_port);
00096
00104 void disconnect(gr_basic_block_sptr block);
00105
00113 void disconnect(gr_basic_block_sptr src, int src_port,
00114 gr_basic_block_sptr dst, int dst_port);
00115
00122 void disconnect_all();
00123
00133 virtual void lock();
00134
00144 virtual void unlock();
00145
00146
00147
00148 gr_flat_flowgraph_sptr flatten() const;
00149 };
00150
00151 inline gr_hier_block2_sptr cast_to_hier_block2_sptr(gr_basic_block_sptr block) {
00152 return boost::dynamic_pointer_cast<gr_hier_block2, gr_basic_block>(block);
00153 }
00154
00155 #endif