Data structure for format specifications.
More...
#include <JManip.hh>
|
typedef std::ios_base::fmtflags | fmtflags |
|
|
| JFormat_t () |
| Default constructor.
|
|
| JFormat_t (const int width, const int precision=0, const fmtflags flags=fmtflags(), const char fill=' ') |
| Constructor.
|
|
| JFormat_t (std::ostream &out) |
| Constructor.
|
|
bool | is_valid () const |
| Check validity of this manipulator.
|
|
void | get (std::ostream &out) |
| Get format specificaton from given output stream.
|
|
void | put (std::ostream &out) const |
| Put format specificaton to given output stream.
|
|
Data structure for format specifications.
Definition at line 524 of file JManip.hh.
◆ fmtflags
◆ JFormat_t() [1/3]
Default constructor.
Definition at line 531 of file JManip.hh.
◆ JFormat_t() [2/3]
JFormat_t::JFormat_t |
( |
const int | width, |
|
|
const int | precision = 0, |
|
|
const fmtflags | flags = fmtflags(), |
|
|
const char | fill = ' ' ) |
|
inline |
Constructor.
- Parameters
-
width | width |
precision | precision |
flags | flags |
fill | fill character |
Definition at line 547 of file JManip.hh.
◆ JFormat_t() [3/3]
JFormat_t::JFormat_t |
( |
std::ostream & | out | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 563 of file JManip.hh.
◆ is_valid()
bool JFormat_t::is_valid |
( |
| ) |
const |
|
inline |
Check validity of this manipulator.
- Returns
- true if valid; else false
Definition at line 574 of file JManip.hh.
◆ get()
void JFormat_t::get |
( |
std::ostream & | out | ) |
|
|
inline |
Get format specificaton from given output stream.
- Parameters
-
Definition at line 585 of file JManip.hh.
586 {
587 this->
width = out.width();
589 this->
flags = out.flags();
590 this->
fill = out.fill();
591 }
◆ put()
void JFormat_t::put |
( |
std::ostream & | out | ) |
const |
|
inline |
Put format specificaton to given output stream.
- Parameters
-
Definition at line 599 of file JManip.hh.
600 {
601 out.width (this->
width);
603 out.flags (this->
flags);
604 out.fill (this->
fill);
605 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JFormat_t & | format ) |
|
friend |
Format specifier.
- Parameters
-
out | output stream |
format | format |
- Returns
- output stream
Definition at line 615 of file JManip.hh.
616 {
618
619 return out;
620 }
◆ width
◆ precision
◆ flags
◆ fill
The documentation for this struct was generated from the following file: