|
reSIProcate/stack
9694
|
Public Member Functions | |
| ArGen (const char *arname=0, const int arnum=0, size_t wrapCol=72) | |
| ~ArGen () | |
| void | add (const unsigned char c) |
| bulk of formatting work done here. | |
| void | add (const unsigned char *buf, size_t sz) |
| void | end () |
| int | outputDef (int fd) |
Private Member Functions | |
| void | addRaw (const unsigned char c) |
| void | addRaw (const char *str) |
Private Attributes | |
| std::string | code |
| size_t | mColumn |
| size_t | mNcols |
Definition at line 11 of file testConvertRaw.cxx.
| ArGen::ArGen | ( | const char * | arname = 0, |
| const int | arnum = 0, |
||
| size_t | wrapCol = 72 |
||
| ) |
| ArGen::~ArGen | ( | ) |
Definition at line 111 of file testConvertRaw.cxx.
{}
| void ArGen::add | ( | const unsigned char | c | ) |
bulk of formatting work done here.
Definition at line 76 of file testConvertRaw.cxx.
References addRaw(), mColumn, and mNcols.
Referenced by add(), and dumpraw().
{
// take care of 1st part of line
if (!mColumn)
addRaw(" \"");
// take care of switching modes and opening or closing any running
// quotations.
if (isalnum(c) || c == ' ' ||
( ispunct(c) && c != '\\' && c != '"' ))
{
addRaw(c);
}
else
{
static const char hexv[] ="0123456789abcdef";
addRaw("\\x");
addRaw(hexv[(c&0xf0)>>8]);
addRaw(hexv[(c&0x0f)]);
}
if (mColumn > mNcols || c == 0x0a)
{
addRaw("\"\n");
mColumn = 0;
}
}

| void ArGen::add | ( | const unsigned char * | buf, |
| size_t | sz | ||
| ) |
Definition at line 105 of file testConvertRaw.cxx.
References add().
{
for(size_t i = 0 ; i < sz ; ++i)
add(c[i]);
}

| void ArGen::addRaw | ( | const unsigned char | c | ) | [private] |
| void ArGen::addRaw | ( | const char * | str | ) | [private] |
Definition at line 68 of file testConvertRaw.cxx.
References addRaw().
{
for(size_t i = 0 ; s[i] ; ++i)
addRaw(s[i]);
}

| void ArGen::end | ( | ) |
| int ArGen::outputDef | ( | int | fd | ) |
std::string ArGen::code [private] |
Definition at line 25 of file testConvertRaw.cxx.
Referenced by addRaw(), ArGen(), end(), and outputDef().
size_t ArGen::mColumn [private] |
Definition at line 26 of file testConvertRaw.cxx.
size_t ArGen::mNcols [private] |
Definition at line 27 of file testConvertRaw.cxx.
Referenced by add().
1.7.5.1