38 static std::atomic<int> i = 0;
88 metadata_map::const_iterator it =
m_metadata.find(name);
89 static const std::string
empty;
90 if (it !=
m_metadata.end())
return(it->second);
96 if (!
m_metadata.insert(metadata_map::value_type(name, value)).second) {
97 std::cout <<
"IdDictMgr::add_metadata> unable to add name/value " << name <<
"/" << value << std::endl;
108 std::vector<const IdDictDictionary*> out;
111 out.push_back (p.second.get());
119 return it->second.get();
125 return it->second.get();
129 if (dictionary == 0)
return;
131 const std::string& name = dictionary->name();
136 dictionary_map::iterator it;
139 std::cout <<
"IdDictMgr::add_dictionary> d[" << p.first <<
"]=" << p.second.get() << std::endl;
153 dictionary.resolve_references(*
this);
159 std::cout <<
"IdDictMgr::generate_implementation>" << std::endl;
172 dictionary.generate_implementation(*
this,
tag);
179 std::cout <<
"IdDictMgr::reset_implementation" << std::endl;
187 dictionary.reset_implementation();
195 if (!p.second->verify())
return(
false);
static const Attributes_t empty
void add_dictionary(std::unique_ptr< IdDictDictionary > dictionary)
Fillers:
const std::string & tag() const
Version tag.
void resolve_references()
Construct dictionary after parsing.
void set_DTD_version(const std::string &DTD_version)
void add_metadata(const std::string &name, const std::string &value)
void set_do_neighbours(bool do_neighbours)
bool do_checks() const
Check whether or not to do checks for ids.
bool do_neighbours() const
Check whether or not to init neighbours.
void set_do_checks(bool do_checks)
dictionary_vec get_dictionaries() const
Access to all dictionaries.
void generate_implementation(const std::string &tag="")
void add_subdictionary_name(const std::string &name)
std::set< std::string > m_subdictionary_names
dictionary_map m_dictionaries
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.
void reset_implementation()
Reset of implementation.
const std::string & DTD_version() const
DTD version.
bool m_generated_implementation
bool m_resolved_references
std::string m_DTD_version