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

output adapter for basic_string More...

#include <json.hpp>

Inheritance diagram for nlohmann::detail::output_string_adapter< CharType, StringType >:
Collaboration diagram for nlohmann::detail::output_string_adapter< CharType, StringType >:

Public Member Functions

 output_string_adapter (StringType &s) noexcept
 
void write_character (CharType c) override
 
void write_characters (const CharType *s, std::size_t length) override
 
- Public Member Functions inherited from nlohmann::detail::output_adapter_protocol< CharType >
virtual ~output_adapter_protocol ()=default
 

Private Attributes

StringType & str
 

Detailed Description

template<typename CharType, typename StringType = std::basic_string<CharType>>
class nlohmann::detail::output_string_adapter< CharType, StringType >

output adapter for basic_string

Definition at line 6284 of file json.hpp.

Constructor & Destructor Documentation

template<typename CharType , typename StringType = std::basic_string<CharType>>
nlohmann::detail::output_string_adapter< CharType, StringType >::output_string_adapter ( StringType &  s)
inlineexplicitnoexcept

Definition at line 6287 of file json.hpp.

6288  : str(s)
6289  {}

Member Function Documentation

template<typename CharType , typename StringType = std::basic_string<CharType>>
void nlohmann::detail::output_string_adapter< CharType, StringType >::write_character ( CharType  c)
inlineoverridevirtual

Implements nlohmann::detail::output_adapter_protocol< CharType >.

Definition at line 6291 of file json.hpp.

6292  {
6293  str.push_back(c);
6294  }
template<typename CharType , typename StringType = std::basic_string<CharType>>
void nlohmann::detail::output_string_adapter< CharType, StringType >::write_characters ( const CharType *  s,
std::size_t  length 
)
inlineoverridevirtual

Implements nlohmann::detail::output_adapter_protocol< CharType >.

Definition at line 6296 of file json.hpp.

6297  {
6298  str.append(s, length);
6299  }

Member Data Documentation

template<typename CharType , typename StringType = std::basic_string<CharType>>
StringType& nlohmann::detail::output_string_adapter< CharType, StringType >::str
private

Definition at line 6302 of file json.hpp.


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