BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
HepHistID.cxx
Go to the documentation of this file.
2using std::string;
3
4HepHistID::HepHistID(int theNumber) :
5 _numSet(true),
6 _stringSet(false),
7 _idNumber(theNumber),
8 _idString() {}
9
10HepHistID::HepHistID(const char * theString) :
11 _numSet(false),
12 _stringSet(true),
13 _idNumber(0),
14 _idString(theString) {}
15
16HepHistID::HepHistID(int theNumber, string theString) :
17 _numSet(true),
18 _stringSet(true),
19 _idNumber(theNumber),
20 _idString(theString) {}
21
23 _numSet(other._numSet),
24 _stringSet(other._stringSet),
25 _idNumber(other._idNumber),
26 _idString(other._idString) {}
27
28// prefix increment number ID
30 if ( _numSet ) {
31 ++_idNumber;
32 };
33 // return this
34 return *this;
35}
36
37// postfix increment number ID
39 // initialize result
40 HepHistID result(*this);
41 // increment this
42 ++(*this);
43 // return result
44 return result;
45}
46
47// prefix decrement number ID
49 if ( _numSet ) {
50 --_idNumber;
51 };
52 // return this
53 return *this;
54}
55
56// postfix decrement number ID
58 // initialize result
59 HepHistID result(*this);
60 // increment this
61 --(*this);
62 // return result
63 return result;
64}
HepHistID & operator++()
Definition: HepHistID.cxx:29
HepHistID(int theNumber)
Definition: HepHistID.cxx:4
HepHistID & operator--()
Definition: HepHistID.cxx:48