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

#include <json.hpp>

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

Public Types

using Container = std::vector< std::pair< const Key, T >, Allocator >
 
using key_type = Key
 
using mapped_type = T
 
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

T & at (const Key &key)
 
const T & at (const Key &key) const
 
size_type count (const Key &key) const
 
std::pair< iterator, bool > emplace (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, bool > insert (const value_type &value)
 
template<typename InputIt , typename = require_input_iter<InputIt>>
void insert (InputIt first, InputIt last)
 
std::pair< iterator, bool > insert (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>

Definition at line 3407 of file json.hpp.

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 17292 of file json.hpp.

◆ 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 17290 of file json.hpp.

◆ 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 17291 of file json.hpp.

◆ 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 17445 of file json.hpp.

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 17300 of file json.hpp.

◆ 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 17302 of file json.hpp.

◆ 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 17304 of file json.hpp.

References init().

+ Here is the call graph for this function:

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

Definition at line 17330 of file json.hpp.

References JSON_THROW.

Referenced by nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[]().

+ Here is the caller graph for this function:

◆ 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 17343 of file json.hpp.

References JSON_THROW.

◆ 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 17389 of file json.hpp.

◆ 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

Definition at line 17307 of file json.hpp.

References Floor::t.

Referenced by nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert(), and nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::operator[]().

+ Here is the caller graph for this function:

◆ 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 17356 of file json.hpp.

References give::next.

◆ 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 17375 of file json.hpp.

References give::next.

◆ 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 17401 of file json.hpp.

◆ 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 17413 of file json.hpp.

◆ 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 17430 of file json.hpp.

◆ 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 17448 of file json.hpp.

References nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert().

+ Here is the call graph for this function:

◆ 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 17425 of file json.hpp.

References nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::emplace().

Referenced by nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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

Definition at line 17320 of file json.hpp.

References nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::emplace().

+ Here is the call graph for this function:

◆ 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

Definition at line 17325 of file json.hpp.

References nlohmann::ordered_map< Key, T, IgnoredLess, Allocator >::at().

+ Here is the call graph for this function:

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