mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
add write()
This commit is contained in:
parent
b9b6dc8f0d
commit
cfbac6e51a
@ -415,3 +415,15 @@ INLINE void StreamWriter::
|
|||||||
flush() {
|
flush() {
|
||||||
_out->flush();
|
_out->flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: StreamWriter::write
|
||||||
|
// Access: Published
|
||||||
|
// Description: A synonym of append_data(). This is useful when
|
||||||
|
// assigning the StreamWriter to sys.stderr and/or
|
||||||
|
// sys.stdout in Python.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
INLINE void StreamWriter::
|
||||||
|
write(const string &data) {
|
||||||
|
append_data(data.data(), data.length());
|
||||||
|
}
|
||||||
|
@ -76,6 +76,8 @@ PUBLISHED:
|
|||||||
|
|
||||||
BLOCKING INLINE void flush();
|
BLOCKING INLINE void flush();
|
||||||
|
|
||||||
|
BLOCKING INLINE void write(const string &str);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ostream *_out;
|
ostream *_out;
|
||||||
bool _owns_stream;
|
bool _owns_stream;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user