mavtables
0.2.1
MAVLink router and firewall.
src
Interface.cpp
Go to the documentation of this file.
1
// MAVLink router and firewall.
2
// Copyright (C) 2018 Michael R. Shannon <mrshannon.aerospace@gmail.com>
3
//
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 2 of the License, or
7
// (at your option) any later version.
8
//
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18
#include <memory>
19
#include <utility>
20
21
#include "
ConnectionPool.hpp
"
22
#include "
Interface.hpp
"
23
24
25
// Placed here to avoid weak-vtables error.
26
// LCOV_EXCL_START
27
Interface::~Interface
()
28
{
29
}
30
// LCOV_EXCL_STOP
31
32
33
/** Print the given \ref Interface to the given output stream.
34
*
35
* \note This is a polymorphic print. Therefore, it can print any derived
36
* class as well.
37
*
38
* Some examples are:
39
* ```
40
* serial {
41
* device /dev/ttyUSB0;
42
* baudrate 115200;
43
* flow_control yes;
44
* }
45
* ```
46
* ```
47
* udp {
48
* port 14500;
49
* address 127.0.0.1;
50
* }
51
* ```
52
53
* \relates Interface
54
* \param os The output stream to print to.
55
* \param interface The interface (or any child of the Interface) to print.
56
* \returns The output stream.
57
*/
58
std::ostream &
operator<<
(std::ostream &os,
const
Interface
&interface)
59
{
60
return
interface.
print_
(os);
61
}
ConnectionPool.hpp
Interface::print_
virtual std::ostream & print_(std::ostream &os) const =0
Interface::~Interface
virtual ~Interface()
Definition:
Interface.cpp:27
Action::operator<<
std::ostream & operator<<(std::ostream &os, const Action &action)
Definition:
Action.cpp:188
Interface
Definition:
Interface.hpp:33
Interface.hpp
Generated by
1.8.14