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