DOLFIN
DOLFIN C++ interface
Toggle main menu visibility
Loading...
Searching...
No Matches
dolfin
log
LogStream.h
1
// Copyright (C) 2003-2009 Anders Logg
2
//
3
// This file is part of DOLFIN.
4
//
5
// DOLFIN is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
9
//
10
// DOLFIN is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
17
//
18
// Modified by Garth N. Wells 2005.
19
20
#ifndef __LOG_STREAM_H
21
#define __LOG_STREAM_H
22
23
#include <complex>
24
#include <string>
25
#include <sstream>
26
27
namespace
dolfin
28
{
29
30
class
Variable
;
31
class
MeshEntity
;
32
class
MeshEntityIterator
;
33
class
Point
;
34
38
39
class
LogStream
40
{
41
public
:
42
44
enum class
Type
{COUT, ENDL};
45
47
LogStream
(
Type
type);
48
50
~LogStream
();
51
53
LogStream
&
operator<<
(
const
LogStream
& stream);
54
56
LogStream
&
operator<<
(
const
std::string& s);
57
59
LogStream
&
operator<<
(
int
a);
60
62
LogStream
&
operator<<
(
unsigned
int
a);
63
65
LogStream
&
operator<<
(
long
int
a);
66
68
LogStream
&
operator<<
(
long
unsigned
int
a);
69
71
LogStream
&
operator<<
(
double
a);
72
74
LogStream
&
operator<<
(std::complex<double> z);
75
77
LogStream
&
operator<<
(
const
Variable
& variable);
78
81
LogStream
&
operator<<
(
const
MeshEntity
& entity);
82
84
LogStream
&
operator<<
(
const
Point
& point);
85
87
void
setprecision
(std::streamsize n);
88
89
private
:
90
91
// Type of stream
92
Type
_type;
93
94
// Buffer
95
std::stringstream buffer;
96
97
};
98
100
extern
LogStream
cout
;
101
103
extern
LogStream
endl
;
104
105
}
106
107
#endif
dolfin::LogStream
Definition
LogStream.h:40
dolfin::LogStream::~LogStream
~LogStream()
Destructor.
Definition
LogStream.cpp:41
dolfin::LogStream::Type
Type
Stream types.
Definition
LogStream.h:44
dolfin::LogStream::operator<<
LogStream & operator<<(const LogStream &stream)
Output for log stream.
Definition
LogStream.cpp:46
dolfin::LogStream::setprecision
void setprecision(std::streamsize n)
Set precision.
Definition
LogStream.cpp:122
dolfin::LogStream::LogStream
LogStream(Type type)
Create log stream of given type.
Definition
LogStream.cpp:36
dolfin::MeshEntityIterator
Definition
MeshEntityIterator.h:65
dolfin::MeshEntity
Definition
MeshEntity.h:43
dolfin::Point
Definition
Point.h:41
dolfin::Variable
Common base class for DOLFIN variables.
Definition
Variable.h:36
dolfin
Definition
adapt.h:30
dolfin::cout
LogStream cout
dolfin::cout
dolfin::endl
LogStream endl
dolfin::endl;
Generated by
1.17.0