1.01.14
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 __SIMCRS_BOM_BOMABSTRACT_HPP
2
#define __SIMCRS_BOM_BOMABSTRACT_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STL
8
#include <iosfwd>
9
#include <string>
10
11
namespace
SIMCRS
{
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
SIMCRS::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
SIMCRS::BomAbstract
& ioBom) {
86
// Fill Bom object with input stream
87
ioBom.
fromStream
(ioIn);
88
return
ioIn;
89
}
90
91
#endif
// __SIMCRS_BOM_BOMABSTRACT_HPP
operator<<
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &ioOut, const SIMCRS::BomAbstract &iBom)
Definition
BomAbstract.hpp:56
operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &ioIn, SIMCRS::BomAbstract &ioBom)
Definition
BomAbstract.hpp:84
SIMCRS::BomAbstract
Definition
BomAbstract.hpp:14
SIMCRS::BomAbstract::toString
virtual std::string toString() const =0
SIMCRS::BomAbstract::fromStream
virtual void fromStream(std::istream &ioIn)=0
SIMCRS::BomAbstract::toStream
virtual void toStream(std::ostream &ioOut) const =0
SIMCRS::BomAbstract::~BomAbstract
virtual ~BomAbstract()
Definition
BomAbstract.hpp:44
SIMCRS::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:40
SIMCRS::BomAbstract::BomAbstract
BomAbstract(const BomAbstract &)
Definition
BomAbstract.hpp:41
SIMCRS::BomAbstract::describeKey
virtual std::string describeKey() const =0
SIMCRS::BomAbstract::describeShortKey
virtual std::string describeShortKey() const =0
SIMCRS::BomAbstract::FacBomAbstract
friend class FacBomAbstract
Definition
BomAbstract.hpp:15
SIMCRS
Definition
BasConst.cpp:7
Generated on
for SimCRS by
1.17.0