Scippy

SoPlex

Sequential object-oriented simPlex

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
24  : m_verbosity( ERROR )
25  , m_streams(0)
26  {
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
38  {
40  }
41 
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  {
55  m_streams = 0;
57  m_streams = new (m_streams) std::ostream*[INFO3+1];
59  for ( int i = DEBUG; i <= INFO3; ++i )
60  m_streams[ i ] = rhs.m_streams[ i ];
61  }
62 
63 } // namespace soplex