Public Types | Public Member Functions | List of all members
ustl::map< K, V, Comp > Class Template Reference

A sorted associative container of pair<K,V> More...

#include <ustl.h>

Inheritance diagram for ustl::map< K, V, Comp >:
ustl::vector< pair< K, V > >

Public Types

typedef K key_type
 
typedef V data_type
 
typedef const K & const_key_ref
 
typedef const V & const_data_ref
 
typedef const map< K, V, Comp > & rcself_t
 
typedef vector< pair< K, V > > base_class
 
typedef base_class::value_type value_type
 
typedef base_class::size_type size_type
 
typedef base_class::pointer pointer
 
typedef base_class::const_pointer const_pointer
 
typedef base_class::reference reference
 
typedef base_class::const_reference const_reference
 
typedef base_class::const_iterator const_iterator
 
typedef base_class::iterator iterator
 
typedef base_class::reverse_iterator reverse_iterator
 
typedef base_class::const_reverse_iterator const_reverse_iterator
 
typedef pair< const_iterator, const_iteratorconst_range_t
 
typedef pair< iterator, iteratorrange_t
 
typedef pair< iterator, bool > insertrv_t
 
typedef Comp key_compare
 
typedef pair_compare_first< value_type, Comp > value_compare
 
typedef pair_compare_first_key< K, V, Comp > value_key_compare
 
using initlist_t = std::initializer_list< value_type >
 
- Public Types inherited from ustl::vector< pair< K, V > >
typedef pair< K, V > value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 
typedef memblock::size_type size_type
 
typedef memblock::written_size_type written_size_type
 
typedef memblock::difference_type difference_type
 
typedef ::ustl::reverse_iterator< iteratorreverse_iterator
 
typedef ::ustl::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 map (size_type n)
 
 map (rcself_t v)
 
 map (const_iterator i1, const_iterator i2)
 
rcself_t operator= (rcself_t v)
 
const_data_ref at (const_key_ref k) const
 
data_type & at (const_key_ref k)
 
const_data_ref operator[] (const_key_ref i) const
 
data_type & operator[] (const_key_ref i)
 Returns data associated with key k.
 
key_compare key_comp (void) const
 
value_compare value_comp (void) const
 
size_type size (void) const
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
void assign (const_iterator i1, const_iterator i2)
 
void push_back (const_reference v)
 
const_iterator find (const_key_ref k) const
 Returns the pair<K,V> where K = k.
 
iterator find (const_key_ref k)
 
const_iterator find_data (const_data_ref v, const_iterator first=nullptr, const_iterator last=nullptr) const
 Returns the pair<K,V> where V = v, occuring in range [first,last).
 
iterator find_data (const_data_ref v, iterator first=nullptr, iterator last=nullptr)
 
const_iterator lower_bound (const_key_ref k) const
 
iterator lower_bound (const_key_ref k)
 
const_iterator upper_bound (const_key_ref k) const
 
iterator upper_bound (const_key_ref k)
 
const_range_t equal_range (const_key_ref k) const
 
range_t equal_range (const_key_ref k)
 
size_type count (const_key_ref v) const
 
insertrv_t insert (const_reference v)
 Inserts the pair into the container.
 
iterator insert (const_iterator, const_reference v)
 
void insert (const_iterator i1, const_iterator i2)
 
void erase (const_key_ref k)
 Erases the element with key value k.
 
iterator erase (iterator ep)
 
iterator erase (iterator ep1, iterator ep2)
 
void clear (void)
 
void swap (map &v)
 
 map (map &&v)
 
 map (initlist_t v)
 
mapoperator= (map &&v)
 
insertrv_t insert (value_type &&v)
 Inserts the pair into the container.
 
iterator insert (const_iterator, value_type &&v)
 
void insert (initlist_t v)
 
template<typename... Args>
insertrv_t emplace (Args &&...args)
 
template<typename... Args>
iterator emplace_hint (const_iterator h, Args &&...args)
 
template<typename... Args>
insertrv_t emplace_back (Args &&...args)
 
- Public Member Functions inherited from ustl::vector< pair< K, V > >
 vector (size_type n)
 Initializes a vector of size n.
 
 vector (size_type n, const pair< K, V > &v)
 Copies n elements from v.
 
 vector (const vector &v)
 Copies v.
 
 vector (const_iterator i1, const_iterator i2)
 Copies range [i1, i2].
 
 vector (vector &&v)
 
 vector (std::initializer_list< pair< K, V > > v)
 
const vectoroperator= (const vector &v)
 Copies contents of v.
 
vectoroperator= (vector &&v)
 
bool operator== (const vector &v) const
 
 operator cmemlink (void) const
 
 operator cmemlink (void)
 
 operator memlink (void)
 
void reserve (size_type n, bool bExact=false)
 Allocates space for at least n elements.
 
void resize (size_type n, bool bExact=true)
 Resizes the vector to contain n elements.
 
size_type capacity (void) const
 
size_type size (void) const
 
size_type max_size (void) const
 
bool empty (void) const
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
const_iterator cbegin (void) const
 
const_iterator cend (void) const
 
reverse_iterator rbegin (void)
 
const_reverse_iterator rbegin (void) const
 
reverse_iterator rend (void)
 
const_reverse_iterator rend (void) const
 
const_reverse_iterator crbegin (void) const
 
const_reverse_iterator crend (void) const
 
iterator data (void)
 
const_iterator data (void) const
 
const_iterator cdata (void) const
 
iterator iat (size_type i)
 
const_iterator iat (size_type i) const
 
reference at (size_type i)
 
const_reference at (size_type i) const
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference front (void)
 
const_reference front (void) const
 
reference back (void)
 
const_reference back (void) const
 
void push_back (const pair< K, V > &v=pair< K, V >())
 Inserts value v at the end of the vector.
 
void push_back (pair< K, V > &&v)
 
void pop_back (void)
 
void clear (void)
 
void shrink_to_fit (void)
 
void deallocate (void) noexcept
 Calls element destructors and frees storage.
 
void assign (const_iterator i1, const_iterator i2)
 Copies the range [i1, i2].
 
void assign (size_type n, const pair< K, V > &v)
 Copies n elements with value v.
 
void swap (vector &v)
 
iterator insert (const_iterator ip, const pair< K, V > &v)
 Inserts value v at offset ip.
 
iterator insert (const_iterator ip, size_type n, const pair< K, V > &v)
 Inserts n elements with value v at offsets ip.
 
iterator insert (const_iterator ip, const_iterator i1, const_iterator i2)
 Inserts range [i1, i2] at offset ip.
 
iterator insert (const_iterator ip, pair< K, V > &&v)
 
iterator insert (const_iterator ip, std::initializer_list< pair< K, V > > v)
 
iterator erase (const_iterator ep, size_type n=1)
 Removes count elements at offset ep.
 
iterator erase (const_iterator ep1, const_iterator ep2)
 Removes elements from ep1 to ep2.
 
void manage (pointer p, size_type n)
 
bool is_linked (void) const
 
void unlink (void)
 
void copy_link (void)
 
void link (const_pointer p, size_type n)
 
void link (pointer p, size_type n)
 
void link (const vector &v)
 
void link (vector &v)
 
void link (const_pointer first, const_pointer last)
 
void link (pointer first, pointer last)
 
void read (istream &is)
 
void write (ostream &os) const
 
void text_write (ostringstream &os) const
 
size_t stream_size (void) const
 
iterator emplace (const_iterator ip, Args &&...args)
 Constructs value at ip.
 
void emplace_back (Args &&...args)
 Constructs value at the end of the vector.
 

Additional Inherited Members

- Protected Member Functions inherited from ustl::vector< pair< K, V > >
iterator insert_space (const_iterator ip, size_type n)
 Inserts n uninitialized elements at ip.
 

Detailed Description

template<typename K, typename V, typename Comp = less<K>>
class ustl::map< K, V, Comp >

A sorted associative container of pair<K,V>


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

Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10