3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <mb_mblock.h>
27 #include <mb_mblock_impl.h>
30 mb_visitor::~mb_visitor()
32 // nop base case for virtual destructor.
36 mb_mblock::mb_mblock()
37 : d_impl(mb_mblock_impl_sptr(new mb_mblock_impl(this)))
41 mb_mblock::~mb_mblock()
52 // default implementation does nothing
56 mb_mblock::handle_message(mb_message_sptr msg)
58 // default implementation does nothing
61 ////////////////////////////////////////////////////////////////////////
62 // Forward other methods to implementation class //
63 ////////////////////////////////////////////////////////////////////////
66 mb_mblock::define_port(const std::string &port_name_string,
67 const std::string &protocol_class_name,
69 mb_port::port_type_t port_type)
71 return d_impl->define_port(port_name_string, protocol_class_name,
72 conjugated, port_type);
76 mb_mblock::define_component(const std::string &component_name,
77 mb_mblock_sptr component)
79 d_impl->define_component(component_name, component);
83 mb_mblock::connect(const std::string &comp_name1, const std::string &port_name1,
84 const std::string &comp_name2, const std::string &port_name2)
86 d_impl->connect(comp_name1, port_name1,
87 comp_name2, port_name2);
92 mb_mblock::disconnect(const std::string &comp_name1, const std::string &port_name1,
93 const std::string &comp_name2, const std::string &port_name2)
95 d_impl->disconnect(comp_name1, port_name1,
96 comp_name2, port_name2);
100 mb_mblock::disconnect_component(const std::string component_name)
102 d_impl->disconnect_component(component_name);
106 mb_mblock::disconnect_all()
108 d_impl->disconnect_all();
112 mb_mblock::nconnections() const
114 return d_impl->nconnections();
118 mb_mblock::walk_tree(mb_visitor *visitor, const std::string &path)
120 return d_impl->walk_tree(visitor, path);
124 mb_mblock::fullname() const
126 return d_impl->fullname();
130 mb_mblock::set_fullname(const std::string name)
132 d_impl->set_fullname(name);
136 mb_mblock::parent() const
138 return d_impl->mblock_parent();