Auxiliary class for object identification.
More...
#include <JObjectID.hh>
|
| JObjectID () |
| Default constructor.
|
|
| JObjectID (const int id) |
| Constructor.
|
|
int | getID () const |
| Get identifier.
|
|
int & | getID () |
| Get identifier.
|
|
void | setID (const int id) |
| Set identifier.
|
|
bool | less (const JObjectID &object) const |
| Less than method.
|
|
bool | less (const int id) const |
| Less than method.
|
|
bool | more (const int id) const |
| More than method.
|
|
|
std::istream & | operator>> (std::istream &in, JObjectID &object) |
| Read object identifier from input.
|
|
std::ostream & | operator<< (std::ostream &out, const JObjectID &object) |
| Write object identifier to output.
|
|
Auxiliary class for object identification.
Definition at line 22 of file JObjectID.hh.
◆ JObjectID() [1/2]
JLANG::JObjectID::JObjectID |
( |
| ) |
|
|
inline |
◆ JObjectID() [2/2]
JLANG::JObjectID::JObjectID |
( |
const int | id | ) |
|
|
inline |
◆ getID() [1/2]
int JLANG::JObjectID::getID |
( |
| ) |
const |
|
inline |
Get identifier.
- Returns
- identifier
Definition at line 50 of file JObjectID.hh.
◆ getID() [2/2]
int & JLANG::JObjectID::getID |
( |
| ) |
|
|
inline |
Get identifier.
- Returns
- identifier
Definition at line 61 of file JObjectID.hh.
◆ setID()
void JLANG::JObjectID::setID |
( |
const int | id | ) |
|
|
inline |
Set identifier.
- Parameters
-
Definition at line 72 of file JObjectID.hh.
◆ less() [1/2]
bool JLANG::JObjectID::less |
( |
const JObjectID & | object | ) |
const |
|
inline |
Less than method.
- Parameters
-
- Returns
- true if this identifier less than given identifier; else false
Definition at line 84 of file JObjectID.hh.
85 {
86 return this->
getID() <
object.getID();
87 }
int getID() const
Get identifier.
◆ less() [2/2]
bool JLANG::JObjectID::less |
( |
const int | id | ) |
const |
|
inline |
Less than method.
- Parameters
-
- Returns
- true if this identifier less than given identifier; else false
Definition at line 96 of file JObjectID.hh.
97 {
98 return this->
getID() < id;
99 }
◆ more()
bool JLANG::JObjectID::more |
( |
const int | id | ) |
const |
|
inline |
More than method.
- Parameters
-
- Returns
- true if this identifier greater than given identifier; else false
Definition at line 108 of file JObjectID.hh.
109 {
110 return this->
getID() > id;
111 }
◆ operator>>
std::istream & operator>> |
( |
std::istream & | in, |
|
|
JObjectID & | object ) |
|
friend |
Read object identifier from input.
- Parameters
-
in | input stream |
object | object identifier |
- Returns
- input stream
Definition at line 121 of file JObjectID.hh.
122 {
123 return in >> object.__id;
124 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JObjectID & | object ) |
|
friend |
Write object identifier to output.
- Parameters
-
out | output stream |
object | object identifier |
- Returns
- output stream
Definition at line 134 of file JObjectID.hh.
135 {
136 return out << object.__id;
137 }
◆ __id
int JLANG::JObjectID::__id |
|
protected |
The documentation for this class was generated from the following file: