BranchType.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_BranchType_h
2 #define canvas_Persistency_Provenance_BranchType_h
3 
4 // ======================================================================
5 //
6 // BranchType: enumerate/encode/label the three Branch types
7 //
8 // ======================================================================
9 
10 #include <iosfwd>
11 #include <string>
12 #include <type_traits>
13 
14 // ----------------------------------------------------------------------
15 
16 namespace art {
17 
18  // Note: These enum values are used as subscripts for a fixed size
19  // array, so they must not change.
21 
29 
30  inline std::ostream&
31  operator<<(std::ostream& os, BranchType const branchType)
32  {
33  return os << BranchTypeToString(branchType);
34  }
35 
36  template <typename F>
37  void
39  {
41  ++i) {
42  auto const bt = static_cast<BranchType>(i);
43  f(bt);
44  }
45  }
46 
47 } // art
48 
49 // ======================================================================
50 
51 #endif /* canvas_Persistency_Provenance_BranchType_h */
52 
53 // Local Variables:
54 // mode: c++
55 // End:
std::string const & BranchTypeToProductTreeName(BranchType const bt)
Definition: BranchType.cc:71
std::string const & productProvenanceBranchName(BranchType const bt)
Definition: BranchType.cc:91
std::string const & BranchTypeToMajorIndexName(BranchType const bt)
Definition: BranchType.cc:101
std::string string
Definition: nybbler.cc:12
std::string const & BranchTypeToMinorIndexName(BranchType const bt)
Definition: BranchType.cc:107
std::string const & BranchTypeToMetaDataTreeName(BranchType const bt)
Definition: BranchType.cc:77
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const bt)
Definition: BranchType.cc:83
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
bt
Definition: tracks.py:83
std::string const & BranchTypeToString(BranchType const bt)
Definition: BranchType.cc:65
static QCString type
Definition: declinfo.cpp:672
BranchType
Definition: BranchType.h:20
void for_each_branch_type(F f)
Definition: BranchType.h:38