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

#include "oct-strstrm.h"

Inheritance diagram for octave_ostrstream:
Collaboration diagram for octave_ostrstream:

Public Member Functions

 octave_ostrstream (std::ios::openmode arg_md=std::ios::out, octave::mach_info::float_format ff=octave::mach_info::native_float_format())
 
 octave_ostrstream (const octave_ostrstream &)=delete
 
bool bad (void) const
 
void clear (void)
 
void close (void)
 
virtual void do_close (void)
 
bool eof (void) const
 
std::string error (bool clear, int &err_num)
 
virtual int file_number (void) const
 
std::istream * input_stream (void)
 
bool is_open (void) const
 
std::string name (void) const
 
bool ok (void) const
 
octave_ostrstreamoperator= (const octave_ostrstream &)=delete
 
std::ostream * output_stream (void)
 
std::streambuf * rdbuf (void)
 
int seek (off_t, int)
 
std::string str (void)
 
virtual off_t tell (void)
 

Static Public Member Functions

static octave::stream create (std::ios::openmode arg_md=std::ios::out, octave::mach_info::float_format ff=octave::mach_info::native_float_format())
 

Protected Member Functions

 ~octave_ostrstream (void)=default
 
void clearerr (void)
 
void error (const std::string &msg)
 
void error (const std::string &who, const std::string &msg)
 
mach_info::float_format float_format (void) const
 
int mode (void) const
 

Private Attributes

std::ostringstream os
 

Detailed Description

Definition at line 135 of file oct-strstrm.h.

Constructor & Destructor Documentation

◆ octave_ostrstream() [1/2]

octave_ostrstream::octave_ostrstream ( std::ios::openmode  arg_md = std::ios::out,
octave::mach_info::float_format  ff = octave::mach_info::native_float_format () 
)
inline

Definition at line 140 of file oct-strstrm.h.

◆ octave_ostrstream() [2/2]

octave_ostrstream::octave_ostrstream ( const octave_ostrstream )
delete

◆ ~octave_ostrstream()

octave_ostrstream::~octave_ostrstream ( void  )
protecteddefault

Member Function Documentation

◆ bad()

bool octave_ostrstream::bad ( void  ) const
inlinevirtual

Implements octave_base_strstream.

Definition at line 174 of file oct-strstrm.h.

References os.

◆ clear()

void octave_ostrstream::clear ( void  )
inlinevirtual

Implements octave_base_strstream.

Definition at line 176 of file oct-strstrm.h.

References os.

◆ clearerr()

void octave::base_stream::clearerr ( void  )
protectedinherited

◆ close()

void octave::base_stream::close ( void  )
inlineinherited

Definition at line 120 of file oct-stream.h.

Referenced by octave::stream::close().

◆ create()

octave::stream octave_ostrstream::create ( std::ios::openmode  arg_md = std::ios::out,
octave::mach_info::float_format  ff = octave::mach_info::native_float_format () 
)
static

Definition at line 66 of file oct-strstrm.cc.

References octave::base_stream::flt_fmt.

◆ do_close()

◆ eof()

bool octave_ostrstream::eof ( void  ) const
inlinevirtual

Implements octave::base_stream.

Definition at line 164 of file oct-strstrm.h.

References octave::stream::eof(), and os.

◆ error() [1/3]

◆ error() [2/3]

void octave::base_stream::error ( const std::string msg)
protectedinherited

Definition at line 3954 of file oct-stream.cc.

References octave::base_stream::errmsg, and octave::base_stream::fail.

◆ error() [3/3]

void octave::base_stream::error ( const std::string who,
const std::string msg 
)
protectedinherited

Definition at line 3961 of file oct-stream.cc.

References octave::base_stream::errmsg, and octave::base_stream::fail.

◆ file_number()

◆ float_format()

mach_info::float_format octave::base_stream::float_format ( void  ) const
inlineprotectedinherited

Definition at line 153 of file oct-stream.h.

References flt_fmt.

Referenced by octave::stream::float_format().

◆ input_stream()

std::istream* octave_ostrstream::input_stream ( void  )
inlinevirtual

Reimplemented from octave::base_stream.

Definition at line 166 of file oct-strstrm.h.

◆ is_open()

bool octave::base_stream::is_open ( void  ) const
inlineinherited

Definition at line 116 of file oct-stream.h.

Referenced by octave::stream::is_open().

◆ mode()

int octave::base_stream::mode ( void  ) const
inlineprotectedinherited

◆ name()

std::string octave_base_strstream::name ( void  ) const
inlinevirtualinherited

Implements octave::base_stream.

Definition at line 65 of file oct-strstrm.h.

◆ ok()

bool octave::base_stream::ok ( void  ) const
inlineinherited

◆ operator=()

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

◆ output_stream()

std::ostream* octave_ostrstream::output_stream ( void  )
inlinevirtual

Reimplemented from octave::base_stream.

Definition at line 168 of file oct-strstrm.h.

References os.

◆ rdbuf()

std::streambuf* octave_ostrstream::rdbuf ( void  )
inlinevirtual

Implements octave_base_strstream.

Definition at line 172 of file oct-strstrm.h.

References os.

◆ seek()

int octave_base_strstream::seek ( off_t  ,
int   
)
virtualinherited

Implements octave::base_stream.

Definition at line 32 of file oct-strstrm.cc.

References octave::base_stream::error().

◆ str()

std::string octave_ostrstream::str ( void  )
inline

Definition at line 170 of file oct-strstrm.h.

References os.

◆ tell()

off_t octave_base_strstream::tell ( void  )
virtualinherited

Implements octave::base_stream.

Reimplemented in octave_istrstream.

Definition at line 43 of file oct-strstrm.cc.

References octave::base_stream::error().

Member Data Documentation

◆ os

std::ostringstream octave_ostrstream::os
private

Definition at line 180 of file oct-strstrm.h.


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