cprover
filedescriptor_streambuft Class Reference

#include <pipe_stream.h>

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

Public Types

typedef int HANDLE
 

Public Member Functions

 filedescriptor_streambuft ()
 Constructor. More...
 
void set_in (HANDLE in)
 
void set_out (HANDLE out)
 
 ~filedescriptor_streambuft ()
 Destructor. More...
 

Protected Member Functions

int_type overflow (int_type)
 write one character to the piped process More...
 
std::streamsize xsputn (const char *, std::streamsize)
 write a number of character to the piped process More...
 
int_type underflow ()
 read a character from the piped process More...
 
std::streamsize xsgetn (char *, std::streamsize)
 read a number of characters from the piped process More...
 
std::streamsize showmanyc ()
 determine number of available characters in stream More...
 

Protected Attributes

HANDLE proc_in
 
HANDLE proc_out
 
char * in_buffer
 

Detailed Description

Definition at line 28 of file pipe_stream.h.

Member Typedef Documentation

§ HANDLE

Definition at line 33 of file pipe_stream.h.

Constructor & Destructor Documentation

§ filedescriptor_streambuft()

filedescriptor_streambuft::filedescriptor_streambuft ( )

Constructor.

Definition at line 218 of file pipe_stream.cpp.

References in_buffer, and READ_BUFFER_SIZE.

§ ~filedescriptor_streambuft()

filedescriptor_streambuft::~filedescriptor_streambuft ( )

Destructor.

Definition at line 232 of file pipe_stream.cpp.

References in_buffer, proc_in, and proc_out.

Referenced by set_out().

Member Function Documentation

§ overflow()

std::streambuf::int_type filedescriptor_streambuft::overflow ( int_type  )
protected

write one character to the piped process

Definition at line 256 of file pipe_stream.cpp.

References proc_in.

§ set_in()

void filedescriptor_streambuft::set_in ( HANDLE  in)
inline

Definition at line 39 of file pipe_stream.h.

References proc_in.

Referenced by pipe_streamt::pipe_streamt(), and pipe_streamt::run().

§ set_out()

void filedescriptor_streambuft::set_out ( HANDLE  out)
inline

Definition at line 40 of file pipe_stream.h.

References proc_out, and ~filedescriptor_streambuft().

Referenced by pipe_streamt::pipe_streamt(), and pipe_streamt::run().

§ showmanyc()

std::streamsize filedescriptor_streambuft::showmanyc ( )
protected

determine number of available characters in stream

Definition at line 340 of file pipe_stream.cpp.

References main(), pipe_streamt::run(), and pipe_streamt::wait().

Referenced by xsgetn().

§ underflow()

std::streambuf::int_type filedescriptor_streambuft::underflow ( )
protected

read a character from the piped process

Definition at line 290 of file pipe_stream.cpp.

References char_type(), proc_out, and READ_BUFFER_SIZE.

Referenced by xsgetn().

§ xsgetn()

std::streamsize filedescriptor_streambuft::xsgetn ( char *  target,
std::streamsize  count 
)
protected

read a number of characters from the piped process

Definition at line 317 of file pipe_stream.cpp.

References char_type(), showmanyc(), and underflow().

§ xsputn()

std::streamsize filedescriptor_streambuft::xsputn ( const char *  str,
std::streamsize  count 
)
protected

write a number of character to the piped process

Definition at line 277 of file pipe_stream.cpp.

References proc_in.

Member Data Documentation

§ in_buffer

char* filedescriptor_streambuft::in_buffer
protected

Definition at line 46 of file pipe_stream.h.

Referenced by filedescriptor_streambuft(), and ~filedescriptor_streambuft().

§ proc_in

HANDLE filedescriptor_streambuft::proc_in
protected

Definition at line 45 of file pipe_stream.h.

Referenced by overflow(), set_in(), xsputn(), and ~filedescriptor_streambuft().

§ proc_out

HANDLE filedescriptor_streambuft::proc_out
protected

Definition at line 45 of file pipe_stream.h.

Referenced by set_out(), underflow(), and ~filedescriptor_streambuft().


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