1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
ServiceAbstract.hpp
Go to the documentation of this file.
1
#ifndef __AIRINV_SVC_SERVICEABSTRACT_HPP
2
#define __AIRINV_SVC_SERVICEABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
//#include <sstream>
10
11
namespace
AIRINV
{
12
14
class
ServiceAbstract
{
15
public
:
16
18
virtual
~ServiceAbstract
() {}
19
22
virtual
void
toStream
(std::ostream& ioOut)
const
{}
23
26
virtual
void
fromStream
(std::istream& ioIn) {}
27
28
protected
:
30
ServiceAbstract
() {}
31
};
32
}
33
39
template
<
class
char
T,
class
traits>
40
inline
41
std::basic_ostream<charT, traits>&
42
operator<<
(std::basic_ostream<charT, traits>& ioOut,
43
const
AIRINV::ServiceAbstract
& iService) {
49
std::basic_ostringstream<charT,traits> ostr;
50
ostr.copyfmt (ioOut);
51
ostr.width (0);
52
53
// Fill string stream
54
iService.
toStream
(ostr);
55
56
// Print string stream
57
ioOut << ostr.str();
58
59
return
ioOut;
60
}
61
67
template
<
class
char
T,
class
traits>
68
inline
69
std::basic_istream<charT, traits>&
70
operator>>
(std::basic_istream<charT, traits>& ioIn,
71
AIRINV::ServiceAbstract
& ioService) {
72
// Fill Service object with input stream
73
ioService.
fromStream
(ioIn);
74
return
ioIn;
75
}
76
77
#endif
// __AIRINV_SVC_SERVICEABSTRACT_HPP
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const AIRINV::ServiceAbstract &iService)
Definition
ServiceAbstract.hpp:42
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, AIRINV::ServiceAbstract &ioService)
Definition
ServiceAbstract.hpp:70
AIRINV::ServiceAbstract
Definition
ServiceAbstract.hpp:14
AIRINV::ServiceAbstract::fromStream
virtual void fromStream(std::istream &ioIn)
Definition
ServiceAbstract.hpp:26
AIRINV::ServiceAbstract::toStream
virtual void toStream(std::ostream &ioOut) const
Definition
ServiceAbstract.hpp:22
AIRINV::ServiceAbstract::~ServiceAbstract
virtual ~ServiceAbstract()
Definition
ServiceAbstract.hpp:18
AIRINV::ServiceAbstract::ServiceAbstract
ServiceAbstract()
Definition
ServiceAbstract.hpp:30
AIRINV
Definition
AIRINV_Master_Service.hpp:38
Generated on
for AirInv by
1.17.0