Panda3D
pandatool
src
progbase
wordWrapStreamBuf.h
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file wordWrapStreamBuf.h
10
* @author drose
11
* @date 2000-06-28
12
*/
13
14
#ifndef WORDWRAPSTREAMBUF_H
15
#define WORDWRAPSTREAMBUF_H
16
17
#include "
pandatoolbase.h
"
18
19
#include <string>
20
21
class
ProgramBase
;
22
class
WordWrapStream
;
23
24
/**
25
* Used by WordWrapStream to implement an ostream that flushes its output to
26
* ProgramBase::show_text().
27
*/
28
class
WordWrapStreamBuf
:
public
std::streambuf {
29
public
:
30
WordWrapStreamBuf
(
WordWrapStream
*owner,
ProgramBase
*program);
31
virtual
~
WordWrapStreamBuf
();
32
33
protected
:
34
virtual
int
overflow(
int
c);
35
virtual
int
sync();
36
37
private
:
38
void
write_chars(
const
char
*start,
int
length);
39
INLINE
void
set_literal_mode(
bool
mode);
40
void
flush_data();
41
42
std::string _data;
43
WordWrapStream
*_owner;
44
ProgramBase
*_program;
45
bool
_literal_mode;
46
};
47
48
#include "
wordWrapStreamBuf.I
"
49
50
#endif
WordWrapStream
A special ostream that formats all of its output through ProgramBase::show_text().
Definition:
wordWrapStream.h:30
wordWrapStreamBuf.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ProgramBase
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition:
programBase.h:34
WordWrapStreamBuf
Used by WordWrapStream to implement an ostream that flushes its output to ProgramBase::show_text().
Definition:
wordWrapStreamBuf.h:28
pandatoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Generated on Sat Jan 11 2020 15:15:40 for Panda3D by
1.8.17