Public Member Functions | List of all members
XMLScanner Class Reference

#include <xmlscanner.h>

Inheritance diagram for XMLScanner:
ParserInterface

Public Member Functions

 XMLScanner ()
 
virtual ~XMLScanner ()
 
void startTranslationUnit (const char *)
 
void finishTranslationUnit ()
 
void parseInput (const char *, const char *, Entry *, bool, QStrList &)
 
bool needsPreprocessing (const QCString &)
 
void parseCode (CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)
 
void resetCodeParserState ()
 
void parsePrototype (const char *)
 
- Public Member Functions inherited from ParserInterface
virtual ~ParserInterface ()
 

Detailed Description

XML scanner. Only support syntax highlighting of code at the moment.

Definition at line 24 of file xmlscanner.h.

Constructor & Destructor Documentation

XMLScanner::XMLScanner ( )
inline

Definition at line 27 of file xmlscanner.h.

27 {}
virtual XMLScanner::~XMLScanner ( )
inlinevirtual

Definition at line 28 of file xmlscanner.h.

28 {}

Member Function Documentation

void XMLScanner::finishTranslationUnit ( )
inlinevirtual

Called after all files in a translation unit have been processed.

Implements ParserInterface.

Definition at line 30 of file xmlscanner.h.

30 {}
bool XMLScanner::needsPreprocessing ( const QCString extension)
inlinevirtual

Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed the result to the input parser.

See also
parseInput()

Implements ParserInterface.

Definition at line 32 of file xmlscanner.h.

32 { return FALSE; }
const bool FALSE
Definition: qglobal.h:370
void XMLScanner::parseCode ( CodeOutputInterface codeOutIntf,
const char *  scopeName,
const QCString input,
SrcLangExt  lang,
bool  isExampleBlock,
const char *  exampleName = 0,
FileDef fileDef = 0,
int  startLine = -1,
int  endLine = -1,
bool  inlineFragment = FALSE,
MemberDef memberDef = 0,
bool  showLineNumbers = TRUE,
Definition searchCtx = 0,
bool  collectXRefs = TRUE 
)
inlinevirtual

Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.

Parameters
[in]codeOutIntfAbstract interface for writing the result.
[in]langThe programming language of the code fragment.
[in]scopeNameName of scope to which the code belongs.
[in]inputActual code in the form of a string
[in]isExampleBlockTRUE iff the code is part of an example.
[in]exampleNameName of the example.
[in]fileDefFile definition to which the code is associated.
[in]startLineStarting line in case of a code fragment.
[in]endLineEnding line of the code fragment.
[in]inlineFragmentCode fragment that is to be shown inline as part of the documentation.
[in]memberDefMember definition to which the code is associated (non null in case of an inline fragment for a member).
[in]showLineNumbersif set to TRUE and also fileDef is not 0, line numbers will be added to the source fragement
[in]searchCtxcontext under which search data has to be stored.
[in]collectXRefscollect cross-reference relations.

Implements ParserInterface.

Definition at line 34 of file xmlscanner.h.

49  {
50  parseXmlCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
51  fileDef,startLine,endLine,inlineFragment,memberDef,
52  showLineNumbers,searchCtx,collectXRefs);
53  }
void parseXmlCode(CodeOutputInterface &od, const char *, const QCString &s, bool, const char *exName, FileDef *fd, int startLine, int endLine, bool, MemberDef *, bool, Definition *searchCtx, bool)
Definition: xmlcode.cpp:2081
bool collectXRefs
void XMLScanner::parseInput ( const char *  fileName,
const char *  fileBuf,
Entry root,
bool  sameTranslationUnit,
QStrList filesInSameTranslationUnit 
)
inlinevirtual

Parses a single input file with the goal to build an Entry tree.

Parameters
[in]fileNameThe full name of the file.
[in]fileBufThe contents of the file (zero terminated).
[in,out]rootThe root of the tree of Entry *nodes representing the information extracted from the file.
[in]sameTranslationUnitTRUE if this file was found in the same translation unit (in the filesInSameTranslationUnit list returned for another file).
[in,out]filesInSameTranslationUnitother files expected to be found in the same translation unit (used for libclang)

Implements ParserInterface.

Definition at line 31 of file xmlscanner.h.

31 {}
void XMLScanner::parsePrototype ( const char *  text)
inlinevirtual

Callback function called by the comment block scanner. It provides a string text containing the prototype of a function or variable. The parser should parse this and store the information in the Entry node that corresponds with the node for which the comment block parser was invoked.

Implements ParserInterface.

Definition at line 60 of file xmlscanner.h.

60 {}
void XMLScanner::resetCodeParserState ( )
inlinevirtual

Resets the state of the code parser. Since multiple code fragments can together form a single example, an explicit function is used to reset the code parser state.

See also
parseCode()

Implements ParserInterface.

Definition at line 55 of file xmlscanner.h.

56  {
58  }
void resetXmlCodeParserState()
Definition: xmlcode.cpp:2159
void XMLScanner::startTranslationUnit ( const char *  fileName)
inlinevirtual

Starts processing a translation unit (source files + headers). After this call parseInput() is called with sameTranslationUnit set to FALSE. If parseInput() returns additional include files, these are also processed using parseInput() with sameTranslationUnit set to TRUE. After that finishTranslationUnit() is called.

Implements ParserInterface.

Definition at line 29 of file xmlscanner.h.

29 {}

The documentation for this class was generated from the following file: