ATLAS Offline Software
Loading...
Searching...
No Matches
IdDictMgr.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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 <string_view>
12#include <vector>
13#include <memory>
14
16
17class IdDictMgr {
18public:
19 using dictionary_vec = std::vector<const IdDictDictionary*>;
20 using metadata_map = std::map<std::string, std::string>;
21
22 IdDictMgr();
24
26 const std::string& tag () const;
27
29 const IdDictDictionary* find_dictionary (const std::string& name) const;
30 IdDictDictionary* find_dictionary (const std::string& name);
31
34
36 const std::string& DTD_version () const;
37
39 bool do_checks () const;
40
42 bool do_neighbours () const;
43
45 const std::string& find_metadata (const std::string& name) const;
46
48 void add_dictionary (std::unique_ptr<IdDictDictionary> dictionary);
49 void add_subdictionary_name (const std::string& name);
50 void add_metadata (const std::string& name, const std::string& value);
51 void set_DTD_version (const std::string& DTD_version);
52 void set_do_checks (bool do_checks);
54
55
57 void resolve_references ();
58 void generate_implementation (std::string_view tag = "");
59
61 void reset_implementation ();
62 void clear ();
63
64 bool verify () const;
65
66
67private:
68
69 using dictionary_map = std::map<std::string, std::unique_ptr<IdDictDictionary> >;
70
72
73 std::string m_DTD_version;
74 std::string m_tag;
77 std::set<std::string> m_subdictionary_names;
82};
83
84#endif
void add_dictionary(std::unique_ptr< IdDictDictionary > dictionary)
Fillers:
const std::string & tag() const
Version tag.
Definition IdDictMgr.cxx:54
void resolve_references()
Construct dictionary after parsing.
void set_DTD_version(const std::string &DTD_version)
void generate_implementation(std::string_view tag="")
void add_metadata(const std::string &name, const std::string &value)
Definition IdDictMgr.cxx:95
std::map< std::string, std::unique_ptr< IdDictDictionary > > dictionary_map
Definition IdDictMgr.h:69
void set_do_neighbours(bool do_neighbours)
Definition IdDictMgr.cxx:79
bool verify() const
metadata_map m_metadata
Definition IdDictMgr.h:76
bool do_checks() const
Check whether or not to do checks for ids.
Definition IdDictMgr.cxx:62
bool do_neighbours() const
Check whether or not to init neighbours.
Definition IdDictMgr.cxx:74
void set_do_checks(bool do_checks)
Definition IdDictMgr.cxx:67
dictionary_vec get_dictionaries() const
Access to all dictionaries.
void add_subdictionary_name(const std::string &name)
std::set< std::string > m_subdictionary_names
Definition IdDictMgr.h:77
dictionary_map m_dictionaries
Definition IdDictMgr.h:75
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
const std::string & find_metadata(const std::string &name) const
Access to meta data, name/value pairs.
Definition IdDictMgr.cxx:87
void reset_implementation()
Reset of implementation.
void clear()
bool m_do_neighbours
Definition IdDictMgr.h:81
std::map< std::string, std::string > metadata_map
Definition IdDictMgr.h:20
std::vector< const IdDictDictionary * > dictionary_vec
Definition IdDictMgr.h:19
std::string m_tag
Definition IdDictMgr.h:74
const std::string & DTD_version() const
DTD version.
Definition IdDictMgr.cxx:58
bool m_generated_implementation
Definition IdDictMgr.h:79
bool m_do_checks
Definition IdDictMgr.h:80
void find_subdicts(IdDictDictionary *dict)
bool m_resolved_references
Definition IdDictMgr.h:78
std::string m_DTD_version
Definition IdDictMgr.h:73