# Map.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/data/mapping/type/Map.hpp"
# Map
Abstract Map.
Ex.: UnorderedMap, Fields.
namespace oatpp { namespace data { namespace mapping { namespace type { namespace __class {
class Map {}
}}}}}
# Map::Iterator
Iterator.
namespace oatpp { namespace data { namespace mapping { namespace type { namespace __class {
class Map {
struct Iterator {}
};
}}}}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ~Iterator | Default virtual destructor. |
type::Void | getKey | Get current item key. |
type::Void | getValue | Get current item value. |
void | next | Iterate to next item. |
bool | finished | Check if iterator finished. |
# Map::Iterator::~Iterator
Default virtual destructor.
virtual ~Iterator() = default
# Map::Iterator::getKey
Get current item key.
- @return
virtual type::Void getKey() = 0
# Map::Iterator::getValue
Get current item value.
- @return
virtual type::Void getValue() = 0
# Map::Iterator::next
Iterate to next item.
virtual void next() = 0
# Map::Iterator::finished
Check if iterator finished.
- @return
virtual bool finished() = 0
# Map::PolymorphicDispatcher
Polymorphic Dispatcher
namespace oatpp { namespace data { namespace mapping { namespace type { namespace __class {
class Map {
class PolymorphicDispatcher {}
};
}}}}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ~PolymorphicDispatcher | Virtual destructor. |
type::Void | createObject | Create Map. |
const type::Type* | getKeyType | Get type of map keys. |
const type::Type* | getValueType | Get type of map values. |
v_int64 | getMapSize | Get map size. |
void | addItem | Add item. |
std::unique_ptr<Iterator> | beginIteration | Begin map iteration. |
# Map::PolymorphicDispatcher::~PolymorphicDispatcher
Virtual destructor.
virtual ~PolymorphicDispatcher() = default
# Map::PolymorphicDispatcher::createObject
Create Map.
- @return
virtual type::Void createObject() const = 0
# Map::PolymorphicDispatcher::getKeyType
Get type of map keys.
- @return
virtual const type::Type* getKeyType() const = 0
# Map::PolymorphicDispatcher::getValueType
Get type of map values.
- @return
virtual const type::Type* getValueType() const = 0
# Map::PolymorphicDispatcher::getMapSize
Get map size.
- @param object - map object.
- @return - size of the map.
virtual v_int64 getMapSize(const type::Void& object) const = 0
# Map::PolymorphicDispatcher::addItem
Add item.
- @param object - Map.
- @param key
- @param value
virtual void addItem(const type::Void& object, const type::Void& key, const type::Void& value) const = 0
# Map::PolymorphicDispatcher::beginIteration
Begin map iteration.
- @param object - Map.
- @return
virtual std::unique_ptr<Iterator> beginIteration(const type::Void& object) const = 0