LibraryInfo.h
Go to the documentation of this file.
1 #ifndef art_Framework_Art_detail_LibraryInfo_h
2 #define art_Framework_Art_detail_LibraryInfo_h
3 
5 
6 #include <memory>
7 #include <string>
8 #include <utility>
9 
10 namespace art::detail {
11 
12  class LibraryInfo {
13  private:
14  using spec_pair_t = std::pair<std::string, std::string>;
15 
16  public:
18  spec_pair_t const& specs,
19  std::string const& path,
20  std::unique_ptr<fhicl::ConfigurationTable>&& config,
21  std::string const& prov,
22  std::string const& pt)
23  : soName_{so}
24  , specs_{specs}
25  , path_{path}
27  , provider_{prov}
28  , pluginType_{pt}
29  {}
30 
31  bool
32  operator<(LibraryInfo const& li) const
33  {
34  return this->short_spec() < li.short_spec();
35  }
36 
37  std::string const&
38  so_name() const
39  {
40  return soName_;
41  }
42  std::string const&
43  short_spec() const
44  {
45  return specs_.first;
46  }
47  std::string const&
48  long_spec() const
49  {
50  return specs_.second;
51  }
52  std::string const&
53  path() const
54  {
55  return path_;
56  }
59  {
60  return allowedConfig_.get();
61  }
62  std::string const&
63  provider() const
64  {
65  return provider_;
66  }
67  std::string const&
68  plugin_type() const
69  {
70  return pluginType_;
71  }
72 
73  private:
77  std::unique_ptr<fhicl::ConfigurationTable> allowedConfig_;
80  };
81 
84 
85  public:
86  LibraryInfoMatch(std::string const& name) : val_{name} {}
87 
88  bool
89  operator()(LibraryInfo const& li) const
90  {
91  return val_ == li.short_spec();
92  }
93  };
94 
95 } // namespace art::detail
96 
97 #endif /* art_Framework_Art_detail_LibraryInfo_h */
98 
99 // Local variables:
100 // mode: c++
101 // End:
static QCString name
Definition: declinfo.cpp:673
std::string const & so_name() const
Definition: LibraryInfo.h:38
std::string string
Definition: nybbler.cc:12
LibraryInfo(std::string const &so, spec_pair_t const &specs, std::string const &path, std::unique_ptr< fhicl::ConfigurationTable > &&config, std::string const &prov, std::string const &pt)
Definition: LibraryInfo.h:17
bool operator<(LibraryInfo const &li) const
Definition: LibraryInfo.h:32
std::pair< std::string, std::string > spec_pair_t
Definition: LibraryInfo.h:14
cet::exempt_ptr< fhicl::ConfigurationTable const > allowed_config() const
Definition: LibraryInfo.h:58
static Config * config
Definition: config.cpp:1054
def move(depos, offset)
Definition: depos.py:107
std::string const & short_spec() const
Definition: LibraryInfo.h:43
std::string const & provider() const
Definition: LibraryInfo.h:63
std::unique_ptr< fhicl::ConfigurationTable > allowedConfig_
Definition: LibraryInfo.h:77
std::string const & path() const
Definition: LibraryInfo.h:53
std::string const & plugin_type() const
Definition: LibraryInfo.h:68
LibraryInfoMatch(std::string const &name)
Definition: LibraryInfo.h:86
bool operator()(LibraryInfo const &li) const
Definition: LibraryInfo.h:89
std::string const & long_spec() const
Definition: LibraryInfo.h:48