GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
procbuf Class Reference

#include "oct-procbuf.h"

Inheritance diagram for procbuf:
Collaboration diagram for procbuf:

Public Types

typedef int(* close_fcn) (FILE *)
 
typedef std::streambuf::int_type int_type
 

Public Member Functions

 procbuf (const char *command, int mode)
 
 procbuf (const procbuf &)=delete
 
 procbuf (void)
 
 ~procbuf (void)
 
int buf_close (void)
 
void clear (void)
 
procbufclose (void)
 
int file_number () const
 
int flush (void)
 
bool is_open (void) const
 
procbufopen (const char *command, int mode)
 
procbufoperator= (const procbuf &)=delete
 
int_type overflow (int_type)
 
int_type pbackfail (int_type)
 
pid_t pid (void) const
 
int seek (off_t offset, int origin)
 
std::streampos seekoff (std::streamoff, std::ios::seekdir, std::ios::openmode=std::ios::in|std::ios::out)
 
std::streampos seekpos (std::streampos, std::ios::openmode=std::ios::in|std::ios::out)
 
FILE * stdiofile (void)
 
int sync (void)
 
off_t tell (void)
 
int_type uflow (void)
 
int_type underflow (void)
 
int wait_status (void) const
 
std::streamsize xsgetn (char *, std::streamsize)
 
std::streamsize xsputn (const char *, std::streamsize)
 

Static Public Member Functions

static int file_close (FILE *m_f)
 

Protected Attributes

close_fcn m_cf
 
FILE * m_f
 
procbufm_next
 
bool m_open_p
 
pid_t m_proc_pid
 
int m_wstatus
 

Private Member Functions

int_type underflow_common (bool)
 

Detailed Description

Definition at line 40 of file oct-procbuf.h.

Member Typedef Documentation

◆ close_fcn

typedef int(* c_file_ptr_buf::close_fcn) (FILE *)
inherited

Definition at line 47 of file c-file-ptr-stream.h.

◆ int_type

typedef std::streambuf::int_type c_file_ptr_buf::int_type
inherited

Definition at line 45 of file c-file-ptr-stream.h.

Constructor & Destructor Documentation

◆ procbuf() [1/3]

procbuf::procbuf ( void  )
inline

Definition at line 45 of file oct-procbuf.h.

◆ procbuf() [2/3]

procbuf::procbuf ( const char *  command,
int  mode 
)
inline

Definition at line 50 of file oct-procbuf.h.

◆ procbuf() [3/3]

procbuf::procbuf ( const procbuf )
delete

◆ ~procbuf()

procbuf::~procbuf ( void  )
inline

Definition at line 61 of file oct-procbuf.h.

Member Function Documentation

◆ buf_close()

int c_file_ptr_buf::buf_close ( void  )
inherited

◆ clear()

void c_file_ptr_buf::clear ( void  )
inlineinherited

Definition at line 93 of file c-file-ptr-stream.h.

◆ close()

procbuf * procbuf::close ( void  )

Definition at line 185 of file oct-procbuf.cc.

References c_file_ptr_buf::m_f, m_next, m_open_p, m_proc_pid, m_wstatus, pclose(), and waitpid().

Referenced by procstreambase::close().

◆ file_close()

int c_file_ptr_buf::file_close ( FILE *  m_f)
staticinherited

Definition at line 187 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f.

◆ file_number()

int c_file_ptr_buf::file_number ( ) const
inlineinherited

Definition at line 87 of file c-file-ptr-stream.h.

◆ flush()

int c_file_ptr_buf::flush ( void  )
inherited

◆ is_open()

bool procbuf::is_open ( void  ) const
inline

Definition at line 69 of file oct-procbuf.h.

Referenced by open().

◆ open()

procbuf * procbuf::open ( const char *  command,
int  mode 
)

◆ operator=()

procbuf& procbuf::operator= ( const procbuf )
delete

◆ overflow()

c_file_ptr_buf::int_type c_file_ptr_buf::overflow ( int_type  c)
inherited

Definition at line 58 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::flush(), and c_file_ptr_buf::m_f.

◆ pbackfail()

c_file_ptr_buf::int_type c_file_ptr_buf::pbackfail ( int_type  c)
inherited

Definition at line 83 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f.

◆ pid()

pid_t procbuf::pid ( void  ) const
inline

Definition at line 71 of file oct-procbuf.h.

◆ seek()

int c_file_ptr_buf::seek ( off_t  offset,
int  origin 
)
inherited

Definition at line 175 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f, and octave_fseeko_wrapper().

◆ seekoff()

std::streampos c_file_ptr_buf::seekoff ( std::streamoff  offset,
std::ios::seekdir  dir,
std::ios::openmode  = std::ios::in | std::ios::out 
)
inherited

◆ seekpos()

std::streampos c_file_ptr_buf::seekpos ( std::streampos  offset,
std::ios::openmode  = std::ios::in | std::ios::out 
)
inherited

◆ stdiofile()

FILE* c_file_ptr_buf::stdiofile ( void  )
inlineinherited

Definition at line 49 of file c-file-ptr-stream.h.

◆ sync()

int c_file_ptr_buf::sync ( void  )
inherited

Definition at line 145 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::flush().

◆ tell()

off_t c_file_ptr_buf::tell ( void  )
inherited

Definition at line 181 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f, and octave_ftello_wrapper().

◆ uflow()

int_type c_file_ptr_buf::uflow ( void  )
inlineinherited

Definition at line 67 of file c-file-ptr-stream.h.

◆ underflow()

int_type c_file_ptr_buf::underflow ( void  )
inlineinherited

Definition at line 65 of file c-file-ptr-stream.h.

◆ underflow_common()

c_file_ptr_buf::int_type c_file_ptr_buf::underflow_common ( bool  bump)
privateinherited

Definition at line 67 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f.

◆ wait_status()

int procbuf::wait_status ( void  ) const
inline

Definition at line 67 of file oct-procbuf.h.

Referenced by procstreambase::close().

◆ xsgetn()

std::streamsize c_file_ptr_buf::xsgetn ( char *  s,
std::streamsize  n 
)
inherited

Definition at line 99 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f, and n.

◆ xsputn()

std::streamsize c_file_ptr_buf::xsputn ( const char *  s,
std::streamsize  n 
)
inherited

Definition at line 90 of file c-file-ptr-stream.cc.

References c_file_ptr_buf::m_f, and n.

Member Data Documentation

◆ m_cf

close_fcn c_file_ptr_buf::m_cf
protectedinherited

Definition at line 101 of file c-file-ptr-stream.h.

Referenced by c_file_ptr_buf::buf_close().

◆ m_f

◆ m_next

procbuf* procbuf::m_next
protected

Definition at line 81 of file oct-procbuf.h.

Referenced by close(), and open().

◆ m_open_p

bool procbuf::m_open_p
protected

Definition at line 77 of file oct-procbuf.h.

Referenced by close(), and open().

◆ m_proc_pid

pid_t procbuf::m_proc_pid
protected

Definition at line 79 of file oct-procbuf.h.

Referenced by close(), and open().

◆ m_wstatus

int procbuf::m_wstatus
protected

Definition at line 75 of file oct-procbuf.h.

Referenced by close().


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