Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
rtt
BufferPolicy.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
* This library is free software; you can redistribute it and/or *
3
* modify it under the terms of the GNU General Public *
4
* License as published by the Free Software Foundation; *
5
* version 2 of the License. *
6
* *
7
* As a special exception, you may use this file as part of a free *
8
* software library without restriction. Specifically, if other files *
9
* instantiate templates or use macros or inline functions from this *
10
* file, or you compile this file and link it with other files to *
11
* produce an executable, this file does not by itself cause the *
12
* resulting executable to be covered by the GNU General Public *
13
* License. This exception does not however invalidate any other *
14
* reasons why the executable file might be covered by the GNU General *
15
* Public License. *
16
* *
17
* This library is distributed in the hope that it will be useful, *
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
20
* Lesser General Public License for more details. *
21
* *
22
* You should have received a copy of the GNU General Public *
23
* License along with this library; if not, write to the Free Software *
24
* Foundation, Inc., 59 Temple Place, *
25
* Suite 330, Boston, MA 02111-1307 USA *
26
* *
27
***************************************************************************/
28
29
#include "
BufferPolicy.hpp
"
30
#include <iostream>
31
32
namespace
RTT
{
33
34
std::ostream &
operator<<
(std::ostream &os,
const
BufferPolicy
&bp)
35
{
36
switch
(bp) {
37
case
UnspecifiedBufferPolicy
: os <<
"(unspecified buffer policy)"
;
break
;
38
case
PerConnection
: os <<
"PerConnection"
;
break
;
39
case
PerInputPort
: os <<
"PerInputPort"
;
break
;
40
case
PerOutputPort
: os <<
"PerOutputPort"
;
break
;
41
case
Shared
: os <<
"Shared"
;
break
;
42
default
: os <<
"(unknown buffer policy)"
;
break
;
43
}
44
return
os;
45
}
46
47
std::istream &
operator>>
(std::istream &is,
BufferPolicy
&bp)
48
{
49
std::string s;
50
is >> s;
51
if
(s ==
"PerConnection"
) bp =
PerConnection
;
52
else
if
(s ==
"PerInputPort"
) bp =
PerInputPort
;
53
else
if
(s ==
"PerOutputPort"
) bp =
PerOutputPort
;
54
else
if
(s ==
"Shared"
) bp =
Shared
;
55
else
bp =
UnspecifiedBufferPolicy
;
56
return
is;
57
}
58
59
}
// namespace RTT
RTT::operator>>
std::istream & operator>>(std::istream &is, BufferPolicy &bp)
Definition:
BufferPolicy.cpp:47
RTT::PerOutputPort
Definition:
BufferPolicy.hpp:78
BufferPolicy.hpp
RTT::operator<<
std::ostream & operator<<(std::ostream &os, const BufferPolicy &bp)
Definition:
BufferPolicy.cpp:34
RTT::BufferPolicy
BufferPolicy
Definition:
BufferPolicy.hpp:74
RTT::PerInputPort
Definition:
BufferPolicy.hpp:77
RTT
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition:
Activity.cpp:53
RTT::UnspecifiedBufferPolicy
Definition:
BufferPolicy.hpp:75
RTT::Shared
Definition:
BufferPolicy.hpp:79
RTT::PerConnection
Definition:
BufferPolicy.hpp:76
rtt
Author(s): RTT Developers
autogenerated on Tue Jun 25 2019 19:33:20