CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t > Class Template Reference

#include <zstream.h>

Inheritance diagram for ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >:

Public Types

typedef unsigned char byte_type
 
typedef Item_t char_type
 
typedef Traits_t::int_type int_type
 
typedef Traits_t::off_type off_type
 
typedef std::basic_ostream< Item_t, Traits_t > OStream_t
 
typedef Traits_t::pos_type pos_type
 
typedef std::basic_streambuf< Item_t, Traits_t > StreamBuf_t
 
typedef Traits_t traits_type
 

Public Member Functions

 basic_ozstreambuf (OStream_t *os, int level)
 
std::streamsize flush ()
 
int_type overflow (int_type c) override
 
int sync () override
 
 ~basic_ozstreambuf () override
 

Private Member Functions

size_t fillInputBuffer ()
 
bool zipToStream (char_type *buf, std::streamsize size)
 

Private Attributes

std::vector< char_type, Allocator_t > buffer
 
int err
 
OStream_tos
 
std::vector< byte_typeoutputBuffer
 
z_stream zipStream
 

Detailed Description

template<typename Item_t, typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
class ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >

Definition at line 26 of file zstream.h.

Member Typedef Documentation

◆ byte_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef unsigned char ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::byte_type

Definition at line 35 of file zstream.h.

◆ char_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Item_t ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::char_type

Definition at line 31 of file zstream.h.

◆ int_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t::int_type ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::int_type

Definition at line 32 of file zstream.h.

◆ off_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t::off_type ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::off_type

Definition at line 34 of file zstream.h.

◆ OStream_t

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef std::basic_ostream<Item_t, Traits_t> ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::OStream_t

Definition at line 28 of file zstream.h.

◆ pos_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t::pos_type ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::pos_type

Definition at line 33 of file zstream.h.

◆ StreamBuf_t

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef std::basic_streambuf<Item_t, Traits_t> ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::StreamBuf_t

Definition at line 29 of file zstream.h.

◆ traits_type

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
typedef Traits_t ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::traits_type

Definition at line 36 of file zstream.h.

Constructor & Destructor Documentation

◆ basic_ozstreambuf()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::basic_ozstreambuf ( OStream_t os,
int  level 
)

◆ ~basic_ozstreambuf()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::~basic_ozstreambuf ( )
override

Member Function Documentation

◆ fillInputBuffer()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
size_t ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::fillInputBuffer ( )
private

◆ flush()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
std::streamsize ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::flush ( )

◆ overflow()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
int_type ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::overflow ( int_type  c)
override

◆ sync()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
int ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::sync ( )
override

◆ zipToStream()

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
bool ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::zipToStream ( char_type buf,
std::streamsize  size 
)
private

Member Data Documentation

◆ buffer

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
std::vector<char_type, Allocator_t> ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::buffer
private

Definition at line 57 of file zstream.h.

◆ err

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
int ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::err
private

Definition at line 55 of file zstream.h.

◆ os

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
OStream_t* ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::os
private

Definition at line 53 of file zstream.h.

◆ outputBuffer

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
std::vector<byte_type> ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::outputBuffer
private

Definition at line 56 of file zstream.h.

◆ zipStream

template<typename Item_t , typename Traits_t = std::char_traits<Item_t>, typename Allocator_t = std::allocator<Item_t>>
z_stream ext::basic_ozstreambuf< Item_t, Traits_t, Allocator_t >::zipStream
private

Definition at line 54 of file zstream.h.