Panda3D
Public Member Functions | Protected Member Functions

LineStreamBuf Class Reference

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"

List of all members.

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).

Detailed Description

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.


Member Function Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations