1.01.12
C++ Simulated Travel-Oriented Distribution System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
BomAbstract.hpp
Go to the documentation of this file.
1
#ifndef __TVLSIM_BOM_BOMABSTRACT_HPP
2
#define __TVLSIM_BOM_BOMABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
11
namespace
TVLSIM
{
12
14
class
BomAbstract
{
15
friend
class
FacBomAbstract
;
16
public
:
17
// /////////// Display support methods /////////
20
virtual
void
toStream
(std::ostream& ioOut)
const
= 0;
21
24
virtual
void
fromStream
(std::istream& ioIn) = 0;
25
27
virtual
std::string
toString
()
const
= 0;
28
31
virtual
std::string
describeKey
()
const
= 0;
32
35
virtual
std::string
describeShortKey
()
const
= 0;
36
37
38
protected
:
40
BomAbstract
() {}
41
BomAbstract
(
const
BomAbstract
&) {}
42
44
virtual
~BomAbstract
() {}
45
};
46
}
47
53
template
<
class
char
T,
class
traits>
54
inline
55
std::basic_ostream<charT, traits>&
56
operator<<
(std::basic_ostream<charT, traits>& ioOut,
57
const
TVLSIM::BomAbstract
& iBom) {
63
std::basic_ostringstream<charT,traits> ostr;
64
ostr.copyfmt (ioOut);
65
ostr.width (0);
66
67
// Fill string stream
68
iBom.
toStream
(ostr);
69
70
// Print string stream
71
ioOut << ostr.str();
72
73
return
ioOut;
74
}
75
81
template
<
class
char
T,
class
traits>
82
inline
83
std::basic_istream<charT, traits>&
84
operator>>
(std::basic_istream<charT, traits>& ioIn,
85
TVLSIM::BomAbstract
& ioBom) {
86
// Fill Bom object with input stream
87
ioBom.
fromStream
(ioIn);
88
return
ioIn;
89
}
90
91
#endif
// __TVLSIM_BOM_BOMABSTRACT_HPP
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, TVLSIM::BomAbstract &ioBom)
Definition
BomAbstract.hpp:84
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const TVLSIM::BomAbstract &iBom)
Definition
BomAbstract.hpp:56
TVLSIM::BomAbstract
Definition
BomAbstract.hpp:14
TVLSIM::BomAbstract::describeKey
virtual std::string describeKey() const =0
TVLSIM::BomAbstract::describeShortKey
virtual std::string describeShortKey() const =0
TVLSIM::BomAbstract::toString
virtual std::string toString() const =0
TVLSIM::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:40
TVLSIM::BomAbstract::BomAbstract
BomAbstract(const BomAbstract &)
Definition
BomAbstract.hpp:41
TVLSIM::BomAbstract::toStream
virtual void toStream(std::ostream &ioOut) const =0
TVLSIM::BomAbstract::fromStream
virtual void fromStream(std::istream &ioIn)=0
TVLSIM::BomAbstract::~BomAbstract
virtual ~BomAbstract()
Definition
BomAbstract.hpp:44
TVLSIM::BomAbstract::FacBomAbstract
friend class FacBomAbstract
Definition
BomAbstract.hpp:15
TVLSIM
Definition
BasConst.cpp:7
Generated on
for TvlSim by
1.17.0