11 #ifndef __UT_StringStream__
12 #define __UT_StringStream__
70 const char *
buf=
nullptr,
96 std::streambuf::pos_type seekoff(
97 std::streambuf::off_type
offset,
98 std::ios_base::seekdir dir,
99 std::ios_base::openmode
mode)
override;
101 std::streambuf::pos_type seekpos(
102 std::streambuf::pos_type pos,
103 std::ios_base::openmode
mode)
override;
108 std::streamsize xsgetn(
110 std::streamsize
num)
override;
112 std::streamsize showmanyc()
override;
119 std::streamsize xsputn(
121 std::streamsize
num)
override;
125 void setg64(
char *
start,
char *cur,
char *
end);
126 void setp64(
char *
start,
char *cur,
char *
end);
127 void updategpos(
exint pos);
128 void updateppos(
exint pos);
130 void reserve(
exint bytes);
133 void updateBufferEnd();
148 : myBuffer(std::ios_base::
in,
buf,
len)
149 , std::istream(&myBuffer) {}
165 : myBuffer(std::ios_base::out, nullptr, reserved_size)
166 , std::ostream(&myBuffer) {}
172 mem +=
sizeof(*this);
197 : myBuffer(std::ios_base::
in | std::ios_base::out, nullptr, reserved_size)
198 , std::iostream(&myBuffer) {}
216 #endif //__UT_StringStream__
void stealIntoStringHolder(UT_StringHolder &s)
const char * buffer() const
SYS_FORCE_INLINE exint length() const
UT_StringStreamBuffer * rdbuf() const
Returns the underlying stream buffer object.
void reset()
Resets the input stream and clears all existing input data.
int64 getMemoryUsage(bool inclusive) const
int64 getMemoryUsage(bool inclusive) const
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
SYS_FORCE_INLINE const char * buffer() const
An output stream object that owns its own string buffer storage.
An input stream object that owns its own string buffer storage.
UT_OStringStream(exint reserved_size=-1)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_IStringStream(const char *buf=nullptr, exint len=-1)
void reset()
Resets the input stream and clears all existing input data.
UT_StringStreamBuffer(std::ios_base::openmode mode=(std::ios_base::in|std::ios_base::out), const char *buf=nullptr, exint len=-1)
An bi-directional stream object that owns its own string buffer storage.
int64 getMemoryUsage(bool inclusive) const
void swap(UT_WorkBuffer &buf)
const UT_WorkBuffer & str()
UT_StringStreamBuffer * rdbuf() const
Returns the underlying stream buffer object.
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
UT_StringStream(exint reserved_size=-1)
UT_StringStreamBuffer * rdbuf() const
Returns the underlying stream buffer object.
void stealIntoString(UT_String &s)
GLenum GLuint GLsizei const GLchar * buf