Simpatico  v1.10
Bool.h
1 #ifndef UTIL_BOOL_H
2 #define UTIL_BOOL_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 
13 namespace Util
14 {
15 
35  class Bool
36  {
37 
38  public:
39 
41 
42 
44  Bool();
45 
47  explicit Bool(bool value);
48 
50  Bool(bool value, int width);
51 
53 
55 
56  void setValue(bool value);
57 
58  void setWidth(int width);
59 
61 
63 
64  bool value();
65 
66  int width();
67 
69 
70  private:
71 
72  bool value_;
73  int width_;
74 
75  //friends:
76 
77  friend std::istream& operator>>(std::istream& in, Bool &object);
78  friend std::ostream& operator<<(std::ostream& out, const Bool &object);
79 
80  };
81 
89  std::istream& operator>>(std::istream& in, Bool &object);
90 
98  std::ostream& operator<<(std::ostream& out, const Bool &object);
99 
100 }
101 #endif
friend std::istream & operator>>(std::istream &in, Bool &object)
Input stream extractor for an Bool object.
Definition: Bool.cpp:47
Utility classes for scientific computation.
Definition: accumulators.mod:1
Wrapper for an bool value, for formatted ostream output.
Definition: Bool.h:35
Bool()
Default constructor.
Definition: Bool.cpp:15
friend std::ostream & operator<<(std::ostream &out, const Bool &object)
Output stream inserter for an Bool object.
Definition: Bool.cpp:56