CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RunIndex.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_RunIndex_h
2 #define FWCore_Utilities_RunIndex_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Utilities
6 // Class : edm::RunIndex
7 //
19 //
20 // Original Author: Chris Jones
21 // Created: Fri, 26 Apr 2013 19:38:56 GMT
22 //
23 
24 // system include files
25 
26 // user include files
27 
28 // forward declarations
29 namespace edm {
30  class RunPrincipal;
31 
32  class RunIndex {
33  public:
34  ~RunIndex() = default;
35  RunIndex() = delete;
36  RunIndex(const RunIndex&) = default;
37  RunIndex& operator=(const RunIndex&) = default;
38 
39  // ---------- const member functions ---------------------
40  bool operator==(const RunIndex& iIndex) const { return value() == iIndex.value(); }
41  operator unsigned int() const { return value_; }
42 
45  unsigned int value() const { return value_; }
46 
47  static RunIndex invalidRunIndex();
48 
49  private:
51  friend class RunPrincipal;
52  explicit RunIndex(unsigned int iIndex) : value_(iIndex) {}
53 
54  // ---------- member data --------------------------------
55  unsigned int value_;
56 
57  static const unsigned int invalidValue_;
58  };
59 } // namespace edm
60 
61 #endif
unsigned int value() const
Definition: RunIndex.h:45
~RunIndex()=default
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
RunIndex()=delete
RunIndex(unsigned int iIndex)
Definition: RunIndex.h:52
bool operator==(const RunIndex &iIndex) const
Definition: RunIndex.h:40
static const unsigned int invalidValue_
Definition: RunIndex.h:57
unsigned int value_
Definition: RunIndex.h:55
RunIndex & operator=(const RunIndex &)=default