TokenEngine Namespace Reference


Classes

class  Token
class  TypeInfo
class  FileInfo
class  GeneratedInfo
class  TokenAttributes
class  TokenContainerData
class  TokenContainer
class  TokenRef
class  TokenTempRef
class  TokenSection
class  TokenList
class  TokenSectionSequence
class  TokenSectionSequenceIterator

Functions

template<typename TokenSequence>
QByteArray getText (TokenSequence tokenSequence)
template<typename TokenSequenceType>
void copy (QByteArray &text, QVector< TokenEngine::Token > &tokenList, const TokenSequenceType &tokenSequence, int startToken, int numTokens)
template<typename TokenSequenceType>
TokenContainer copy (const TokenSequenceType &tokenSequence, int startToken, int numTokens)


Function Documentation

template<typename TokenSequenceType>
TokenContainer TokenEngine::copy ( const TokenSequenceType &  tokenSequence,
int  startToken,
int  numTokens 
)

Definition at line 401 of file tokenengine.h.

References copy(), and QVector< T >::reserve().

Referenced by QVector< T >::append(), QDateTimeParser::checkIntermediate(), QTreeWidgetItem::clone(), QPixelTool::contextMenuEvent(), QPixmap::copy(), QImage::copy(), QDateTimeEdit::dateTimeFromText(), QCommonStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QCleanlooksStyle::drawControl(), QRasterPaintEngine::drawImage(), QRasterPaintEngine::drawTiledPixmap(), QVector< T >::fill(), QDateTimeEdit::fixup(), QTextDocumentFragmentPrivate::insert(), QVector< T >::insert(), QByteArray::insert(), QAbstractSpinBoxPrivate::interpret(), QMatrix::map(), QVector< T >::mid(), QAtomicPointer< T >::operator=(), QDebug::operator=(), QAtomic::operator=(), QAtomic::QAtomic(), QAtomicPointer< T >::QAtomicPointer(), QDirPrivate::QDirPrivate(), QFileInfoPrivate::QFileInfoPrivate(), QKeySequencePrivate::QKeySequencePrivate(), QSocks5SocketEngine::read(), QVector< T >::replace(), QByteArray::replace(), QString::replace(), QUrl::setEncodedUrl(), TrWindow::setupMenuBar(), QSet< T >::unite(), QMap< Key, T >::unite(), QHash< Key, T >::unite(), QDateTimeEditPrivate::updateCache(), QSpinBoxPrivate::validateAndInterpret(), QDoubleSpinBoxPrivate::validateAndInterpret(), QSpinBox::valueFromText(), QDoubleSpinBox::valueFromText(), and Q3TextStyleCommand::writeStyleInformation().

00402 {
00403     QByteArray containerText;
00404     QVector<Token> tokens;
00405     tokens.reserve(numTokens);
00406     TokenEngine::copy(containerText, tokens, tokenSequence, startToken, numTokens);
00407     return TokenContainer(containerText, tokens);
00408 }

Here is the call graph for this function:

template<typename TokenSequenceType>
void TokenEngine::copy ( QByteArray text,
QVector< TokenEngine::Token > &  tokenList,
const TokenSequenceType &  tokenSequence,
int  startToken,
int  numTokens 
)

Definition at line 382 of file tokenengine.h.

References QVector< T >::append(), QByteArray::count(), t, and token.

Referenced by copy(), Rpp::RppTreeEvaluator::evaluateMacro(), and Rpp::RppTreeEvaluator::evaluateMacroInternal().

00383 {
00384     const int endToken = startToken + numTokens;
00385     int textIndex = text.count();
00386     for(int t = startToken; t < endToken; ++t) {
00387         const QByteArray tokenText = tokenSequence.text(t);
00388         const int tokenLength = tokenText.count();
00389         TokenEngine::Token token(textIndex, tokenLength);
00390         tokenList.append(token);
00391         text += tokenSequence.text(t);
00392         textIndex += tokenText.count();
00393     }
00394 }

Here is the call graph for this function:

template<typename TokenSequence>
QByteArray TokenEngine::getText ( TokenSequence  tokenSequence  ) 

Definition at line 368 of file tokenengine.h.

References t.

00369 {
00370     QByteArray text;
00371     for (int t = 0; t<tokenSequence.count(); ++t) {
00372         text += tokenSequence.text(t);
00373     }
00374     return text;
00375 }


Generated on Thu Mar 15 20:54:31 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1