5#include "helpers/_countof.h"
14 std::string
_keys[] = { std::string(
"One"), std::string(
"Two"), std::string(
"Three") };
15 std::string
_values[] = { std::string(
"Value 1"), std::string(
"Value 2"), std::string(
"Value 3") };
25 std::vector<ItemPair> items;
28 for (
size_t index = 0; index < numItems; ++index)
33 return std::make_shared<Iterator<ItemPair>>(&items[0], items.size());
Declaration of the IteratorContainer_Class class, the IIterator interface, along with the implementat...
static const char * _values[]
A list of values as example data. The number of values must match the number of keys in the _keys lis...
static const char * _keys[]
A list of keys as example data. The number of keys must match the number of values in the _values lis...
Represents a key/value pair where the key and value are strings.
std::shared_ptr< IIterator< std::string > > GetKeys()
Retrieve an iterator over the "key" part of the data, where the data returned from the iterator is a ...
std::shared_ptr< IIterator< ItemPair > > GetItems()
Retrieve an iterator over the data that returns an ItemPair object containing both key and value for ...
std::shared_ptr< IIterator< std::string > > GetValues()
Retrieve an iterator over the "value" part of the data, where the data returned from the iterator is ...
The namespace containing all Design Pattern Examples implemented in C++.