Anasazi  Version of the Day
AnasaziOutputManager.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Anasazi: Block Eigensolvers Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
29 #ifndef ANASAZI_OUTPUT_MANAGER_HPP
30 #define ANASAZI_OUTPUT_MANAGER_HPP
31 
36 #include "AnasaziConfigDefs.hpp"
37 #include "AnasaziTypes.hpp"
38 
48 namespace Anasazi {
49 
50 template <class ScalarType>
52 
53  public:
54 
56 
57 
59  OutputManager( int vb = Anasazi::Errors ) : vb_(vb) {};
60 
62  virtual ~OutputManager() {};
64 
66 
67 
69  virtual void setVerbosity( int vb ) { vb_ = vb; }
70 
72  virtual int getVerbosity( ) const { return vb_; }
73 
75 
77 
78 
80 
83  virtual bool isVerbosity( MsgType type ) const = 0;
84 
86  virtual void print( MsgType type, const std::string output ) = 0;
87 
89  virtual std::ostream &stream( MsgType type ) = 0;
90 
92 
93  private:
94 
96 
97 
100 
103 
105 
106  protected:
107  int vb_;
108 };
109 
110 } // end Anasazi namespace
111 
112 #endif
113 
114 // end of file AnasaziOutputManager.hpp
virtual bool isVerbosity(MsgType type) const =0
Find out whether we need to print out information for this message type.
OutputManager(int vb=Anasazi::Errors)
Default constructor.
virtual void setVerbosity(int vb)
Set the message output types for this manager.
Namespace Anasazi contains the classes, structs, enums and utilities used by the Anasazi package...
Output managers remove the need for the eigensolver to know any information about the required output...
virtual void print(MsgType type, const std::string output)=0
Send output to the output manager.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
virtual ~OutputManager()
Destructor.
Types and exceptions used within Anasazi solvers and interfaces.
MsgType
Enumerated list of available message types recognized by the eigensolvers.
virtual std::ostream & stream(MsgType type)=0
Create a stream for outputting to.
virtual int getVerbosity() const
Get the message output types for this manager.