Represents a container that offers up two kinds of iterators for the hardcoded contents, ItemPair and std::string. More...
#include <Iterator_Class.h>
Public Member Functions | |
std::shared_ptr< IIterator< ItemPair > > | GetItems () |
Retrieve an iterator over the data that returns an ItemPair object containing both key and value for each entry. | |
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 string type. | |
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 a string type. | |
Represents a container that offers up two kinds of iterators for the hardcoded contents, ItemPair and std::string.
This container is not a dictionary despite the use of keys and values but it was the simplest form of data I could come up with that didn't use any of the C++ containers.
Definition at line 197 of file Iterator_Class.h.
Retrieve an iterator over the data that returns an ItemPair object containing both key and value for each entry.
Definition at line 23 of file Iterator_Class.cpp.
References _countof, _keys, and _values.
Referenced by DesignPatternExamples_cpp::Iterator_Exercise().
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 string type.
Definition at line 37 of file Iterator_Class.cpp.
References _countof, and _keys.
Referenced by DesignPatternExamples_cpp::Iterator_Exercise().
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 a string type.
Definition at line 43 of file Iterator_Class.cpp.
References _countof, and _values.
Referenced by DesignPatternExamples_cpp::Iterator_Exercise().