μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
pythonbuf Class Reference

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/iostream.h>

Inheritance diagram for pythonbuf:
[legend]
Collaboration diagram for pythonbuf:
[legend]

Public Member Functions

 pythonbuf (const object &pyostream, size_t buffer_size=1024)
 
 pythonbuf (pythonbuf &&)=default
 
 ~pythonbuf () override
 Sync before destroy. More...
 
 pythonbuf (const object &pyostream, size_t buffer_size=1024)
 
 pythonbuf (pythonbuf &&)=default
 
 ~pythonbuf () override
 Sync before destroy. More...
 

Private Types

using traits_type = std::streambuf::traits_type
 
using traits_type = std::streambuf::traits_type
 

Private Member Functions

int overflow (int c) override
 
size_t utf8_remainder () const
 
int _sync ()
 
int sync () override
 
int overflow (int c) override
 
size_t utf8_remainder () const
 
int _sync ()
 
int sync () override
 

Private Attributes

const size_t buf_size
 
std::unique_ptr< char[]> d_buffer
 
object pywrite
 
object pyflush
 

Detailed Description

Definition at line 38 of file iostream.h.

Member Typedef Documentation

◆ traits_type [1/2]

using pythonbuf::traits_type = std::streambuf::traits_type
private

Definition at line 40 of file iostream.h.

◆ traits_type [2/2]

using pythonbuf::traits_type = std::streambuf::traits_type
private

Definition at line 40 of file iostream.h.

Constructor & Destructor Documentation

◆ pythonbuf() [1/4]

pythonbuf::pythonbuf ( const object pyostream,
size_t  buffer_size = 1024 
)
inlineexplicit

Definition at line 120 of file iostream.h.

◆ pythonbuf() [2/4]

pythonbuf::pythonbuf ( pythonbuf &&  )
default

◆ ~pythonbuf() [1/2]

pythonbuf::~pythonbuf ( )
inlineoverride

Sync before destroy.

Definition at line 129 of file iostream.h.

◆ pythonbuf() [3/4]

pythonbuf::pythonbuf ( const object pyostream,
size_t  buffer_size = 1024 
)
inlineexplicit

Definition at line 120 of file iostream.h.

References buf_size, and d_buffer.

◆ pythonbuf() [4/4]

pythonbuf::pythonbuf ( pythonbuf &&  )
default

◆ ~pythonbuf() [2/2]

pythonbuf::~pythonbuf ( )
inlineoverride

Sync before destroy.

Definition at line 129 of file iostream.h.

References _sync().

Member Function Documentation

◆ _sync() [1/2]

int pythonbuf::_sync ( )
inlineprivate

Definition at line 94 of file iostream.h.

Referenced by sync(), and ~pythonbuf().

◆ _sync() [2/2]

int pythonbuf::_sync ( )
inlineprivate

Definition at line 94 of file iostream.h.

References pyflush, pywrite, and utf8_remainder().

◆ overflow() [1/2]

int pythonbuf::overflow ( int  c)
inlineoverrideprivate

Definition at line 47 of file iostream.h.

◆ overflow() [2/2]

int pythonbuf::overflow ( int  c)
inlineoverrideprivate

Definition at line 47 of file iostream.h.

References sync().

◆ sync() [1/2]

int pythonbuf::sync ( )
inlineoverrideprivate

Definition at line 117 of file iostream.h.

Referenced by overflow().

◆ sync() [2/2]

int pythonbuf::sync ( )
inlineoverrideprivate

Definition at line 117 of file iostream.h.

References _sync().

◆ utf8_remainder() [1/2]

size_t pythonbuf::utf8_remainder ( ) const
inlineprivate

Definition at line 58 of file iostream.h.

Referenced by _sync().

◆ utf8_remainder() [2/2]

size_t pythonbuf::utf8_remainder ( ) const
inlineprivate

Definition at line 58 of file iostream.h.

Member Data Documentation

◆ buf_size

const size_t pythonbuf::buf_size
private

Definition at line 42 of file iostream.h.

Referenced by pythonbuf().

◆ d_buffer

std::unique_ptr< char[]> pythonbuf::d_buffer
private

Definition at line 43 of file iostream.h.

Referenced by pythonbuf().

◆ pyflush

object pythonbuf::pyflush
private

Definition at line 45 of file iostream.h.

Referenced by _sync().

◆ pywrite

object pythonbuf::pywrite
private

Definition at line 44 of file iostream.h.

Referenced by _sync().


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