26 #if ! defined (octave_oct_strstrm_h)
27 #define octave_oct_strstrm_h 1
29 #include "octave-config.h"
46 const std::string& encoding =
"utf-8")
63 int seek (off_t,
int);
67 virtual off_t tell (
void);
71 std::string
name (
void)
const {
return ""; }
73 virtual std::streambuf *
rdbuf (
void) = 0;
75 virtual bool bad (
void)
const = 0;
86 std::ios::openmode arg_md = std::ios::out,
88 const std::string& encoding =
"utf-8")
92 std::ios::openmode arg_md = std::ios::out,
94 const std::string& encoding =
"utf-8")
111 create (
const char *data, std::ios::openmode arg_md = std::ios::out,
113 const std::string& encoding =
"utf-8");
116 create (
const std::string& data, std::ios::openmode arg_md = std::ios::out,
118 const std::string& encoding =
"utf-8");
122 bool eof (
void)
const {
return m_istream.eof (); }
128 off_t
tell (
void) {
return m_istream.tellg (); }
132 return m_istream ? m_istream.rdbuf () :
nullptr;
135 bool bad (
void)
const {
return m_istream.bad (); }
137 void clear (
void) { m_istream.clear (); }
151 const std::string& encoding =
"utf-8")
167 create (std::ios::openmode arg_md = std::ios::out,
169 const std::string& encoding =
"utf-8");
173 bool eof (
void)
const {
return m_ostream.eof (); }
179 std::string
str (
void) {
return m_ostream.str (); }
183 return m_ostream ? m_ostream.rdbuf () :
nullptr;
186 bool bad (
void)
const {
return m_ostream.bad (); }
188 void clear (
void) { m_ostream.clear (); }
197 #if defined (OCTAVE_PROVIDE_DEPRECATED_SYMBOLS)
199 OCTAVE_DEPRECATED (7,
"use 'octave::base_strstream' instead")
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")
virtual std::streambuf * rdbuf(void)=0
~base_strstream(void)=default
virtual void clear(void)=0
std::string name(void) const
virtual bool bad(void) const =0
base_strstream(const base_strstream &)=delete
istrstream(const char *data, std::ios::openmode arg_md=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
std::ostream * output_stream(void)
istrstream(const istrstream &)=delete
std::istream * input_stream(void)
std::streambuf * rdbuf(void)
std::istringstream m_istream
istrstream(const std::string &data, std::ios::openmode arg_md=std::ios::out, mach_info::float_format ff=mach_info::native_float_format(), const std::string &encoding="utf-8")
~istrstream(void)=default
~ostrstream(void)=default
std::istream * input_stream(void)
std::ostringstream m_ostream
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")
ostrstream(const ostrstream &)=delete
std::ostream * output_stream(void)
std::streambuf * rdbuf(void)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
float_format native_float_format(void)