WvStreams
Main Page
Modules
Classes
Files
File List
File Members
include
wvwordwrap.h
1
/* -*- Mode: C++ -*-
2
* Worldvisions Weaver Software:
3
* Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4
*
5
* A very simple word wrapping encoder.
6
*/
7
#ifndef __WVWORDWRAP_H
8
#define __WVWORDWRAP_H
9
10
#include "wvencoder.h"
11
20
class
WvWordWrapEncoder
:
public
WvEncoder
21
{
22
const
int
maxwidth;
23
char
*line;
24
int
width;
// current visual position
25
int
curindex;
// current index in line array
26
int
wordindex;
// index of beginning of word in line array
27
bool
inword;
// if true, we're in a word
28
29
public
:
30
WvWordWrapEncoder
(
int
maxwidth);
31
virtual
~
WvWordWrapEncoder
();
32
33
protected
:
34
// on flush, outputs a partial line with remaining chars
35
virtual
bool
_encode
(
WvBuf
&inbuf,
WvBuf
&outbuf,
bool
flush
);
36
virtual
bool
_reset
();
// supported
37
38
private
:
39
void
flushline(
WvBuf
&outbuf);
40
};
41
42
#endif // __WVWORDWRAP_H
Generated on Wed Aug 28 2019 23:57:14 for WvStreams by
1.8.3.1