|
PSCF v1.3.3
|
Wrapper for a long int, for formatted ostream output. More...
#include <Lng.h>
Public Member Functions | |
Constructors | |
| Lng () | |
| Default constructor. | |
| Lng (long int value) | |
| Constructor, value only. | |
| Lng (long int value, int width) | |
| Constructor, value and width. | |
Setters | |
| void | setValue (long int value) |
| Set value of long int. | |
| void | setWidth (int width) |
| Set field width. | |
Accessors | |
| long int | value () |
| Get value of long int. | |
| int | width () |
| Get field width. | |
| std::istream & | operator>> (std::istream &in, Lng &object) |
| Input stream extractor for an Lng object. | |
| std::ostream & | operator<< (std::ostream &out, const Lng &object) |
| Output stream inserter for an Lng object. | |
Wrapper for a long int, for formatted ostream output.
An Lng object has a long int numerical value, and a minimum output field width. The << operator for an Lng uses the specified width. The numerical value and width may both be optionally specified as parameters to a constructor. If the width is not specified, it is is is set to a default value equal to Format::defaultWidth().
An Lng object may be passed to an ostream as a temporary object. For example, the expression:
outputs the number 13 using the default width, followed by the number 25 in a field of minimum width 10.
| Util::Lng::Lng | ( | ) |
Default constructor.
Definition at line 15 of file Lng.cpp.
Referenced by operator<<, and operator>>.
|
explicit |
| Util::Lng::Lng | ( | long int | value, |
| int | width ) |
| void Util::Lng::setValue | ( | long int | value | ) |
| void Util::Lng::setWidth | ( | int | width | ) |
| long int Util::Lng::value | ( | ) |
Get value of long int.
Definition at line 40 of file Lng.cpp.
Referenced by Lng(), Lng(), and setValue().
| int Util::Lng::width | ( | ) |
|
friend |
|
friend |