32 Dictionary::iterator i = dictionary_.find(ident);
33 bool not_found = (i == dictionary_.end());
37 dictionary_[ident] = text;
47 Dictionary::iterator i = dictionary_.find(ident);
48 bool found = (i != dictionary_.end());
52 dictionary_[ident] = text;
60 Dictionary::iterator mes = dictionary_.find(ident);
62 bool found = (mes != dictionary_.end() && (mes->second == text));
64 dictionary_.erase(mes);
73 vector<std::string> duplicates;
81 const std::string text(messages[i]);
86 bool added =
add(ident, text);
88 duplicates.push_back(boost::lexical_cast<string>(ident));
101 Dictionary::const_iterator i = dictionary_.find(ident);
102 if (i == dictionary_.end()) {
MessageDictionary()
Constructor.
virtual bool replace(const MessageID &ident, const std::string &text)
Replace Message.
static const MessageDictionaryPtr & globalDictionary()
Return Global Dictionary.
virtual const std::string & getText(const MessageID &ident) const
Get Message Text.
virtual std::vector< std::string > load(const char *elements[])
Load Dictionary.
virtual bool erase(const std::string &ident, const std::string &text)
Removes the specified message from the dictionary.
virtual ~MessageDictionary()
Virtual Destructor.
virtual bool add(const MessageID &ident, const std::string &text)
Add Message.
boost::shared_ptr< MessageDictionary > MessageDictionaryPtr
Shared pointer to the MessageDictionary.
Defines the logger used by the top-level component of kea-lfc.