00001 #include "MdcRecoUtil/HepHistID.h"
00002 using std::string;
00003
00004 HepHistID::HepHistID(int theNumber) :
00005 _numSet(true),
00006 _stringSet(false),
00007 _idNumber(theNumber),
00008 _idString() {}
00009
00010 HepHistID::HepHistID(const char * theString) :
00011 _numSet(false),
00012 _stringSet(true),
00013 _idNumber(0),
00014 _idString(theString) {}
00015
00016 HepHistID::HepHistID(int theNumber, string theString) :
00017 _numSet(true),
00018 _stringSet(true),
00019 _idNumber(theNumber),
00020 _idString(theString) {}
00021
00022 HepHistID::HepHistID(const HepHistID & other) :
00023 _numSet(other._numSet),
00024 _stringSet(other._stringSet),
00025 _idNumber(other._idNumber),
00026 _idString(other._idString) {}
00027
00028
00029 HepHistID & HepHistID::operator++() {
00030 if ( _numSet ) {
00031 ++_idNumber;
00032 };
00033
00034 return *this;
00035 }
00036
00037
00038 const HepHistID HepHistID::operator++(int) {
00039
00040 HepHistID result(*this);
00041
00042 ++(*this);
00043
00044 return result;
00045 }
00046
00047
00048 HepHistID & HepHistID::operator--() {
00049 if ( _numSet ) {
00050 --_idNumber;
00051 };
00052
00053 return *this;
00054 }
00055
00056
00057 const HepHistID HepHistID::operator--(int) {
00058
00059 HepHistID result(*this);
00060
00061 --(*this);
00062
00063 return result;
00064 }