Eclipse SUMO - Simulation of Urban MObility
zstr::ostreambuf Class Reference

#include <zstr.hpp>

Inheritance diagram for zstr::ostreambuf:
[legend]
Collaboration diagram for zstr::ostreambuf:
[legend]

Public Member Functions

int deflate_loop (int flush)
 
ostreambufoperator= (const ostreambuf &)=delete
 
 ostreambuf (const ostreambuf &)=delete
 
 ostreambuf (std::streambuf *_sbuf_p, std::size_t _buff_size=default_buff_size, int _level=Z_DEFAULT_COMPRESSION, int _window_bits=0)
 
std::streambuf::int_type overflow (std::streambuf::int_type c=traits_type::eof()) override
 
int sync () override
 
virtual ~ostreambuf ()
 

Private Attributes

std::size_t buff_size
 
bool failed = false
 
std::unique_ptr< char[]> in_buff
 
std::unique_ptr< char[]> out_buff
 
std::streambuf * sbuf_p = nullptr
 
std::unique_ptr< detail::z_stream_wrapperzstrm_p
 

Detailed Description

Definition at line 264 of file zstr.hpp.

Constructor & Destructor Documentation

◆ ostreambuf() [1/2]

zstr::ostreambuf::ostreambuf ( std::streambuf *  _sbuf_p,
std::size_t  _buff_size = default_buff_size,
int  _level = Z_DEFAULT_COMPRESSION,
int  _window_bits = 0 
)
inline

Definition at line 268 of file zstr.hpp.

References buff_size, in_buff, out_buff, and sbuf_p.

◆ ostreambuf() [2/2]

zstr::ostreambuf::ostreambuf ( const ostreambuf )
delete

◆ ~ostreambuf()

virtual zstr::ostreambuf::~ostreambuf ( )
inlinevirtual

Definition at line 310 of file zstr.hpp.

References failed, and sync().

Member Function Documentation

◆ deflate_loop()

int zstr::ostreambuf::deflate_loop ( int  flush)
inline

Definition at line 285 of file zstr.hpp.

References buff_size, failed, nlohmann::detail::get(), out_buff, sbuf_p, and zstrm_p.

Referenced by overflow(), and sync().

Here is the caller graph for this function:

◆ operator=()

ostreambuf& zstr::ostreambuf::operator= ( const ostreambuf )
delete

◆ overflow()

std::streambuf::int_type zstr::ostreambuf::overflow ( std::streambuf::int_type  c = traits_type::eof())
inlineoverride

Definition at line 324 of file zstr.hpp.

References buff_size, deflate_loop(), in_buff, and zstrm_p.

Referenced by sync().

Here is the caller graph for this function:

◆ sync()

int zstr::ostreambuf::sync ( )
inlineoverride

Definition at line 340 of file zstr.hpp.

References deflate_loop(), overflow(), and zstrm_p.

Referenced by ~ostreambuf().

Here is the caller graph for this function:

Field Documentation

◆ buff_size

std::size_t zstr::ostreambuf::buff_size
private

Definition at line 357 of file zstr.hpp.

Referenced by deflate_loop(), ostreambuf(), and overflow().

◆ failed

bool zstr::ostreambuf::failed = false
private

Definition at line 358 of file zstr.hpp.

Referenced by deflate_loop(), and ~ostreambuf().

◆ in_buff

std::unique_ptr<char[]> zstr::ostreambuf::in_buff
private

Definition at line 354 of file zstr.hpp.

Referenced by ostreambuf(), and overflow().

◆ out_buff

std::unique_ptr<char[]> zstr::ostreambuf::out_buff
private

Definition at line 355 of file zstr.hpp.

Referenced by deflate_loop(), and ostreambuf().

◆ sbuf_p

std::streambuf* zstr::ostreambuf::sbuf_p = nullptr
private

Definition at line 353 of file zstr.hpp.

Referenced by deflate_loop(), and ostreambuf().

◆ zstrm_p

std::unique_ptr<detail::z_stream_wrapper> zstr::ostreambuf::zstrm_p
private

Definition at line 356 of file zstr.hpp.

Referenced by deflate_loop(), overflow(), and sync().


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