doxygen  1.8.18
About: Doxygen is a source code documentation generator tool for C++, C, Objective-C, C#, PHP, Java, Python, IDL (diverse flavors), Fortran, VHDL, Tcl, and to some extent D. Different output formats are supported.
  Fossies Dox: doxygen-1.8.18.src.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

OutlineParserInterface Class Referenceabstract

Abstract interface for outline parsers. More...

#include <parserintf.h>

+ Inheritance diagram for OutlineParserInterface:

Public Member Functions

virtual ~OutlineParserInterface ()
 
virtual void startTranslationUnit (const char *fileName)=0
 Starts processing a translation unit (source files + headers). More...
 
virtual void finishTranslationUnit ()=0
 Called after all files in a translation unit have been processed. More...
 
virtual void parseInput (const char *fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)=0
 Parses a single input file with the goal to build an Entry tree. More...
 
virtual bool needsPreprocessing (const QCString &extension) const =0
 Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed the result to the input parser. More...
 
virtual void parsePrototype (const char *text)=0
 Callback function called by the comment block scanner. More...
 

Detailed Description

Abstract interface for outline parsers.

By implementing the methods of this interface one can add a new language parser to doxygen. The parser implementation can make use of the comment block parser to parse the contents of special comment blocks.

Definition at line 41 of file parserintf.h.

Constructor & Destructor Documentation

◆ ~OutlineParserInterface()

virtual OutlineParserInterface::~OutlineParserInterface ( )
inlinevirtual

Definition at line 44 of file parserintf.h.

Member Function Documentation

◆ finishTranslationUnit()

virtual void OutlineParserInterface::finishTranslationUnit ( )
pure virtual

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

Implemented in NullOutlineParser, MarkdownOutlineParser, PythonOutlineParser, VHDLOutlineParser, COutlineParser, and FortranOutlineParser.

Referenced by parseFiles().

◆ needsPreprocessing()

virtual bool OutlineParserInterface::needsPreprocessing ( const QCString extension) const
pure virtual

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()

Implemented in PythonOutlineParser, COutlineParser, FortranOutlineParser, NullOutlineParser, MarkdownOutlineParser, and VHDLOutlineParser.

Referenced by parseFile().

◆ parseInput()

virtual void OutlineParserInterface::parseInput ( const char *  fileName,
const char *  fileBuf,
const std::shared_ptr< Entry > &  root,
bool  sameTranslationUnit,
QStrList filesInSameTranslationUnit 
)
pure virtual

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)

Implemented in MarkdownOutlineParser, PythonOutlineParser, VHDLOutlineParser, COutlineParser, FortranOutlineParser, and NullOutlineParser.

Referenced by parseFile().

◆ parsePrototype()

virtual void OutlineParserInterface::parsePrototype ( const char *  text)
pure virtual

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.

Implemented in MarkdownOutlineParser, PythonOutlineParser, VHDLOutlineParser, COutlineParser, FortranOutlineParser, and NullOutlineParser.

Referenced by MarkdownOutlineParser::parsePrototype().

◆ startTranslationUnit()

virtual void OutlineParserInterface::startTranslationUnit ( const char *  fileName)
pure virtual

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.

Implemented in COutlineParser, NullOutlineParser, MarkdownOutlineParser, PythonOutlineParser, VHDLOutlineParser, and FortranOutlineParser.

Referenced by parseFiles().


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