Orocos Real-Time Toolkit
2.8.3
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
rtt
types
TypeStreamSelector.hpp
Go to the documentation of this file.
1
#ifndef ORO_TYPESTREAMSELECTOR_HPP_
2
#define ORO_TYPESTREAMSELECTOR_HPP_
3
4
#include <ostream>
5
#include <istream>
6
7
8
namespace
RTT
9
{
10
namespace
types {
11
template
<
typename
T,
bool
b_value>
12
struct
TypeStreamSelector
;
13
template
<
typename
T>
14
struct
TypeStreamSelector
<T,true>
15
{
16
static
std::ostream&
write
(std::ostream& os, T
const
& t)
17
{
18
#ifdef OS_HAVE_STREAMS
19
os << t;
20
#endif
21
return
os;
22
}
23
static
std::istream&
read
(std::istream& os, T& t)
24
{
25
#ifdef OS_HAVE_STREAMS
26
os >> t;
27
#endif
28
return
os;
29
}
30
};
31
template
<
typename
T>
32
struct
TypeStreamSelector
<T,false>
33
{
34
static
std::ostream&
write
(std::ostream& os, T)
35
{
36
return
os;
37
}
38
static
std::istream&
read
(std::istream& os, T& )
39
{
40
return
os;
41
}
42
};
43
}
44
}
45
46
#endif
/* ORO_TYPESTREAMSELECTOR_HPP_ */
RTT::types::TypeStreamSelector< T, false >::read
static std::istream & read(std::istream &os, T &)
Definition:
TypeStreamSelector.hpp:38
RTT::types::TypeStreamSelector< T, true >::write
static std::ostream & write(std::ostream &os, T const &t)
Definition:
TypeStreamSelector.hpp:16
RTT::types::TypeStreamSelector< T, true >::read
static std::istream & read(std::istream &os, T &t)
Definition:
TypeStreamSelector.hpp:23
RTT::types::TypeStreamSelector< T, false >::write
static std::ostream & write(std::ostream &os, T)
Definition:
TypeStreamSelector.hpp:34
RTT::types::TypeStreamSelector
Definition:
TypeStreamSelector.hpp:12
RTT
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition:
Activity.cpp:51
Generated on Fri Apr 5 2019 12:14:56 for Orocos Real-Time Toolkit by
1.8.11