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

#include <json.h>

Inheritance diagram for nlohmann::ordered_map< Key, T, IgnoredLess, 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>

Definition at line 16405 of file json.h.

Public Types

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

Public Member Functions

 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())
 
std::pair< iterator, bool > emplace (const key_type &key, T &&t)
 
T & operator[] (const Key &key)
 
const T & operator[] (const Key &key) const
 
T & at (const Key &key)
 
const T & at (const Key &key) const
 
size_type erase (const Key &key)
 
iterator erase (iterator pos)
 
size_type count (const Key &key) const
 
iterator find (const Key &key)
 
const_iterator find (const Key &key) const
 
std::pair< iterator, bool > insert (value_type &&value)
 
std::pair< iterator, bool > insert (const value_type &value)
 

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>

Definition at line 16409 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 16407 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 16408 of file json.h.

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

Definition at line 16417 of file json.h.

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

Definition at line 16419 of file json.h.

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

Definition at line 16421 of file json.h.

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

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

Definition at line 16460 of file json.h.

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

Definition at line 16506 of file json.h.

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

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

Definition at line 16473 of file json.h.

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

Definition at line 16492 of file json.h.

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

Definition at line 16518 of file json.h.

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

Definition at line 16530 of file json.h.

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

Definition at line 16547 of file json.h.

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

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

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

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