All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
nlohmann::detail::file_input_adapter Class Reference

#include <json.hpp>

Inheritance diagram for nlohmann::detail::file_input_adapter:
nlohmann::detail::input_adapter_protocol

Public Member Functions

 file_input_adapter (std::FILE *f) noexcept
 
 file_input_adapter (const file_input_adapter &)=delete
 
 file_input_adapter (file_input_adapter &&)=default
 
file_input_adapteroperator= (const file_input_adapter &)=delete
 
file_input_adapteroperator= (file_input_adapter &&)=default
 
 ~file_input_adapter () override=default
 
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 Attributes

std::FILE * m_file
 the file pointer to read from More...
 

Detailed Description

Input adapter for stdio file access. This adapter read only 1 byte and do not use any buffer. This adapter is a very low level adapter.

Definition at line 3918 of file json.hpp.

Constructor & Destructor Documentation

nlohmann::detail::file_input_adapter::file_input_adapter ( std::FILE *  f)
inlineexplicitnoexcept

Definition at line 3922 of file json.hpp.

3923  : m_file(f)
3924  {}
std::FILE * m_file
the file pointer to read from
Definition: json.hpp:3940
nlohmann::detail::file_input_adapter::file_input_adapter ( const file_input_adapter )
delete
nlohmann::detail::file_input_adapter::file_input_adapter ( file_input_adapter &&  )
default
nlohmann::detail::file_input_adapter::~file_input_adapter ( )
overridedefault

Member Function Documentation

std::char_traits<char>::int_type nlohmann::detail::file_input_adapter::get_character ( )
inlineoverridevirtualnoexcept

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

Implements nlohmann::detail::input_adapter_protocol.

Definition at line 3933 of file json.hpp.

3934  {
3935  return std::fgetc(m_file);
3936  }
std::FILE * m_file
the file pointer to read from
Definition: json.hpp:3940
file_input_adapter& nlohmann::detail::file_input_adapter::operator= ( const file_input_adapter )
delete
file_input_adapter& nlohmann::detail::file_input_adapter::operator= ( file_input_adapter &&  )
default

Member Data Documentation

std::FILE* nlohmann::detail::file_input_adapter::m_file
private

the file pointer to read from

Definition at line 3940 of file json.hpp.


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