Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::ListMap< Key, Mapped, Container, CaseSensitive > Class Template Reference

#include <ListMap.h>

Public Types

using KeyType = Key
 
using MappedType = Mapped
 
using Reference = Mapped&
 
using ConstReference = const Mapped&
 
using Pointer = Mapped*
 
using ConstPointer = const Mapped*
 
using ValueType = typename Container::value_type
 
using SizeType = typename Container::size_type
 
using Iterator = typename Container::iterator
 
using ConstIterator = typename Container::const_iterator
 

Public Member Functions

 ListMap ()
 Creates an empty ListMap.
 
 ListMap (std::size_t initialReserve)
 
 ListMap (const ListMap &other)
 
 ListMap (ListMap &&other) noexcept
 
ListMapoperator= (const ListMap &map)
 Assigns another ListMap.
 
ListMapoperator= (ListMap &&map) noexcept
 Assigns another ListMap.
 
void swap (ListMap &map)
 Swaps the ListMap with another one.
 
ConstIterator begin () const
 Returns the beginning of the map.
 
ConstIterator end () const
 Returns the end of the map.
 
Iterator begin ()
 Returns the beginning of the map.
 
Iterator end ()
 Returns the end of the map.
 
ConstIterator find (const KeyType &key) const
 
Iterator find (const KeyType &key)
 
Iterator insert (const ValueType &val)
 
void erase (Iterator it)
 
SizeType erase (const KeyType &key)
 
void clear ()
 
std::size_t size () const
 
bool empty () const
 
ConstReference operator[] (const KeyType &key) const
 
Reference operator[] (const KeyType &key)
 

Private Member Functions

template<typename T1 , typename T2 >
bool isEqual (T1 val1, T2 val2) const
 
bool isEqual (const std::string &s1, const std::string &s2) const
 
bool isEqual (const std::string &s1, const char *s2) const
 
bool isEqual (const char *s1, const std::string &s2) const
 
bool isEqual (const char *s1, const char *s2) const
 

Private Attributes

Container _container
 

Detailed Description

template<class Key, class Mapped, class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
class Poco::ListMap< Key, Mapped, Container, CaseSensitive >

This class implements a multimap in terms of a sequential container. The use for this type of associative container is wherever automatic ordering of elements is not desirable. Naturally, this container will have inferior data retrieval performance and it is not recommended for use with large datasets. The main purpose within POCO is for Internet messages (email message, http headers etc), to prevent automatic header entry reordering.

Definition at line 32 of file ListMap.h.

Member Typedef Documentation

◆ ConstIterator

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ConstIterator = typename Container::const_iterator

Definition at line 52 of file ListMap.h.

◆ ConstPointer

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ConstPointer = const Mapped*

Definition at line 47 of file ListMap.h.

◆ ConstReference

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ConstReference = const Mapped&

Definition at line 45 of file ListMap.h.

◆ Iterator

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::Iterator = typename Container::iterator

Definition at line 51 of file ListMap.h.

◆ KeyType

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::KeyType = Key

Definition at line 42 of file ListMap.h.

◆ MappedType

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::MappedType = Mapped

Definition at line 43 of file ListMap.h.

◆ Pointer

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::Pointer = Mapped*

Definition at line 46 of file ListMap.h.

◆ Reference

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::Reference = Mapped&

Definition at line 44 of file ListMap.h.

◆ SizeType

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::SizeType = typename Container::size_type

Definition at line 50 of file ListMap.h.

◆ ValueType

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
using Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ValueType = typename Container::value_type

Definition at line 49 of file ListMap.h.

Constructor & Destructor Documentation

◆ ListMap() [1/4]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ListMap ( )
inline

Creates an empty ListMap.

Definition at line 54 of file ListMap.h.

◆ ListMap() [2/4]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ListMap ( std::size_t initialReserve)
inlineexplicit

Definition at line 59 of file ListMap.h.

◆ ListMap() [3/4]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ListMap ( const ListMap< Key, Mapped, Container, CaseSensitive > & other)
inline

Definition at line 65 of file ListMap.h.

◆ ListMap() [4/4]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Poco::ListMap< Key, Mapped, Container, CaseSensitive >::ListMap ( ListMap< Key, Mapped, Container, CaseSensitive > && other)
inlinenoexcept

Definition at line 70 of file ListMap.h.

Member Function Documentation

◆ begin() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Iterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::begin ( )
inline

Returns the beginning of the map.

Definition at line 108 of file ListMap.h.

◆ begin() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ConstIterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::begin ( ) const
inline

Returns the beginning of the map.

Definition at line 96 of file ListMap.h.

◆ clear()

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
void Poco::ListMap< Key, Mapped, Container, CaseSensitive >::clear ( )
inline

Definition at line 189 of file ListMap.h.

◆ empty()

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::empty ( ) const
inline

Definition at line 199 of file ListMap.h.

◆ end() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Iterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::end ( )
inline

Returns the end of the map.

Definition at line 114 of file ListMap.h.

◆ end() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ConstIterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::end ( ) const
inline

Returns the end of the map.

Definition at line 102 of file ListMap.h.

◆ erase() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
SizeType Poco::ListMap< Key, Mapped, Container, CaseSensitive >::erase ( const KeyType & key)
inline

Definition at line 167 of file ListMap.h.

◆ erase() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
void Poco::ListMap< Key, Mapped, Container, CaseSensitive >::erase ( Iterator it)
inline

Definition at line 162 of file ListMap.h.

◆ find() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Iterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::find ( const KeyType & key)
inline

Finds the first occurrence of the key and returns iterator pointing to the found entry or iterator pointing to the end if entry is not found.

Definition at line 135 of file ListMap.h.

◆ find() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ConstIterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::find ( const KeyType & key) const
inline

Finds the first occurrence of the key and returns iterator pointing to the found entry or iterator pointing to the end if entry is not found.

Definition at line 120 of file ListMap.h.

◆ insert()

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Iterator Poco::ListMap< Key, Mapped, Container, CaseSensitive >::insert ( const ValueType & val)
inline

Inserts the value into the map. If one or more values already exist, new value is inserted at the end of the block. Thus, all the equal value entries are located sequentially at all times. Returns iterator pointing to the newly inserted value

Definition at line 150 of file ListMap.h.

◆ isEqual() [1/5]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::isEqual ( const char * s1,
const char * s2 ) const
inlineprivate

Definition at line 253 of file ListMap.h.

◆ isEqual() [2/5]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::isEqual ( const char * s1,
const std::string & s2 ) const
inlineprivate

Definition at line 248 of file ListMap.h.

◆ isEqual() [3/5]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::isEqual ( const std::string & s1,
const char * s2 ) const
inlineprivate

Definition at line 243 of file ListMap.h.

◆ isEqual() [4/5]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::isEqual ( const std::string & s1,
const std::string & s2 ) const
inlineprivate

Definition at line 235 of file ListMap.h.

◆ isEqual() [5/5]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
template<typename T1 , typename T2 >
bool Poco::ListMap< Key, Mapped, Container, CaseSensitive >::isEqual ( T1 val1,
T2 val2 ) const
inlineprivate

Definition at line 230 of file ListMap.h.

◆ operator=() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ListMap & Poco::ListMap< Key, Mapped, Container, CaseSensitive >::operator= ( const ListMap< Key, Mapped, Container, CaseSensitive > & map)
inline

Assigns another ListMap.

Definition at line 75 of file ListMap.h.

◆ operator=() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ListMap & Poco::ListMap< Key, Mapped, Container, CaseSensitive >::operator= ( ListMap< Key, Mapped, Container, CaseSensitive > && map)
inlinenoexcept

Assigns another ListMap.

Definition at line 83 of file ListMap.h.

◆ operator[]() [1/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Reference Poco::ListMap< Key, Mapped, Container, CaseSensitive >::operator[] ( const KeyType & key)
inline

Definition at line 213 of file ListMap.h.

◆ operator[]() [2/2]

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
ConstReference Poco::ListMap< Key, Mapped, Container, CaseSensitive >::operator[] ( const KeyType & key) const
inline

Definition at line 204 of file ListMap.h.

◆ size()

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
std::size_t Poco::ListMap< Key, Mapped, Container, CaseSensitive >::size ( ) const
inline

Definition at line 194 of file ListMap.h.

◆ swap()

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
void Poco::ListMap< Key, Mapped, Container, CaseSensitive >::swap ( ListMap< Key, Mapped, Container, CaseSensitive > & map)
inline

Swaps the ListMap with another one.

Definition at line 90 of file ListMap.h.

Member Data Documentation

◆ _container

template<class Key , class Mapped , class Container = std::vector<std::pair<Key, Mapped>>, bool CaseSensitive = false>
Container Poco::ListMap< Key, Mapped, Container, CaseSensitive >::_container
private

Definition at line 258 of file ListMap.h.


The documentation for this class was generated from the following file: