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_mblock::mb_mblock()
31 : d_impl(mb_mblock_impl_sptr(new mb_mblock_impl(this)))
35 mb_mblock::~mb_mblock()
46 // default implementation does nothing
50 mb_mblock::handle_message(mb_message_sptr msg)
52 // default implementation does nothing
55 ////////////////////////////////////////////////////////////////////////
56 // Forward other methods to implementation class //
57 ////////////////////////////////////////////////////////////////////////
60 mb_mblock::define_port(const std::string &port_name_string,
61 const std::string &protocol_class_name,
63 mb_port::port_type_t port_type)
65 return d_impl->define_port(port_name_string, protocol_class_name,
66 conjugated, port_type);
70 mb_mblock::define_component(const std::string &component_name,
71 mb_mblock_sptr component)
73 d_impl->define_component(component_name, component);
77 mb_mblock::connect(const std::string &comp_name1, const std::string &port_name1,
78 const std::string &comp_name2, const std::string &port_name2)
80 d_impl->connect(comp_name1, port_name1,
81 comp_name2, port_name2);
86 mb_mblock::disconnect(const std::string &comp_name1, const std::string &port_name1,
87 const std::string &comp_name2, const std::string &port_name2)
89 d_impl->disconnect(comp_name1, port_name1,
90 comp_name2, port_name2);
94 mb_mblock::disconnect_component(const std::string component_name)
96 d_impl->disconnect_component(component_name);
100 mb_mblock::disconnect_all()
102 d_impl->disconnect_all();
106 mb_mblock::nconnections() const
108 return d_impl->nconnections();
112 mb_mblock::walk_tree(mb_visitor *visitor, const std::string &path)
114 return d_impl->walk_tree(visitor, path);