PSCF v1.1
End.cpp
1/*
2* Util Package - C++ Utilities for Scientific Computation
3*
4* Copyright 2010 - 2017, The Regents of the University of Minnesota
5* Distributed under the terms of the GNU General Public License.
6*/
7
8#include "End.h"
9#include <util/global.h>
10
11namespace Util
12{
13
14 /*
15 * Constructor.
16 */
18 : label_("}")
19 {}
20
21 /*
22 * Destructor.
23 */
25 {}
26
27 /*
28 * Read and check end bracket.
29 */
30 void End::readParam(std::istream &in)
31 {
32 if (isIoProcessor()) {
33 in >> label_;
36 }
37 }
38 }
39
40 /*
41 * Write end bracket.
42 */
43 void End::writeParam(std::ostream &out) const
44 { out << indent() << "}" << std::endl; }
45
46 /*
47 * Empty implementation of virtual resetParam() method.
48 */
50 {}
51
52}
void resetParam()
Do-nothing implementation of virtual resetParam function.
Definition: End.cpp:49
End()
Constructor.
Definition: End.cpp:17
virtual void writeParam(std::ostream &out) const
Write the closing bracket.
Definition: End.cpp:43
virtual ~End()
Destructor.
Definition: End.cpp:24
virtual void readParam(std::istream &in)
Read the closing bracket.
Definition: End.cpp:30
static std::ostream & file()
Get log ostream by reference.
Definition: Log.cpp:57
bool isIoProcessor() const
Can this processor do file I/O ?
Definition: MpiFileIo.h:92
std::string indent() const
Return indent string for this object (string of spaces).
static bool echo()
Get echo parameter.
File containing preprocessor macros for error handling.
Utility classes for scientific computation.
Definition: accumulators.mod:1