Eclipse SUMO - Simulation of Urban MObility
strict_fstream Namespace Reference

Namespaces

 detail
 

Data Structures

class  Exception
 Exception class thrown by failed operations. More...
 
class  fstream
 
class  ifstream
 
class  ofstream
 

Functions

static std::string strerror ()
 
std::string trim_to_null (const std::vector< char > &buff)
 

Detailed Description

This namespace defines wrappers for std::ifstream, std::ofstream, and std::fstream objects. The wrappers perform the following steps:

  • check the open modes make sense
  • check that the call to open() is successful
  • (for input streams) check that the opened file is peek-able
  • turn on the badbit in the exception mask

Function Documentation

◆ strerror()

static std::string strict_fstream::strerror ( )
static

Overload of error-reporting function, to enable use with VS and non-GNU POSIX libc's Ref:

Definition at line 54 of file strict_fstream.hpp.

References nlohmann::to_string(), and trim_to_null().

Referenced by tcpip::Socket::BailOnSocketError(), strict_fstream::detail::static_method_holder::check_open(), strict_fstream::detail::static_method_holder::check_peek(), OptionsCont::isUsableFileList(), and OutputDevice_File::OutputDevice_File().

Here is the caller graph for this function:

◆ trim_to_null()

std::string strict_fstream::trim_to_null ( const std::vector< char > &  buff)
inline

Definition at line 37 of file strict_fstream.hpp.

Referenced by strerror().

Here is the caller graph for this function: