23#ifndef DD__PROPERTIES_IMPL_INCLUDED
24#define DD__PROPERTIES_IMPL_INCLUDED
117 if (it ==
m_map.end())
return true;
185#ifdef EXTRA_CODE_FOR_UNIT_TESTING
198 void add_valid_keys(
const std::set<String_type> &
keys) {
207 void clear_valid_keys() {
m_keys.clear(); }
225 const String_type valid_key_at(
size_t index)
const {
229 return ostream.str();
231 if (
m_keys.size() <= index) {
234 return *std::next(
m_keys.begin(), index);
The Properties_impl class implements the Properties interface.
Definition: properties_impl.h:76
bool empty() const override
Are there any key=value pairs?
Definition: properties_impl.h:102
virtual const Properties_impl * impl() const
Definition: properties_impl.h:90
const_iterator begin() const override
Definition: properties_impl.h:94
std::set< String_type > m_keys
Definition: properties_impl.h:82
bool insert_values(const Properties &properties) override
Insert key/value pairs from a different property object.
Definition: properties_impl.cc:103
iterator end() override
Definition: properties_impl.h:96
bool remove(const String_type &key) override
Remove the key=value pair for the given key if it exists.
Definition: properties_impl.h:114
void clear() override
Remove all key=value pairs.
Definition: properties_impl.h:104
const String_type raw_string() const override
Iterate over all entries in the private hash table.
Definition: properties_impl.cc:59
bool set(const String_type &key, const String_type &value) override
Set the key/value.
Definition: properties_impl.cc:93
const_iterator end() const override
Definition: properties_impl.h:98
Properties::Map m_map
Definition: properties_impl.h:79
bool exists(const String_type &key) const override
Check for the existence of a key=value pair given the key.
Definition: properties_impl.h:110
bool valid_key(const String_type &key) const override
Check if the submitted key is valid.
Definition: properties_impl.h:106
iterator begin() override
Definition: properties_impl.h:92
size_type size() const override
Get the number of key=value pairs.
Definition: properties_impl.h:100
bool get(const String_type &key, String_type *value) const override
Get the string value for a given key.
Definition: properties_impl.cc:76
Properties_impl(const std::set< String_type > &keys)
Definition: properties_impl.h:88
Properties_impl()=default
The Properties class defines an interface for storing key=value pairs, where both key and value may b...
Definition: properties.h:73
std::map< String_type, String_type > Map
Definition: properties.h:127
Map::iterator iterator
Definition: properties.h:129
std::map< String_type, String_type >::size_type size_type
Definition: properties.h:128
Map::const_iterator const_iterator
Definition: properties.h:130
static uint keys
Definition: hp_test2.cc:45
Some integer typedefs for easier portability.
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
Char_stringstream_template< String_type_allocator > Stringstream_type
Instantiation of std::basic_stringstream with the same allocator as String_type.
Definition: string_type.h:71
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
required string key
Definition: replication_asynchronous_connection_failover.proto:59