PSCF v1.1
Format.h
1#ifndef UTIL_FORMAT_H
2#define UTIL_FORMAT_H
3
4/*
5* Util Package - C++ Utilities for Scientific Computation
6*
7* Copyright 2010 - 2017, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11//#include <iostream>
12
13namespace Util
14{
15
24 class Format
25 {
26
27 public:
28
30 static void initStatic();
31
33 static void setDefaultWidth(int width);
34
36 static void setDefaultPrecision(int precision);
37
39 static int defaultWidth();
40
42 static int defaultPrecision();
43
44 private:
45
47 static int defaultWidth_;
48
50 static int defaultPrecision_;
51
52 };
53
54}
55#endif
Base class for output wrappers for formatted C++ ostream output.
Definition: Format.h:25
static void initStatic()
Initialize or reset default width and precision values.
Definition: Format.cpp:47
static void setDefaultPrecision(int precision)
Set the default output precision.
Definition: Format.cpp:26
static int defaultWidth()
Return the default output field width.
Definition: Format.cpp:32
static void setDefaultWidth(int width)
Set the default output field width.
Definition: Format.cpp:20
static int defaultPrecision()
Return the default output precision.
Definition: Format.cpp:38
Utility classes for scientific computation.
Definition: accumulators.mod:1