Auxiliary class to handle multiple boolean-like I/O.
More...
#include <JParser.hh>
|
| std::istream & | operator>> (std::istream &in, JCounter &object) |
| | Read option from input.
|
| |
| std::ostream & | operator<< (std::ostream &out, const JCounter &object) |
| | Write options to output.
|
| |
Auxiliary class to handle multiple boolean-like I/O.
Definition at line 417 of file JParser.hh.
◆ JCounter()
| JPARSER::JCounter::JCounter |
( |
| ) |
|
|
inline |
◆ getCounter()
| int JPARSER::JCounter::getCounter |
( |
| ) |
const |
|
inline |
Get counter.
- Returns
- counter
Definition at line 431 of file JParser.hh.
◆ operator int()
| JPARSER::JCounter::operator int |
( |
| ) |
const |
|
inline |
Type conversion operator.
- Returns
- counter
Definition at line 442 of file JParser.hh.
◆ operator=()
| const JCounter & JPARSER::JCounter::operator= |
( |
const bool | value | ) |
|
|
inline |
Set value.
- Parameters
-
- Returns
- this object
Definition at line 454 of file JParser.hh.
455 {
457
458 return *this;
459 }
◆ operator>>
| std::istream & operator>> |
( |
std::istream & | in, |
|
|
JCounter & | object ) |
|
friend |
Read option from input.
Note that no value actually is read, only the internal counter is incremented.
- Parameters
-
| in | input stream |
| object | option |
- Returns
- input stream
Definition at line 471 of file JParser.hh.
472 {
473 ++object.counter;
474
475 return in;
476 }
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JCounter & | object ) |
|
friend |
Write options to output.
- Parameters
-
| out | output stream |
| object | option |
- Returns
- output stream
Definition at line 486 of file JParser.hh.
487 {
488 out << object.counter;
489
490 return out;
491 }
◆ counter
| int JPARSER::JCounter::counter |
|
protected |
The documentation for this struct was generated from the following file: