ATLAS Offline Software
IdDictMgr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef IDDICT_IDDICTMGR_H
6 #define IDDICT_IDDICTMGR_H
7 
8 #include <map>
9 #include <set>
10 #include <string>
11 #include <vector>
12 #include <memory>
13 
14 class IdDictDictionary;
15 
16 class IdDictMgr {
17 public:
18  using dictionary_vec = std::vector<const IdDictDictionary*>;
19  using metadata_map = std::map<std::string, std::string>;
20 
21  IdDictMgr();
23 
25  const std::string& tag () const;
26 
28  const IdDictDictionary* find_dictionary (const std::string& name) const;
29  IdDictDictionary* find_dictionary (const std::string& name);
30 
33 
35  const std::string& DTD_version () const;
36 
38  bool do_checks () const;
39 
41  bool do_neighbours () const;
42 
44  const std::string& find_metadata (const std::string& name) const;
45 
47  void add_dictionary (std::unique_ptr<IdDictDictionary> dictionary);
48  void add_subdictionary_name (const std::string& name);
49  void add_metadata (const std::string& name, const std::string& value);
50  void set_DTD_version (const std::string& DTD_version);
51  void set_do_checks (bool do_checks);
52  void set_do_neighbours (bool do_neighbours);
53 
54 
56  void resolve_references ();
57  void generate_implementation (const std::string& tag = "");
58 
60  void reset_implementation ();
61  void clear ();
62 
63  bool verify () const;
64 
65 
66 private:
67 
68  using dictionary_map = std::map<std::string, std::unique_ptr<IdDictDictionary> >;
69 
71 
72  std::string m_DTD_version;
73  std::string m_tag;
76  std::set<std::string> m_subdictionary_names;
81 };
82 
83 #endif
IdDictMgr::resolve_references
void resolve_references()
Construct dictionary after parsing.
Definition: IdDictMgr.cxx:148
IdDictMgr::verify
bool verify() const
Definition: IdDictMgr.cxx:193
IdDictMgr::dictionary_map
std::map< std::string, std::unique_ptr< IdDictDictionary > > dictionary_map
Definition: IdDictMgr.h:68
IdDictMgr::m_metadata
metadata_map m_metadata
Definition: IdDictMgr.h:75
IdDictMgr::set_do_checks
void set_do_checks(bool do_checks)
Definition: IdDictMgr.cxx:67
athena.value
value
Definition: athena.py:124
IdDictMgr::find_metadata
const std::string & find_metadata(const std::string &name) const
Access to meta data, name/value pairs.
Definition: IdDictMgr.cxx:87
IdDictMgr::m_dictionaries
dictionary_map m_dictionaries
Definition: IdDictMgr.h:74
IdDictMgr::m_DTD_version
std::string m_DTD_version
Definition: IdDictMgr.h:72
IdDictMgr::IdDictMgr
IdDictMgr()
Definition: IdDictMgr.cxx:44
IdDictMgr::get_dictionaries
dictionary_vec get_dictionaries() const
Access to all dictionaries.
Definition: IdDictMgr.cxx:106
IdDictMgr::dictionary_vec
std::vector< const IdDictDictionary * > dictionary_vec
Definition: IdDictMgr.h:18
IdDictMgr
Definition: IdDictMgr.h:16
IdDictMgr::set_do_neighbours
void set_do_neighbours(bool do_neighbours)
Definition: IdDictMgr.cxx:79
IdDictMgr::add_subdictionary_name
void add_subdictionary_name(const std::string &name)
Definition: IdDictMgr.cxx:144
IdDictMgr::add_dictionary
void add_dictionary(std::unique_ptr< IdDictDictionary > dictionary)
Fillers:
Definition: IdDictMgr.cxx:128
IdDictMgr::metadata_map
std::map< std::string, std::string > metadata_map
Definition: IdDictMgr.h:19
IdDictMgr::m_resolved_references
bool m_resolved_references
Definition: IdDictMgr.h:77
IdDictMgr::do_neighbours
bool do_neighbours() const
Check whether or not to init neighbours.
Definition: IdDictMgr.cxx:74
IdDictMgr::m_do_checks
bool m_do_checks
Definition: IdDictMgr.h:79
IdDictMgr::reset_implementation
void reset_implementation()
Reset of implementation.
Definition: IdDictMgr.cxx:178
IdDictMgr::~IdDictMgr
~IdDictMgr()
master.dictionary
dictionary
Definition: master.py:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
IdDictDictionary
Definition: IdDictDictionary.h:31
IdDictMgr::find_dictionary
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:116
IdDictMgr::find_subdicts
void find_subdicts(IdDictDictionary *dict)
IdDictMgr::m_do_neighbours
bool m_do_neighbours
Definition: IdDictMgr.h:80
IdDictMgr::set_DTD_version
void set_DTD_version(const std::string &DTD_version)
Definition: IdDictMgr.cxx:102
IdDictMgr::clear
void clear()
Definition: IdDictMgr.cxx:201
IdDictMgr::do_checks
bool do_checks() const
Check whether or not to do checks for ids.
Definition: IdDictMgr.cxx:62
IdDictMgr::DTD_version
const std::string & DTD_version() const
DTD version.
Definition: IdDictMgr.cxx:58
IdDictMgr::tag
const std::string & tag() const
Version tag.
Definition: IdDictMgr.cxx:54
IdDictMgr::m_generated_implementation
bool m_generated_implementation
Definition: IdDictMgr.h:78
IdDictMgr::m_subdictionary_names
std::set< std::string > m_subdictionary_names
Definition: IdDictMgr.h:76
IdDictMgr::m_tag
std::string m_tag
Definition: IdDictMgr.h:73
IdDictMgr::add_metadata
void add_metadata(const std::string &name, const std::string &value)
Definition: IdDictMgr.cxx:95
IdDictMgr::generate_implementation
void generate_implementation(const std::string &tag="")
Definition: IdDictMgr.cxx:157