Processing math: 25%
Reference documentation for deal.II version 9.2.0
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}
\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}
\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}
\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
Main Page
Tutorial
Code gallery
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
u
v
w
z
Typedefs
a
b
c
g
i
l
m
o
p
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
v
w
Enumerations
a
b
c
d
e
f
g
i
m
o
p
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Related Functions
:
a
b
c
d
f
g
h
i
l
m
o
p
r
s
t
u
v
Related Pages
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
v
z
Variables
a
c
d
f
g
i
l
m
p
q
s
t
u
v
Typedefs
Enumerations
Enumerator
m
u
Macros
a
b
d
e
h
i
m
s
t
dealii.org
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
include
deal.II
base
conditional_ostream.h
Go to the documentation of this file.
1
// ---------------------------------------------------------------------
2
//
3
// Copyright (C) 2004 - 2018 by the deal.II authors
4
//
5
// This file is part of the deal.II library.
6
//
7
// The deal.II library is free software; you can use it, redistribute
8
// it, and/or modify it under the terms of the GNU Lesser General
9
// Public License as published by the Free Software Foundation; either
10
// version 2.1 of the License, or (at your option) any later version.
11
// The full text of the license can be found in the file LICENSE.md at
12
// the top level directory of deal.II.
13
//
14
// ---------------------------------------------------------------------
15
16
#ifndef dealii_conditional_ostream_h
17
#define dealii_conditional_ostream_h
18
19
#include <
deal.II/base/config.h
>
20
21
#include <ostream>
22
23
DEAL_II_NAMESPACE_OPEN
24
25
81
class
ConditionalOStream
82
{
83
public
:
89
ConditionalOStream
(std::ostream &stream,
const
bool
active =
true
);
90
96
void
97
set_condition
(
const
bool
active);
98
102
bool
103
is_active
()
const
;
104
108
std::ostream &
109
get_stream
()
const
;
110
116
template
<
typename
T>
117
const
ConditionalOStream
&
118
operator<<
(
const
T
&t)
const
;
119
129
const
ConditionalOStream
&
130
operator<<
(std::ostream &(*p)(std::ostream &))
const
;
131
132
private
:
136
std::ostream &
output_stream
;
137
141
bool
active_flag
;
142
};
143
144
145
// --------------------------- inline and template functions -----------
146
147
template
<
class
T>
148
inline
const
ConditionalOStream
&
149
ConditionalOStream::operator<<
(
const
T
&t)
const
150
{
151
if
(
active_flag
==
true
)
152
output_stream
<< t;
153
154
return
*
this
;
155
}
156
157
158
inline
const
ConditionalOStream
&
159
ConditionalOStream::operator<<
(std::ostream &(*p)(std::ostream &))
const
160
{
161
if
(
active_flag
==
true
)
162
output_stream
<< p;
163
164
return
*
this
;
165
}
166
167
168
inline
std::ostream &
169
ConditionalOStream::get_stream
()
const
170
{
171
return
output_stream
;
172
}
173
174
175
DEAL_II_NAMESPACE_CLOSE
176
177
#endif
ConditionalOStream::operator<<
const ConditionalOStream & operator<<(const T &t) const
Definition:
conditional_ostream.h:149
ConditionalOStream::get_stream
std::ostream & get_stream() const
Definition:
conditional_ostream.h:169
ConditionalOStream::active_flag
bool active_flag
Definition:
conditional_ostream.h:141
LAPACKSupport::T
static const char T
Definition:
lapack_support.h:163
ConditionalOStream::set_condition
void set_condition(const bool active)
Definition:
conditional_ostream.cc:28
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition:
config.h:358
ConditionalOStream
Definition:
conditional_ostream.h:81
config.h
ConditionalOStream::output_stream
std::ostream & output_stream
Definition:
conditional_ostream.h:136
ConditionalOStream::ConditionalOStream
ConditionalOStream(std::ostream &stream, const bool active=true)
Definition:
conditional_ostream.cc:21
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition:
config.h:359
ConditionalOStream::is_active
bool is_active() const
Definition:
conditional_ostream.cc:35
Generated by
1.8.17