CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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  {
34 
35  public:
36  ~RunIndex() = default;
37  RunIndex(const RunIndex&) = default;
38  RunIndex& operator=(const RunIndex&) = default;
39 
40  // ---------- const member functions ---------------------
41  bool operator==(const RunIndex& iIndex) const {
42  return value() == iIndex.value();
43  }
44  operator unsigned int() const {
45  return value_;
46  }
47 
50  unsigned int value() const { return value_;}
51 
52  static RunIndex invalidRunIndex();
53 
54  private:
56  friend class RunPrincipal;
57  explicit RunIndex(unsigned int iIndex) : value_(iIndex) {}
58 
59  RunIndex() = delete;
60 
61  // ---------- member data --------------------------------
62  unsigned int value_;
63 
64  static const unsigned int invalidValue_;
65  };
66 }
67 
68 
69 #endif
unsigned int value() const
Definition: RunIndex.h:50
~RunIndex()=default
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
RunIndex()=delete
RunIndex(unsigned int iIndex)
Definition: RunIndex.h:57
bool operator==(const RunIndex &iIndex) const
Definition: RunIndex.h:41
static const unsigned int invalidValue_
Definition: RunIndex.h:64
unsigned int value_
Definition: RunIndex.h:62
RunIndex & operator=(const RunIndex &)=default