24#ifndef DD__PROPERTIES_IMPL_INCLUDED
25#define DD__PROPERTIES_IMPL_INCLUDED
118 if (it ==
m_map.end())
return true;
186#ifdef EXTRA_CODE_FOR_UNIT_TESTING
199 void add_valid_keys(
const std::set<String_type> &
keys) {
208 void clear_valid_keys() {
m_keys.clear(); }
226 const String_type valid_key_at(
size_t index)
const {
230 return ostream.str();
232 if (
m_keys.size() <= index) {
235 return *std::next(
m_keys.begin(), index);
The Properties_impl class implements the Properties interface.
Definition: properties_impl.h:77
bool empty() const override
Are there any key=value pairs?
Definition: properties_impl.h:103
virtual const Properties_impl * impl() const
Definition: properties_impl.h:91
const_iterator begin() const override
Definition: properties_impl.h:95
std::set< String_type > m_keys
Definition: properties_impl.h:83
bool insert_values(const Properties &properties) override
Insert key/value pairs from a different property object.
Definition: properties_impl.cc:104
iterator end() override
Definition: properties_impl.h:97
bool remove(const String_type &key) override
Remove the key=value pair for the given key if it exists.
Definition: properties_impl.h:115
void clear() override
Remove all key=value pairs.
Definition: properties_impl.h:105
const String_type raw_string() const override
Iterate over all entries in the private hash table.
Definition: properties_impl.cc:60
bool set(const String_type &key, const String_type &value) override
Set the key/value.
Definition: properties_impl.cc:94
const_iterator end() const override
Definition: properties_impl.h:99
Properties::Map m_map
Definition: properties_impl.h:80
bool exists(const String_type &key) const override
Check for the existence of a key=value pair given the key.
Definition: properties_impl.h:111
bool valid_key(const String_type &key) const override
Check if the submitted key is valid.
Definition: properties_impl.h:107
iterator begin() override
Definition: properties_impl.h:93
size_type size() const override
Get the number of key=value pairs.
Definition: properties_impl.h:101
bool get(const String_type &key, String_type *value) const override
Get the string value for a given key.
Definition: properties_impl.cc:77
Properties_impl(const std::set< String_type > &keys)
Definition: properties_impl.h:89
Properties_impl()=default
The Properties class defines an interface for storing key=value pairs, where both key and value may b...
Definition: properties.h:74
std::map< String_type, String_type > Map
Definition: properties.h:128
Map::iterator iterator
Definition: properties.h:130
std::map< String_type, String_type >::size_type size_type
Definition: properties.h:129
Map::const_iterator const_iterator
Definition: properties.h:131
static uint keys
Definition: hp_test2.cc:49
Some integer typedefs for easier portability.
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_stringstream_template< String_type_allocator > Stringstream_type
Instantiation of std::basic_stringstream with the same allocator as String_type.
Definition: string_type.h:72
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
required string key
Definition: replication_asynchronous_connection_failover.proto:60