Panda3D
|
Used by LineStream to implement an ostream that writes to a memory buffer, whose contents can be continuously extracted as a sequence of lines of text. More...
#include "lineStreamBuf.h"
Public Member Functions | |
string | get_line () |
Extracts the next line of text from the LineStreamBuf, and sets the has_newline() flag according to whether this line had a trailing newline or not. | |
bool | has_newline () const |
bool | is_text_available () const |
Protected Member Functions | |
virtual int | overflow (int c) |
Called by the system ostream implementation when its internal buffer is filled, plus one character. | |
virtual int | sync () |
Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction). |
Used by LineStream to implement an ostream that writes to a memory buffer, whose contents can be continuously extracted as a sequence of lines of text.
Definition at line 29 of file lineStreamBuf.h.
string LineStreamBuf::get_line | ( | ) |
Extracts the next line of text from the LineStreamBuf, and sets the has_newline() flag according to whether this line had a trailing newline or not.
Definition at line 58 of file lineStreamBuf.cxx.
Referenced by LineStream::get_line().
int LineStreamBuf::overflow | ( | int | c | ) | [protected, virtual] |
Called by the system ostream implementation when its internal buffer is filled, plus one character.
Definition at line 98 of file lineStreamBuf.cxx.
References sync().
int LineStreamBuf::sync | ( | void | ) | [protected, virtual] |
Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction).
Definition at line 84 of file lineStreamBuf.cxx.
Referenced by overflow().