Doxygen
commentscan.h
浏览该文件的文档.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef COMMENTSCAN_H
17 #define COMMENTSCAN_H
18 
19 #include <memory>
20 #include "types.h"
21 
22 class Entry;
24 
25 /** @file
26  * @brief Interface for the comment block scanner */
27 
29 {
30  public:
33 
34  /** Invokes the comment block parser with the request to parse a
35  * single comment block.
36  * @param[in] parser The language parse that invoked this function.
37  * The comment block parse may invoke
38  * ParserInterface::parsePrototype() in order to parse
39  * the argument of a @@fn command.
40  * @param[in] curEntry The Entry to which the comment block belongs.
41  * Any information (like documentation) that is found in
42  * the comment block will be stored in this entry.
43  * @param[in] comment A string representing the actual comment block.
44  * Note that leading *'s are already stripped from the comment block.
45  * @param[in] fileName The name of the file in which the comment is found.
46  * Mainly used for producing warnings.
47  * @param[in,out] lineNr The line number at which the comment block was found.
48  * When the function returns it will be set to the last line parsed.
49  * @param[in] isBrief TRUE iff this comment block represents a brief description.
50  * @param[in] isJavadocStyle TRUE iff this comment block is in "Javadoc" style.
51  * This means that it starts as a brief description until the end of
52  * the sentences is found and then proceeds as a detailed description.
53  * @param[in] isInbody TRUE iff this comment block is located in the body of
54  * a function.
55  * @param[in,out] prot The protection level in which this comment block was
56  * found. Commands in the comment block may override this.
57  * @param[in,out] position The character position within \a comment where the
58  * comment block starts. Typically used in case the comment block
59  * contains multiple structural commands.
60  * @param[out] newEntryNeeded Boolean that is TRUE if the comment block parser
61  * finds that a the comment block finishes the entry and a new one
62  * needs to be started.
63  * @param[in] markdownEnabled Indicates if markdown specific processing should be done.
64  * @returns TRUE if the comment requires further processing. The
65  * parameter \a newEntryNeeded will typically be true in this case and
66  * \a position will indicate the offset inside the \a comment string
67  * where to proceed parsing. FALSE indicates no further processing is
68  * needed.
69  */
71  Entry *curEntry,
72  const QCString &comment,
73  const QCString &fileName,
74  int &lineNr,
75  bool isBrief,
76  bool isJavadocStyle,
77  bool isInbody,
78  Protection &prot,
79  int &position,
80  bool &newEntryNeeded,
81  bool markdownEnabled
82  );
83  void initGroupInfo(Entry *entry);
84  void enterFile(const QCString &fileName,int lineNr);
85  void leaveFile(const QCString &fileName,int lineNr);
86  void enterCompound(const QCString &fileName,int line,const QCString &name);
87  void leaveCompound(const QCString &fileName,int line,const QCString &name);
88  void open(Entry *e,const QCString &fileName,int line,bool implicit=false);
89  void close(Entry *e,const QCString &fileName,int line,bool foundInline,bool implicit=false);
90  private:
91  struct Private;
92  std::unique_ptr<Private> p;
93 };
94 
95 #endif
CommentScanner::parseCommentBlock
bool parseCommentBlock(OutlineParserInterface *parser, Entry *curEntry, const QCString &comment, const QCString &fileName, int &lineNr, bool isBrief, bool isJavadocStyle, bool isInbody, Protection &prot, int &position, bool &newEntryNeeded, bool markdownEnabled)
Invokes the comment block parser with the request to parse a single comment block.
CommentScanner::~CommentScanner
~CommentScanner()
CommentScanner::open
void open(Entry *e, const QCString &fileName, int line, bool implicit=false)
Protection
Protection
Protection level of members
Definition: types.h:26
Private
@ Private
Definition: types.h:26
types.h
This file contains a number of basic enums and types.
CommentScanner::p
std::unique_ptr< Private > p
Definition: commentscan.h:91
CommentScanner::leaveFile
void leaveFile(const QCString &fileName, int lineNr)
CommentScanner
Definition: commentscan.h:28
CommentScanner::enterFile
void enterFile(const QCString &fileName, int lineNr)
CommentScanner::close
void close(Entry *e, const QCString &fileName, int line, bool foundInline, bool implicit=false)
Entry
Represents an unstructured piece of information, about an entity found in the sources.
Definition: entry.h:61
comment
const char * comment
Definition: vhdldocgen.cpp:2870
CommentScanner::initGroupInfo
void initGroupInfo(Entry *entry)
OutlineParserInterface
Abstract interface for outline parsers.
Definition: parserintf.h:42
CommentScanner::enterCompound
void enterCompound(const QCString &fileName, int line, const QCString &name)
CommentScanner::CommentScanner
CommentScanner()
CommentScanner::leaveCompound
void leaveCompound(const QCString &fileName, int line, const QCString &name)
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108