Jpp  17.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
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::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. More...
 
 JObjectID (const int id)
 Constructor. More...
 
int getID () const
 Get identifier. More...
 
int & getID ()
 Get identifier. More...
 
void setID (const int id)
 Set identifier. More...
 
bool less (const JObjectID &object) const
 Less than method. More...
 
bool less (const int id) const
 Less than method. More...
 
bool more (const int id) const
 More than method. More...
 

Protected Attributes

int __id
 

Friends

std::istream & operator>> (std::istream &in, JObjectID &object)
 Read object identifier from input. More...
 
std::ostream & operator<< (std::ostream &out, const JObjectID &object)
 Write object identifier to output. More...
 

Detailed Description

Auxiliary class for object identification.

Definition at line 22 of file JObjectID.hh.

Constructor & Destructor Documentation

JLANG::JObjectID::JObjectID ( )
inline

Default constructor.

Definition at line 30 of file JObjectID.hh.

30  :
31  __id(-1)
32  {}
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

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

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51  {
52  return __id;
53  }
int& JLANG::JObjectID::getID ( )
inline

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62  {
63  return __id;
64  }
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  }
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
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  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50
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  }
int getID() const
Get identifier.
Definition: JObjectID.hh:50

Friends And Related Function Documentation

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  }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
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

int JLANG::JObjectID::__id
protected

Definition at line 140 of file JObjectID.hh.


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