Auxiliary class to handle multiple boolean-like I/O.
More...
#include <JParser.hh>
|
| JCounter () |
| Default constructor.
|
|
virtual bool | getStatus () const override |
| Get status of this counter.
|
|
bool | less (const JCounter &value) const |
| Compare value.
|
|
bool | less (const int value) const |
| Compare value.
|
|
bool | more (const int value) const |
| Compare value.
|
|
int | getCounter () const |
| Get counter.
|
|
const JCounter & | operator= (const bool value) |
| Set value.
|
|
| operator bool () const |
| Type conversion operator.
|
|
bool | operator! () const |
| Negated status of this object.
|
|
|
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 419 of file JParser.hh.
◆ JCounter()
JPARSER::JCounter::JCounter |
( |
| ) |
|
|
inline |
◆ getStatus()
virtual bool JPARSER::JCounter::getStatus |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ less() [1/2]
bool JPARSER::JCounter::less |
( |
const JCounter & | value | ) |
const |
|
inline |
Compare value.
- Parameters
-
- Returns
- true if this counter is less than given value; else false
Definition at line 450 of file JParser.hh.
◆ less() [2/2]
bool JPARSER::JCounter::less |
( |
const int | value | ) |
const |
|
inline |
Compare value.
- Parameters
-
- Returns
- true if this counter is less than given value; else false
Definition at line 462 of file JParser.hh.
◆ more()
bool JPARSER::JCounter::more |
( |
const int | value | ) |
const |
|
inline |
Compare value.
- Parameters
-
- Returns
- true if this counter is more than given value; else false
Definition at line 474 of file JParser.hh.
◆ getCounter()
int JPARSER::JCounter::getCounter |
( |
| ) |
const |
|
inline |
Get counter.
- Returns
- counter
Definition at line 485 of file JParser.hh.
◆ operator=()
const JCounter & JPARSER::JCounter::operator= |
( |
const bool | value | ) |
|
|
inline |
Set value.
Note that no assignment actually takes place but the internal counter is set to one.
- Parameters
-
- Returns
- this object
Definition at line 499 of file JParser.hh.
500 {
502
503 return *this;
504 }
◆ operator bool()
JLANG::JAbstractObjectStatus::operator bool |
( |
| ) |
const |
|
inlineinherited |
Type conversion operator.
- Returns
- status of this object
Definition at line 33 of file JAbstractObjectStatus.hh.
34 {
36 }
virtual bool getStatus() const =0
Get status of object.
◆ operator!()
bool JLANG::JAbstractObjectStatus::operator! |
( |
| ) |
const |
|
inlineinherited |
◆ 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 516 of file JParser.hh.
517 {
518 ++object.counter;
519
520 return in;
521 }
◆ 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 531 of file JParser.hh.
532 {
533 out << object.counter;
534
535 return out;
536 }
◆ counter
int JPARSER::JCounter::counter |
|
protected |
The documentation for this class was generated from the following file: