nlohmann::ordered_map< Key, T, IgnoredLess, Allocator > Struct Template Reference

ordered_map: a minimal map-like container that preserves insertion order for use within nlohmann::basic_json<ordered_map> More...

#include <json.hpp>

Public Types

using Container = std::vector< std::pair< const Key, T >, Allocator >
 
using key_type = Key
 
using mapped_type = T
 

Public Member Functions

T & at (const Key &key)
 
const T & at (const Key &key) const
 
size_type count (const Key &key) const
 
std::pair< iterator, boolemplace (const key_type &key, T &&t)
 
size_type erase (const Key &key)
 
iterator erase (iterator pos)
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
std::pair< iterator, boolinsert (const value_type &value)
 
std::pair< iterator, boolinsert (value_type &&value)
 
T & operator[] (const Key &key)
 
const T & operator[] (const Key &key) const
 
 ordered_map (const Allocator &alloc=Allocator())
 
template<class It >
 ordered_map (It first, It last, const Allocator &alloc=Allocator())
 
 ordered_map (std::initializer_list< T > init, const Allocator &alloc=Allocator())
 

Detailed Description

template<class Key, class T, class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
struct nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >

ordered_map: a minimal map-like container that preserves insertion order for use within nlohmann::basic_json<ordered_map>

Member Typedef Documentation

◆ Container

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
using nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::Container = std::vector<std::pair<const Key, T>, Allocator>

◆ key_type

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
using nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::key_type = Key

◆ mapped_type

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
using nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::mapped_type = T

Constructor & Destructor Documentation

◆ ordered_map() [1/3]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::ordered_map ( const Allocator &  alloc = Allocator())

◆ ordered_map() [2/3]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class It >
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::ordered_map ( It  first,
It  last,
const Allocator &  alloc = Allocator() 
)

◆ ordered_map() [3/3]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::ordered_map ( std::initializer_list< T >  init,
const Allocator &  alloc = Allocator() 
)

Member Function Documentation

◆ at() [1/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
T & nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at ( const Key &  key)

◆ at() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const T & nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at ( const Key &  key) const

◆ count()

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
size_type nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::count ( const Key &  key) const

◆ emplace()

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::pair< iterator, bool > nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::emplace ( const key_type key,
T &&  t 
)

◆ erase() [1/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
size_type nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::erase ( const Key &  key)

◆ erase() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
iterator nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::erase ( iterator  pos)

◆ find() [1/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
iterator nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::find ( const Key &  key)

◆ find() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const_iterator nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::find ( const Key &  key) const

◆ insert() [1/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::pair< iterator, bool > nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert ( const value_type &  value)

◆ insert() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
std::pair< iterator, bool > nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert ( value_type &&  value)

◆ operator[]() [1/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
T & nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[] ( const Key &  key)

◆ operator[]() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
const T & nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[] ( const Key &  key) const

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