Instrument Neutral Distributed Interface INDI  2.0.2
Public Types | Public Member Functions | List of all members
nlohmann::ordered_map< Key, T, IgnoredLess, Allocator > Struct Template Reference

a minimal map-like container that preserves insertion order More...

#include <json.h>

Inheritance diagram for nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >:

Public Types

using key_type = Key
 
using mapped_type = T
 
using Container = std::vector< std::pair< const Key, T >, Allocator >
 
using iterator = typename Container::iterator
 
using const_iterator = typename Container::const_iterator
 
using size_type = typename Container::size_type
 
using value_type = typename Container::value_type
 
using key_compare = std::equal_to< Key >
 
template<typename InputIt >
using require_input_iter = typename std::enable_if< std::is_convertible< typename std::iterator_traits< InputIt >::iterator_category, std::input_iterator_tag >::value >::type
 

Public Member Functions

 ordered_map () noexcept(noexcept(Container()))
 
 ordered_map (const Allocator &alloc) noexcept(noexcept(Container(alloc)))
 
template<class It >
 ordered_map (It first, It last, const Allocator &alloc=Allocator())
 
 ordered_map (std::initializer_list< value_type > init, const Allocator &alloc=Allocator())
 
std::pair< iterator, bool > emplace (const key_type &key, T &&t)
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
std::pair< iterator, bool > emplace (KeyType &&key, T &&t)
 
T & operator[] (const key_type &key)
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
T & operator[] (KeyType &&key)
 
const T & operator[] (const key_type &key) const
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
const T & operator[] (KeyType &&key) const
 
T & at (const key_type &key)
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
T & at (KeyType &&key)
 
const T & at (const key_type &key) const
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
const T & at (KeyType &&key) const
 
size_type erase (const key_type &key)
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
size_type erase (KeyType &&key)
 
iterator erase (iterator pos)
 
iterator erase (iterator first, iterator last)
 
size_type count (const key_type &key) const
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
size_type count (KeyType &&key) const
 
iterator find (const key_type &key)
 
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
iterator find (KeyType &&key)
 
const_iterator find (const key_type &key) const
 
std::pair< iterator, bool > insert (value_type &&value)
 
std::pair< iterator, bool > insert (const value_type &value)
 
template<typename InputIt , typename = require_input_iter<InputIt>>
void insert (InputIt first, InputIt last)
 

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 >

a minimal map-like container that preserves insertion order

See also
https://json.nlohmann.me/api/ordered_map/

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

Definition at line 18281 of file json.h.

Member Typedef Documentation

◆ const_iterator

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 >::const_iterator = typename Container::const_iterator

Definition at line 18287 of file json.h.

◆ 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>

Definition at line 18285 of file json.h.

◆ iterator

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 >::iterator = typename Container::iterator

Definition at line 18286 of file json.h.

◆ key_compare

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_compare = std::equal_to<Key>

Definition at line 18293 of file json.h.

◆ 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

Definition at line 18283 of file json.h.

◆ 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

Definition at line 18284 of file json.h.

◆ require_input_iter

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<typename InputIt >
using nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::require_input_iter = typename std::enable_if<std::is_convertible<typename std::iterator_traits<InputIt>::iterator_category, std::input_iterator_tag>::value>::type

Definition at line 18595 of file json.h.

◆ size_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 >::size_type = typename Container::size_type

Definition at line 18288 of file json.h.

◆ value_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 >::value_type = typename Container::value_type

Definition at line 18289 of file json.h.

Constructor & Destructor Documentation

◆ ordered_map() [1/4]

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 ( )
inlinenoexcept

Definition at line 18298 of file json.h.

◆ ordered_map() [2/4]

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)
inlineexplicitnoexcept

Definition at line 18299 of file json.h.

◆ ordered_map() [3/4]

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() 
)
inline

Definition at line 18301 of file json.h.

◆ ordered_map() [4/4]

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< value_type init,
const Allocator &  alloc = Allocator() 
)
inline

Definition at line 18303 of file json.h.

Member Function Documentation

◆ at() [1/4]

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_type key)
inline

Definition at line 18358 of file json.h.

◆ at() [2/4]

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_type key) const
inline

Definition at line 18386 of file json.h.

◆ at() [3/4]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
T& nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at ( KeyType &&  key)
inline

Definition at line 18373 of file json.h.

◆ at() [4/4]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
const T& nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at ( KeyType &&  key) const
inline

Definition at line 18401 of file json.h.

◆ count() [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 >::count ( const key_type key) const
inline

Definition at line 18512 of file json.h.

◆ count() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
size_type nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::count ( KeyType &&  key) const
inline

Definition at line 18526 of file json.h.

◆ emplace() [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 >::emplace ( const key_type key,
T &&  t 
)
inline

Definition at line 18306 of file json.h.

◆ emplace() [2/2]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
std::pair<iterator, bool> nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::emplace ( KeyType &&  key,
T &&  t 
)
inline

Definition at line 18321 of file json.h.

◆ erase() [1/4]

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_type key)
inline

Definition at line 18414 of file json.h.

◆ erase() [2/4]

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  first,
iterator  last 
)
inline

Definition at line 18459 of file json.h.

◆ erase() [3/4]

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)
inline

Definition at line 18454 of file json.h.

◆ erase() [4/4]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
size_type nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::erase ( KeyType &&  key)
inline

Definition at line 18435 of file json.h.

◆ find() [1/3]

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_type key)
inline

Definition at line 18538 of file json.h.

◆ find() [2/3]

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_type key) const
inline

Definition at line 18564 of file json.h.

◆ find() [3/3]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
iterator nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::find ( KeyType &&  key)
inline

Definition at line 18552 of file json.h.

◆ insert() [1/3]

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)
inline

Definition at line 18581 of file json.h.

◆ insert() [2/3]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<typename InputIt , typename = require_input_iter<InputIt>>
void nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert ( InputIt  first,
InputIt  last 
)
inline

Definition at line 18599 of file json.h.

◆ insert() [3/3]

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)
inline

Definition at line 18576 of file json.h.

◆ operator[]() [1/4]

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_type key)
inline

Definition at line 18334 of file json.h.

◆ operator[]() [2/4]

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_type key) const
inline

Definition at line 18346 of file json.h.

◆ operator[]() [3/4]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
T& nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[] ( KeyType &&  key)
inline

Definition at line 18341 of file json.h.

◆ operator[]() [4/4]

template<class Key , class T , class IgnoredLess = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class KeyType , detail::enable_if_t< detail::is_usable_as_key_type< key_compare, key_type, KeyType >::value, int > = 0>
const T& nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[] ( KeyType &&  key) const
inline

Definition at line 18353 of file json.h.


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