本文整理汇总了C++中SegmentedString::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ SegmentedString::toString方法的具体用法?C++ SegmentedString::toString怎么用?C++ SegmentedString::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SegmentedString
的用法示例。
在下文中一共展示了SegmentedString::toString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: write
void XMLTokenizer::write(const SegmentedString& s, bool /*appendData*/)
{
String parseString = s.toString();
if (m_sawXSLTransform || !m_sawFirstElement)
m_originalSourceForTransform += parseString;
if (m_parserStopped || m_sawXSLTransform)
return;
if (m_parserPaused) {
m_pendingSrc.append(s);
return;
}
doWrite(s.toString());
}
示例2: append
void XMLDocumentParser::append(const SegmentedString& s)
{
String parseString = s.toString();
if (m_sawXSLTransform || !m_sawFirstElement)
m_originalSourceForTransform += parseString;
if (isStopped() || m_sawXSLTransform)
return;
if (m_parserPaused) {
m_pendingSrc.append(s);
return;
}
doWrite(s.toString());
// After parsing, go ahead and dispatch image beforeload events.
ImageLoader::dispatchPendingBeforeLoadEvents();
}
示例3: resumeParsing
void XMLDocumentParser::resumeParsing()
{
ASSERT(m_parserPaused);
m_parserPaused = false;
// First, execute any pending callbacks
parse();
if (m_parserPaused)
return;
// Then, write any pending data
SegmentedString rest = m_pendingSrc;
m_pendingSrc.clear();
append(rest.toString().impl());
// Finally, if finish() has been called and append() didn't result
// in any further callbacks being queued, call end()
if (m_finishCalled && !m_parserPaused && !m_pendingScript)
end();
}
示例4: append
void HTMLDocumentParser::append(const SegmentedString& source)
{
if (isStopped())
return;
#if ENABLE(THREADED_HTML_PARSER)
if (shouldUseThreading()) {
if (!m_haveBackgroundParser)
startBackgroundParser();
ParserIdentifier identifier = ParserMap::identifierForParser(this);
const Closure& appendPartial = bind(&BackgroundHTMLParser::appendPartial, identifier, source.toString().isolatedCopy());
HTMLParserThread::shared()->postTask(appendPartial);
return;
}
#endif
// pumpTokenizer can cause this parser to be detached from the Document,
// but we need to ensure it isn't deleted yet.
RefPtr<HTMLDocumentParser> protect(this);
if (m_preloadScanner) {
if (m_input.current().isEmpty() && !isWaitingForScripts()) {
// We have parsed until the end of the current input and so are now moving ahead of the preload scanner.
// Clear the scanner so we know to scan starting from the current input point if we block again.
m_preloadScanner.clear();
} else {
m_preloadScanner->appendToEnd(source);
if (isWaitingForScripts())
m_preloadScanner->scan();
}
}
m_input.appendToEnd(source);
if (inPumpSession()) {
// We've gotten data off the network in a nested write.
// We don't want to consume any more of the input stream now. Do
// not worry. We'll consume this data in a less-nested write().
return;
}
pumpTokenizerIfPossible(AllowYield);
endIfDelayed();
}