本文整理汇总了C++中StringBuffer::newline方法的典型用法代码示例。如果您正苦于以下问题:C++ StringBuffer::newline方法的具体用法?C++ StringBuffer::newline怎么用?C++ StringBuffer::newline使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuffer
的用法示例。
在下文中一共展示了StringBuffer::newline方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: row
const void *nextRow()
{
if (eoi || activity.abortSoon)
return false;
try
{
while (xmlParser->next()) {
if (lastMatch)
{
RtlDynamicRowBuilder row(allocator);
size32_t sz = xmlTransformer->transform(row, lastMatch, this);
lastMatch.clear();
if (sz) {
localOffset = 0;
++progress;
return row.finalizeRowClear(sz);
}
}
}
}
catch (IXMLReadException *e)
{
if (XmlRead_syntax != e->errorCode())
throw;
Owned<IException> _e = e;
offset_t localFPos = makeLocalFposOffset(activity.queryContainer().queryJob().queryMyRank()-1, e->queryOffset());
StringBuffer context;
context.append("Logical filename = ").append(activity.logicalFilename).newline();
context.append("Local fileposition = ");
_WINREV8(localFPos);
context.append("0x");
appendDataAsHex(context, sizeof(localFPos), &localFPos);
context.newline();
context.append(e->queryContext());
throw createXmlReadException(e->errorCode(), e->queryDescription(), context.str(), e->queryLine(), e->queryOffset());
}
catch (IOutOfMemException *e)
{
StringBuffer s("XMLRead actId(");
s.append(activity.queryContainer().queryId()).append(") out of memory.").newline();
s.append("INTERNAL ERROR ").append(e->errorCode());
Owned<IException> e2 = MakeActivityException(&activity, e, "%s", s.str());
e->Release();
throw e2.getClear();
}
catch (IException *e)
{
StringBuffer s("XMLRead actId(");
s.append(activity.queryContainer().queryId());
s.append(") INTERNAL ERROR ").append(e->errorCode());
Owned<IException> e2 = MakeActivityException(&activity, e, "%s", s.str());
e->Release();
throw e2.getClear();
}
eoi = true;
return NULL;
}
示例2: assertPool
void ESPMemCached::assertPool()
{
if (!pool)
{
StringBuffer msg = "ESPMemCached: Failed to instantiate server pool with:";
msg.newline().append(options);
ESPLOG(LogNormal, "%s", msg.str());
}
}
示例3: append
void Condition::append(StringBuffer &aStringBuffer, char *aBuffer,
ActiveCondition *aCond, bool &aFirst, int aMaxLen)
{
if (!aFirst)
aStringBuffer.newline();
else
aFirst = false;
char *cp = aBuffer + strlen(aBuffer);
aCond->toString(cp, aMaxLen);
appendText(aBuffer, (char*) aCond->getText(), aMaxLen);
aStringBuffer.append(aBuffer);
}
示例4: getXmlParseTree
static void getXmlParseTree(StringBuffer & s, IMatchWalker * walker, unsigned indent)
{
IAtom * name = walker->queryName();
if (name != separatorTagAtom)
{
unsigned max = walker->numChildren();
if (!name)
{
if (hasChildren(walker))
{
for (unsigned i=0; i<max; i++)
{
Owned<IMatchWalker> child = walker->getChild(i);
getXmlParseTree(s, child, indent);
}
}
else
getElementText(s, walker);
}
else
{
StringBuffer lname;
lname.append(name);
lname.toLowerCase();
s.pad(indent).append('<').append(lname).append('>');
if (hasChildren(walker))
{
s.newline();
for (unsigned i=0; i<max; i++)
{
Owned<IMatchWalker> child = walker->getChild(i);
getXmlParseTree(s, child, indent+1);
}
s.pad(indent);
}
else
getElementText(s, walker);
s.append("</").append(lname).append('>').newline();
}
}
}
示例5: run
int EclCMDShell::run()
{
try
{
if (!parseCommandLineOptions(args))
return 1;
if (!optIniFilename)
{
StringBuffer fn;
if (checkFileExists(INIFILE))
optIniFilename.set(INIFILE);
else if (getHomeDir(fn) && checkFileExists(addPathSepChar(fn).append(INIFILE)))
optIniFilename.set(fn);
else if (fn.set(SYSTEMCONFDIR).append(PATHSEPSTR).append(DEFAULTINIFILE))
optIniFilename.set(fn);
}
globals.setown(createProperties(optIniFilename, true));
finalizeOptions(globals);
return processCMD(args);
}
catch (IException *E)
{
StringBuffer m;
fputs(E->errorMessage(m.newline()).newline().str(), stderr);
E->Release();
return 2;
}
#ifndef _DEBUG
catch (...)
{
ERRLOG("Unexpected exception\n");
return 4;
}
#endif
return 0;
}