当前位置: 首页>>代码示例>>C++>>正文


C++ StringBuffer::newline方法代码示例

本文整理汇总了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;
        }
开发者ID:hszander,项目名称:HPCC-Platform,代码行数:58,代码来源:thxmlreadslave.cpp

示例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());
    }
}
开发者ID:GordonSmith,项目名称:HPCC-Platform,代码行数:9,代码来源:espcache.cpp

示例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);
}
开发者ID:johnmichaloski,项目名称:Adapter---fanuc-iSeries,代码行数:14,代码来源:condition.cpp

示例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();
        }
    }
}
开发者ID:RogerDev,项目名称:HPCC-Platform,代码行数:41,代码来源:parselib.cpp

示例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;
}
开发者ID:fnisswandt,项目名称:HPCC-Platform,代码行数:39,代码来源:eclcmd_shell.cpp


注:本文中的StringBuffer::newline方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。