Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
nlohmann::detail::wide_string_input_adapter< WideStringType > Class Template Reference

#include <json.hpp>

Inheritance diagram for nlohmann::detail::wide_string_input_adapter< WideStringType >:
Collaboration diagram for nlohmann::detail::wide_string_input_adapter< WideStringType >:

Public Member Functions

 wide_string_input_adapter (const WideStringType &w) noexcept
 
std::char_traits< char >::int_type get_character () noexceptoverride
 get a character [0,255] or std::char_traits<char>::eof(). More...
 
- Public Member Functions inherited from nlohmann::detail::input_adapter_protocol
virtual ~input_adapter_protocol ()=default
 

Private Member Functions

template<size_t T>
void fill_buffer ()
 

Private Attributes

const WideStringType & str
 the wstring to process More...
 
std::size_t current_wchar = 0
 index of the current wchar in str More...
 
std::array< std::char_traits< char >::int_type, 4 > utf8_bytes = {{0, 0, 0, 0}}
 a buffer for UTF-8 bytes More...
 
std::size_t utf8_bytes_index = 0
 index to the utf8_codes array for the next valid byte More...
 
std::size_t utf8_bytes_filled = 0
 number of valid bytes in the utf8_codes array More...
 

Detailed Description

template<typename WideStringType>
class nlohmann::detail::wide_string_input_adapter< WideStringType >

Definition at line 2289 of file json.hpp.

Constructor & Destructor Documentation

template<typename WideStringType >
nlohmann::detail::wide_string_input_adapter< WideStringType >::wide_string_input_adapter ( const WideStringType &  w)
inlineexplicitnoexcept

Definition at line 2292 of file json.hpp.

2293  : str(w)
2294  {}
const WideStringType & str
the wstring to process
Definition: json.hpp:2321
static double w[2][28][111]
Definition: ccl_emu17.c:33

Member Function Documentation

template<typename WideStringType >
template<size_t T>
void nlohmann::detail::wide_string_input_adapter< WideStringType >::fill_buffer ( )
inlineprivate

Definition at line 2315 of file json.hpp.

References nlohmann::detail::wide_string_input_helper< WideStringType, T >::fill_buffer().

2316  {
2318  }
std::array< std::char_traits< char >::int_type, 4 > utf8_bytes
a buffer for UTF-8 bytes
Definition: json.hpp:2327
static void fill_buffer(const WideStringType &str, size_t &current_wchar, std::array< std::char_traits< char >::int_type, 4 > &utf8_bytes, size_t &utf8_bytes_index, size_t &utf8_bytes_filled)
Definition: json.hpp:2176
std::size_t utf8_bytes_filled
number of valid bytes in the utf8_codes array
Definition: json.hpp:2332
std::size_t current_wchar
index of the current wchar in str
Definition: json.hpp:2324
const WideStringType & str
the wstring to process
Definition: json.hpp:2321
std::size_t utf8_bytes_index
index to the utf8_codes array for the next valid byte
Definition: json.hpp:2330
template<typename WideStringType >
std::char_traits<char>::int_type nlohmann::detail::wide_string_input_adapter< WideStringType >::get_character ( )
inlineoverridevirtualnoexcept

get a character [0,255] or std::char_traits<char>::eof().

Implements nlohmann::detail::input_adapter_protocol.

Definition at line 2296 of file json.hpp.

2297  {
2298  // check if buffer needs to be filled
2300  {
2301  fill_buffer<sizeof(typename WideStringType::value_type)>();
2302 
2303  assert(utf8_bytes_filled > 0);
2304  assert(utf8_bytes_index == 0);
2305  }
2306 
2307  // use buffer
2308  assert(utf8_bytes_filled > 0);
2310  return utf8_bytes[utf8_bytes_index++];
2311  }
std::array< std::char_traits< char >::int_type, 4 > utf8_bytes
a buffer for UTF-8 bytes
Definition: json.hpp:2327
std::size_t utf8_bytes_filled
number of valid bytes in the utf8_codes array
Definition: json.hpp:2332
std::size_t utf8_bytes_index
index to the utf8_codes array for the next valid byte
Definition: json.hpp:2330

Member Data Documentation

template<typename WideStringType >
std::size_t nlohmann::detail::wide_string_input_adapter< WideStringType >::current_wchar = 0
private

index of the current wchar in str

Definition at line 2324 of file json.hpp.

template<typename WideStringType >
const WideStringType& nlohmann::detail::wide_string_input_adapter< WideStringType >::str
private

the wstring to process

Definition at line 2321 of file json.hpp.

template<typename WideStringType >
std::array<std::char_traits<char>::int_type, 4> nlohmann::detail::wide_string_input_adapter< WideStringType >::utf8_bytes = {{0, 0, 0, 0}}
private

a buffer for UTF-8 bytes

Definition at line 2327 of file json.hpp.

template<typename WideStringType >
std::size_t nlohmann::detail::wide_string_input_adapter< WideStringType >::utf8_bytes_filled = 0
private

number of valid bytes in the utf8_codes array

Definition at line 2332 of file json.hpp.

template<typename WideStringType >
std::size_t nlohmann::detail::wide_string_input_adapter< WideStringType >::utf8_bytes_index = 0
private

index to the utf8_codes array for the next valid byte

Definition at line 2330 of file json.hpp.


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