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

#include "oct-strstrm.h"

Inheritance diagram for ostrstream:
base_strstream base_stream

Public Member Functions

 ostrstream (std::ios::openmode arg_md=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
 
bool bad () const
 
void clear ()
 
bool eof () const
 
std::istream * input_stream ()
 
std::ostream * output_stream ()
 
std::streambuf * rdbuf ()
 
std::string str ()
 
- Public Member Functions inherited from base_strstream
 base_strstream (std::ios::openmode m=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
 
std::string name () const
 
int seek (off_t, int)
 
virtual off_t tell ()
 
- Public Member Functions inherited from base_stream
 base_stream (std::ios::openmode arg_md=std::ios::in|std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
 
virtual ~base_stream ()=default
 
void close ()
 
virtual void do_close ()
 
std::string error (bool clear, int &err_num)
 
virtual int file_number () const
 
bool is_open () const
 
bool ok () const
 
std::ostream * preferred_output_stream ()
 

Static Public Member Functions

static stream create (std::ios::openmode arg_md=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
 

Protected Member Functions

 ~ostrstream ()=default
 
- Protected Member Functions inherited from base_strstream
 ~base_strstream ()=default
 
- Protected Member Functions inherited from base_stream
void clear ()
 
void clearerr ()
 
std::string encoding () const
 
void error (const std::string &msg)
 
void error (const std::string &who, const std::string &msg)
 
mach_info::float_format float_format () const
 
int mode () const
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ostrstream()

ostrstream::ostrstream ( std::ios::openmode  arg_md = std::ios::out,
mach_info::float_format  ff = mach_info::native_float_format (),
const std::string &  encoding = "utf-8" 
)
inline

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

◆ ~ostrstream()

ostrstream::~ostrstream ( )
protecteddefault

Member Function Documentation

◆ bad()

bool ostrstream::bad ( ) const
inlinevirtual

Implements base_strstream.

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

◆ clear()

void ostrstream::clear ( )
inlinevirtual

Implements base_strstream.

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

◆ create()

stream ostrstream::create ( std::ios::openmode  arg_md = std::ios::out,
mach_info::float_format  ff = mach_info::native_float_format (),
const std::string &  encoding = "utf-8" 
)
static

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

References base_stream::encoding(), and base_stream::stream.

◆ eof()

bool ostrstream::eof ( ) const
inlinevirtual

Implements base_stream.

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

◆ input_stream()

std::istream* ostrstream::input_stream ( )
inlinevirtual

Reimplemented from base_stream.

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

◆ output_stream()

std::ostream* ostrstream::output_stream ( )
inlinevirtual

Reimplemented from base_stream.

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

◆ rdbuf()

std::streambuf* ostrstream::rdbuf ( )
inlinevirtual

Implements base_strstream.

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

◆ str()

std::string ostrstream::str ( )
inline

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

Referenced by octave::Fsprintf().


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