Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JObjectID Class Reference

Auxiliary class for object identification. More...

#include <JObjectID.hh>

Inheritance diagram for JLANG::JObjectID:
JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int > JACOUSTICS::JEKey JACOUSTICS::JEmitter JACOUSTICS::JReceiver JCOMPASS::JHit JDETECTOR::JAnchor JDETECTOR::JCompassRotation_t JDETECTOR::JDetector JDETECTOR::JModule JDETECTOR::JModuleCalibration_t JDETECTOR::JModuleGeometry JDETECTOR::JModuleMap_t JDETECTOR::JModulePosition_t JDETECTOR::JModuleRotation_t JDETECTOR::JModuleStatus_t JDETECTOR::JMonteCarloDetector::LCM_logic JDETECTOR::JMonteCarloDetector::LCM_reverse_logic JDETECTOR::JMonteCarloDetector::OM JDETECTOR::JMonteCarloDetector::OM_cluster JDETECTOR::JMonteCarloDetector::OM_cluster_data JDETECTOR::JMonteCarloDetector::OM_position JDETECTOR::JMonteCarloDetector::String JDETECTOR::JPMT JDETECTOR::JPMTCalibration_t JDETECTOR::JPMTIdentifier JDETECTOR::JPMTStatus_t JDETECTOR::JTransmitter JDETECTOR::JTripod JSIRENE::JPulse

Public Member Functions

 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.
 

Protected Attributes

int __id
 

Friends

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.
 

Detailed Description

Auxiliary class for object identification.

Definition at line 22 of file JObjectID.hh.

Constructor & Destructor Documentation

◆ JObjectID() [1/2]

JLANG::JObjectID::JObjectID ( )
inline

Default constructor.

Definition at line 30 of file JObjectID.hh.

30 :
31 __id(-1)
32 {}

◆ JObjectID() [2/2]

JLANG::JObjectID::JObjectID ( const int id)
inline

Constructor.

Parameters
ididentifier

Definition at line 40 of file JObjectID.hh.

40 :
41 __id(id)
42 {}

Member Function Documentation

◆ getID() [1/2]

int JLANG::JObjectID::getID ( ) const
inline

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51 {
52 return __id;
53 }

◆ getID() [2/2]

int & JLANG::JObjectID::getID ( )
inline

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62 {
63 return __id;
64 }

◆ setID()

void JLANG::JObjectID::setID ( const int id)
inline

Set identifier.

Parameters
ididentifier

Definition at line 72 of file JObjectID.hh.

73 {
74 this->__id = id;
75 }

◆ less() [1/2]

bool JLANG::JObjectID::less ( const JObjectID & object) const
inline

Less than method.

Parameters
objectobject identifier
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.
Definition JObjectID.hh:50

◆ less() [2/2]

bool JLANG::JObjectID::less ( const int id) const
inline

Less than method.

Parameters
ididentifier
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
ididentifier
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 }

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JObjectID & object )
friend

Read object identifier from input.

Parameters
ininput stream
objectobject 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
outoutput stream
objectobject identifier
Returns
output stream

Definition at line 134 of file JObjectID.hh.

135 {
136 return out << object.__id;
137 }

Member Data Documentation

◆ __id

int JLANG::JObjectID::__id
protected

Definition at line 140 of file JObjectID.hh.


The documentation for this class was generated from the following file: