0.08.01
C++ Open Travel Request Parsing Library
Toggle main menu visibility
Loading...
Searching...
No Matches
BomAbstract.hpp
Go to the documentation of this file.
1
#ifndef __OPENTREP_BOM_BOMABSTRACT_HPP
2
#define __OPENTREP_BOM_BOMABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <sstream>
10
#include <string>
11
12
namespace
OPENTREP
{
13
17
class
BomAbstract
{
18
friend
class
FacBomAbstract
;
19
public
:
20
// /////////// Display support methods /////////
26
virtual
void
toStream
(std::ostream&)
const
= 0;
27
33
virtual
void
fromStream
(std::istream&) = 0;
34
38
virtual
std::string
toString
()
const
= 0;
39
44
virtual
std::string
describeKey
()
const
= 0;
45
50
virtual
std::string
describeShortKey
()
const
= 0;
51
52
53
protected
:
57
BomAbstract
() {}
58
BomAbstract
(
const
BomAbstract
&) {}
59
63
virtual
~BomAbstract
() {}
64
};
65
}
66
72
template
<
class
char
T,
class
traits>
73
inline
74
std::basic_ostream<charT, traits>&
75
operator<<
(std::basic_ostream<charT, traits>& ioOut,
76
const
OPENTREP::BomAbstract
& iBom) {
82
std::basic_ostringstream<charT,traits> ostr;
83
ostr.copyfmt (ioOut);
84
ostr.width (0);
85
86
// Fill string stream
87
iBom.
toStream
(ostr);
88
89
// Print string stream
90
ioOut << ostr.str();
91
92
return
ioOut;
93
}
94
100
template
<
class
char
T,
class
traits>
101
inline
102
std::basic_istream<charT, traits>&
103
operator>>
(std::basic_istream<charT, traits>& ioIn,
104
OPENTREP::BomAbstract
& ioBom) {
105
// Fill Bom object with input stream
106
ioBom.
fromStream
(ioIn);
107
return
ioIn;
108
}
109
110
#endif
// __OPENTREP_BOM_BOMABSTRACT_HPP
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const OPENTREP::BomAbstract &iBom)
Definition
BomAbstract.hpp:75
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, OPENTREP::BomAbstract &ioBom)
Definition
BomAbstract.hpp:103
OPENTREP::BomAbstract
Base class for the Business Object Model (BOM) layer.
Definition
BomAbstract.hpp:17
OPENTREP::BomAbstract::toString
virtual std::string toString() const =0
OPENTREP::BomAbstract::BomAbstract
BomAbstract(const BomAbstract &)
Definition
BomAbstract.hpp:58
OPENTREP::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:57
OPENTREP::BomAbstract::describeKey
virtual std::string describeKey() const =0
OPENTREP::BomAbstract::~BomAbstract
virtual ~BomAbstract()
Definition
BomAbstract.hpp:63
OPENTREP::BomAbstract::toStream
virtual void toStream(std::ostream &) const =0
OPENTREP::BomAbstract::fromStream
virtual void fromStream(std::istream &)=0
OPENTREP::BomAbstract::describeShortKey
virtual std::string describeShortKey() const =0
OPENTREP::BomAbstract::FacBomAbstract
friend class FacBomAbstract
Definition
BomAbstract.hpp:18
OPENTREP
Definition
BasChronometer.cpp:10
Generated on
for OpenTREP by
1.17.0