#include <TextCode.h>
A TextCode block ends with a single raw control-L character followed by a newline character ("\n") on a single line.
Definition at line 32 of file TextCode.h.
Public Member Functions | |
TextCode (const char *input_buf, size_t length, ExpandableBuffer *buf, int cols, int pad) | |
Private Member Functions | |
bool | is_not_escaped (char c) |
Whether or not the character is printable ascii. | |
void | textcodify () |
Perform the conversion. | |
void | append (char c) |
Append a character to the text code. | |
Private Attributes | |
const char * | input_buf_ |
size_t | length_ |
StringBuffer | buf_ |
int | cols_ |
int | pad_ |
oasys::TextCode::TextCode | ( | const char * | input_buf, | |
size_t | length, | |||
ExpandableBuffer * | buf, | |||
int | cols, | |||
int | pad | |||
) |
input_buf | Input buffer | |
length | Length of the input buffer | |
buf | Buffer to put the text coded block into. | |
cols | Number of characters to put in a column. | |
pad | String to put in front of each line. |
Definition at line 23 of file TextCode.cc.
References textcodify().
bool oasys::TextCode::is_not_escaped | ( | char | c | ) | [private] |
Whether or not the character is printable ascii.
Definition at line 32 of file TextCode.cc.
Referenced by append().
void oasys::TextCode::textcodify | ( | ) | [private] |
Perform the conversion.
Definition at line 48 of file TextCode.cc.
References append(), oasys::StringBuffer::append(), buf_, cols_, input_buf_, length_, and pad_.
Referenced by TextCode().
void oasys::TextCode::append | ( | char | c | ) | [private] |
Append a character to the text code.
Definition at line 37 of file TextCode.cc.
References oasys::StringBuffer::append(), oasys::StringBuffer::appendf(), buf_, and is_not_escaped().
Referenced by textcodify().
const char* oasys::TextCode::input_buf_ [private] |
size_t oasys::TextCode::length_ [private] |
StringBuffer oasys::TextCode::buf_ [private] |
int oasys::TextCode::cols_ [private] |
int oasys::TextCode::pad_ [private] |