Rpp Namespace Reference


Classes

struct  Item
struct  ItemComposite
struct  Directive
struct  Token
struct  Text
struct  IdToken
struct  NonIdToken
struct  LineComment
struct  MultiLineComment
struct  WhiteSpace
struct  Source
struct  EmptyDirective
struct  ErrorDirective
struct  PragmaDirective
struct  IncludeDirective
struct  ConditionalDirective
struct  IfSection
struct  Expression
struct  StringLiteral
struct  IntLiteral
struct  MacroReference
struct  MacroFunctionReference
struct  UnaryExpression
struct  BinaryExpression
struct  ConditionalExpression
struct  IfLikeDirective
struct  IfDirective
struct  ElifDirective
struct  IfdefLikeDirective
struct  IfdefDirective
struct  IfndefDirective
struct  ElseDirective
struct  EndifDirective
struct  DefineDirective
struct  MacroDefinition
struct  MacroFunctionDefinition
struct  MacroParameter
struct  MacroParameters
struct  UndefDirective
struct  LineDirective
struct  NonDirective
class  Preprocessor
class  ExpressionBuilder
class  RppLexer
class  DefineMap
class  RppTreeEvaluator
class  MacroFunctionParser
class  RppTreeWalker

Functions

QByteArray visitGetText (Item *item)
template<typename T>
T * createNode (TypedPool< Item > *memPool, Item *parent)
template<typename T>
T * createNode (TypedPool< Item > *memPool)


Function Documentation

template<typename T>
T* Rpp::createNode ( TypedPool< Item > *  memPool  ) 

Definition at line 1038 of file rpp.h.

References TypedPool< BaseType >::allocate(), and T.

01039 {
01040     T* node = new (memPool->allocate(sizeof(T))) T(0);
01041     Q_ASSERT(node);
01042     return node;
01043 }

Here is the call graph for this function:

template<typename T>
T* Rpp::createNode ( TypedPool< Item > *  memPool,
Item parent 
)

Definition at line 1029 of file rpp.h.

References TypedPool< BaseType >::allocate(), and T.

01030 {
01031     Q_ASSERT(parent);
01032     T* node = new (memPool->allocate(sizeof(T))) T(parent);
01033     Q_ASSERT(node);
01034     return node;
01035 }

Here is the call graph for this function:

QByteArray Rpp::visitGetText ( Item item  ) 

Definition at line 685 of file rpp.cpp.

References TokenEngine::TokenSection::fullText(), i, Rpp::Item::text(), and Rpp::Item::toItemComposite().

00686 {
00687     QByteArray text;
00688 
00689     text += item->text().fullText();
00690 
00691     if(item->toItemComposite()) {
00692         ItemComposite *composite = item->toItemComposite();
00693         for (int i=0; i <composite->count(); ++i)
00694             text += visitGetText(composite->item(i));
00695     }
00696 
00697     return text;
00698 }

Here is the call graph for this function:


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