0.08.01
C++ Open Travel Request Parsing Library
Toggle main menu visibility
Loading...
Searching...
No Matches
DbaAbstract.hpp
Go to the documentation of this file.
1
#ifndef __OPENTREP_COM_DBA_DBAABSTRACT_HPP
2
#define __OPENTREP_COM_DBA_DBAABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iostream>
9
#include <sstream>
10
11
namespace
OPENTREP
{
12
14
class
DbaAbstract
{
15
public
:
16
18
virtual
~DbaAbstract
() {}
19
22
virtual
void
toStream
(std::ostream& ioOut)
const
{}
23
26
virtual
void
fromStream
(std::istream& ioIn) {}
27
28
protected
:
30
DbaAbstract
() {}
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
OPENTREP::DbaAbstract
& iDba) {
49
std::basic_ostringstream<charT,traits> ostr;
50
ostr.copyfmt (ioOut);
51
ostr.width (0);
52
53
// Fill string stream
54
iDba.
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
OPENTREP::DbaAbstract
& ioDba) {
72
// Fill Dba object with input stream
73
ioDba.
fromStream
(ioIn);
74
return
ioIn;
75
}
76
77
#endif
// __OPENTREP_COM_DBA_DBAABSTRACT_HPP
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const OPENTREP::DbaAbstract &iDba)
Definition
DbaAbstract.hpp:42
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, OPENTREP::DbaAbstract &ioDba)
Definition
DbaAbstract.hpp:70
OPENTREP::DbaAbstract
Definition
DbaAbstract.hpp:14
OPENTREP::DbaAbstract::~DbaAbstract
virtual ~DbaAbstract()
Definition
DbaAbstract.hpp:18
OPENTREP::DbaAbstract::toStream
virtual void toStream(std::ostream &ioOut) const
Definition
DbaAbstract.hpp:22
OPENTREP::DbaAbstract::DbaAbstract
DbaAbstract()
Definition
DbaAbstract.hpp:30
OPENTREP::DbaAbstract::fromStream
virtual void fromStream(std::istream &ioIn)
Definition
DbaAbstract.hpp:26
OPENTREP
Definition
BasChronometer.cpp:10
Generated on
for OpenTREP by
1.17.0