1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
ServiceAbstract.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_SVC_SERVICEABSTRACT_HPP
2
#define __STDAIR_SVC_SERVICEABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
10
namespace
stdair
{
11
15
class
ServiceAbstract
{
16
public
:
17
21
virtual
~ServiceAbstract
() {}
22
28
virtual
void
toStream
(std::ostream& ioOut)
const
{}
29
35
virtual
void
fromStream
(std::istream& ioIn) {}
36
40
// virtual const std::string describe() const = 0;
41
42
protected
:
46
ServiceAbstract
() {}
47
};
48
}
49
55
template
<
class
char
T,
class
traits>
56
inline
57
std::basic_ostream<charT, traits>&
58
operator<<
(std::basic_ostream<charT, traits>& ioOut,
59
const
stdair::ServiceAbstract
& iService) {
65
std::basic_ostringstream<charT,traits> ostr;
66
ostr.copyfmt (ioOut);
67
ostr.width (0);
68
69
// Fill string stream
70
iService.
toStream
(ostr);
71
72
// Print string stream
73
ioOut << ostr.str();
74
75
return
ioOut;
76
}
77
83
template
<
class
char
T,
class
traits>
84
inline
85
std::basic_istream<charT, traits>&
86
operator>>
(std::basic_istream<charT, traits>& ioIn,
87
stdair::ServiceAbstract
& ioService) {
88
// Fill Service object with input stream
89
ioService.
fromStream
(ioIn);
90
return
ioIn;
91
}
92
93
#endif
// __STDAIR_SVC_SERVICEABSTRACT_HPP
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, stdair::ServiceAbstract &ioService)
Definition
ServiceAbstract.hpp:86
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const stdair::ServiceAbstract &iService)
Definition
ServiceAbstract.hpp:58
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::ServiceAbstract
Definition
ServiceAbstract.hpp:15
stdair::ServiceAbstract::fromStream
virtual void fromStream(std::istream &ioIn)
Definition
ServiceAbstract.hpp:35
stdair::ServiceAbstract::toStream
virtual void toStream(std::ostream &ioOut) const
Definition
ServiceAbstract.hpp:28
stdair::ServiceAbstract::~ServiceAbstract
virtual ~ServiceAbstract()
Definition
ServiceAbstract.hpp:21
stdair::ServiceAbstract::ServiceAbstract
ServiceAbstract()
Definition
ServiceAbstract.hpp:46
Generated for StdAir by
1.17.0