Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SoPlex 6.0.3
SoPlex 5.0.2
SoPlex 4.0.2
SoPlex 3.1.0
SoPlex 3.0.1
SoPlex 2.2.1
SoPlex
Sequential object-oriented simPlex
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
soplex-repo
src
spxout.cpp
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (C) 1996-2015 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
#include "
spxout.h
"
17
#include "
exceptions.h
"
18
#include "
spxalloc.h
"
19
20
namespace
soplex
21
{
22
/// constructor
23
SPxOut::SPxOut
()
24
: m_verbosity( ERROR )
25
, m_streams(0)
26
{
27
spx_alloc
(
m_streams
,
INFO3
+1);
28
m_streams
=
new
(
m_streams
) std::ostream*[
INFO3
+1];
29
m_streams
[
ERROR
] =
m_streams
[
WARNING
] = &std::cerr;
30
for
(
int
i =
DEBUG
; i <=
INFO3
; ++i )
31
m_streams
[ i ] = &std::cout;
32
}
33
34
//---------------------------------------------------
35
36
// destructor
37
SPxOut::~SPxOut
()
38
{
39
spx_free
(
m_streams
);
40
}
41
42
SPxOut
&
SPxOut::operator=
(
const
SPxOut
& base)
43
{
44
m_verbosity
= base.
m_verbosity
;
45
46
for
(
int
i =
DEBUG
; i <=
INFO3
; ++i )
47
m_streams
[ i ] = base.
m_streams
[ i ];
48
49
return
*
this
;
50
}
51
52
SPxOut::SPxOut
(
const
SPxOut
& rhs)
53
{
54
m_verbosity
= rhs.
m_verbosity
;
55
m_streams
= 0;
56
spx_alloc
(
m_streams
,
INFO3
+1);
57
m_streams
=
new
(
m_streams
) std::ostream*[
INFO3
+1];
58
m_streams
[
ERROR
] =
m_streams
[
WARNING
] = rhs.
m_streams
[
ERROR
];
59
for
(
int
i =
DEBUG
; i <=
INFO3
; ++i )
60
m_streams
[ i ] = rhs.
m_streams
[ i ];
61
}
62
63
}
// namespace soplex