Doxygen
DocInclude类 参考

Node representing an included text block from file 更多...

#include <docparser.h>

+ 类 DocInclude 继承关系图:
+ DocInclude 的协作图:

Public 类型

enum  Type {
  Include, DontInclude, VerbInclude, HtmlInclude,
  LatexInclude, IncWithLines, Snippet, IncludeDoc,
  SnippetDoc, SnipWithLines, DontIncWithLines, RtfInclude,
  ManInclude, DocbookInclude, XmlInclude
}
 
- Public 类型 继承自 DocNode
enum  Kind {
  Kind_Root = 0, Kind_Word = 1, Kind_WhiteSpace = 2, Kind_Para = 3,
  Kind_AutoList = 4, Kind_AutoListItem = 5, Kind_Symbol = 6, Kind_URL = 7,
  Kind_StyleChange = 8, Kind_SimpleSect = 9, Kind_Title = 10, Kind_SimpleList = 11,
  Kind_SimpleListItem = 12, Kind_Section = 13, Kind_Verbatim = 14, Kind_XRefItem = 15,
  Kind_HtmlList = 16, Kind_HtmlListItem = 17, Kind_HtmlDescList = 18, Kind_HtmlDescData = 19,
  Kind_HtmlDescTitle = 20, Kind_HtmlTable = 21, Kind_HtmlRow = 22, Kind_HtmlCell = 23,
  Kind_HtmlCaption = 24, Kind_LineBreak = 25, Kind_HorRuler = 26, Kind_Anchor = 27,
  Kind_IndexEntry = 28, Kind_Internal = 29, Kind_HRef = 30, Kind_Include = 31,
  Kind_IncOperator = 32, Kind_HtmlHeader = 33, Kind_Image = 34, Kind_DotFile = 35,
  Kind_Link = 36, Kind_Ref = 37, Kind_Formula = 38, Kind_SecRefItem = 39,
  Kind_SecRefList = 40, Kind_SimpleSectSep = 41, Kind_LinkedWord = 42, Kind_ParamSect = 43,
  Kind_ParamList = 44, Kind_InternalRef = 45, Kind_Copy = 46, Kind_Text = 47,
  Kind_MscFile = 48, Kind_HtmlBlockQuote = 49, Kind_VhdlFlow = 50, Kind_ParBlock = 51,
  Kind_DiaFile = 52, Kind_Emoji = 53, Kind_Sep = 54
}
 

Public 成员函数

 DocInclude (DocParser &parser, DocNode *parent, const QCString &file, const QCString &context, Type t, bool isExample, const QCString &exampleFile, const QCString &blockId, bool isBlock)
 
Kind kind () const override
 
QCString file () const
 
QCString extension () const
 
Type type () const
 
QCString text () const
 
QCString context () const
 
QCString blockId () const
 
bool isExample () const
 
QCString exampleFile () const
 
bool isBlock () const
 
void accept (DocVisitor *v) override
 
void parse ()
 
- Public 成员函数 继承自 DocNode
 DocNode (DocParser &parser)
 
virtual ~DocNode ()
 
DocNodeparent () const
 
void setParent (DocNode *parent)
 
bool isPreformatted () const
 

Private 属性

QCString m_file
 
QCString m_context
 
QCString m_text
 
Type m_type
 
bool m_isExample
 
bool m_isBlock
 
QCString m_exampleFile
 
QCString m_blockId
 

额外继承的成员函数

- Protected 类型 继承自 DocNode
enum  RefType { Unknown, Anchor, Section, Table }
 
- Protected 成员函数 继承自 DocNode
void setInsidePreformatted (bool p)
 
- Protected 属性 继承自 DocNode
DocNodem_parent = 0
 
DocParserm_parser
 

详细描述

Node representing an included text block from file

在文件 docparser.h563 行定义.

成员枚举类型说明

◆ Type

枚举值
Include 
DontInclude 
VerbInclude 
HtmlInclude 
LatexInclude 
IncWithLines 
Snippet 
IncludeDoc 
SnippetDoc 
SnipWithLines 
DontIncWithLines 
RtfInclude 
ManInclude 
DocbookInclude 
XmlInclude 

在文件 docparser.h566 行定义.

构造及析构函数说明

◆ DocInclude()

DocInclude::DocInclude ( DocParser parser,
DocNode parent,
const QCString file,
const QCString context,
Type  t,
bool  isExample,
const QCString exampleFile,
const QCString blockId,
bool  isBlock 
)
inline

在文件 docparser.h569 行定义.

引用了 DocNode::m_parent , 以及 DocNode::parent().

成员函数说明

◆ accept()

void DocInclude::accept ( DocVisitor v)
inlineoverridevirtual

Acceptor function for node visitors. Part of the visitor pattern.

参数
vAbstract visitor.

实现了 DocNode.

在文件 docparser.h591 行定义.

591 { v->visit(this); }

引用了 DocVisitor::visit().

◆ blockId()

QCString DocInclude::blockId ( ) const
inline

◆ context()

QCString DocInclude::context ( ) const
inline

◆ exampleFile()

QCString DocInclude::exampleFile ( ) const
inline

◆ extension()

QCString DocInclude::extension ( ) const
inline

在文件 docparser.h578 行定义.

578  { int i=m_file.findRev('.');
579  if (i!=-1)
580  return m_file.right(m_file.length()-(uint)i);
581  else
582  return QCString();
583  }

引用了 QCString::findRev(), QCString::length(), m_file , 以及 QCString::right().

被这些函数引用 HtmlDocVisitor::visit(), DocbookDocVisitor::visit(), LatexDocVisitor::visit(), ManDocVisitor::visit(), RTFDocVisitor::visit() , 以及 XmlDocVisitor::visit().

◆ file()

QCString DocInclude::file ( ) const
inline

◆ isBlock()

bool DocInclude::isBlock ( ) const
inline

在文件 docparser.h590 行定义.

590 { return m_isBlock; }

引用了 m_isBlock.

被这些函数引用 HtmlDocVisitor::visit() , 以及 XmlDocVisitor::visit().

◆ isExample()

bool DocInclude::isExample ( ) const
inline

◆ kind()

Kind DocInclude::kind ( ) const
inlineoverridevirtual

Returns the kind of node. Provides runtime type information

实现了 DocNode.

在文件 docparser.h576 行定义.

576 { return Kind_Include; }

引用了 DocNode::Kind_Include.

被这些函数引用 isInvisibleNode().

◆ parse()

void DocInclude::parse ( )

在文件 docparser.cpp1925 行定义.

1926 {
1927  DBG(("DocInclude::parse(file=%s,text=%s)\n",qPrint(m_file),qPrint(m_text)));
1928  switch(m_type)
1929  {
1930  case DontIncWithLines:
1931  // fall through
1932  case IncWithLines:
1933  // fall through
1934  case Include:
1935  // fall through
1936  case DontInclude:
1944  //printf("parser.context.includeFile=<<%s>>\n",qPrint(parser.context.includeFileText));
1945  break;
1946  case VerbInclude:
1947  // fall through
1948  case HtmlInclude:
1949  case LatexInclude:
1955  break;
1956  case Snippet:
1957  case SnipWithLines:
1959  // check here for the existence of the blockId inside the file, so we
1960  // only generate the warning once.
1961  int count;
1962  if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
1963  {
1964  warn_doc_error(m_parser.context.fileName,m_parser.tokenizer.getLineNr(),"block marked with %s for \\snippet should appear twice in file %s, found it %d times\n",
1965  qPrint(m_blockId),qPrint(m_file),count);
1966  }
1967  break;
1970  err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
1971  "Please create a bug report\n",__FILE__);
1972  break;
1973  }
1974 }

引用了 QCString::contains(), DocParser::context, QCString::data(), DBG, DocbookInclude, DontInclude, DontIncWithLines, err(), DocParserContext::fileName, DocTokenizer::getLineNr(), HtmlInclude, Include, IncludeDoc, DocParserContext::includeFileLength, DocParserContext::includeFileLine, DocParserContext::includeFileName, DocParserContext::includeFileOffset, DocParserContext::includeFileShowLineNo, DocParserContext::includeFileText, IncWithLines, QCString::isEmpty(), LatexInclude, QCString::length(), m_blockId, m_file, DocNode::m_parser, m_text, m_type, ManInclude, qPrint(), DocParser::readTextFileByName(), RtfInclude, Snippet, SnippetDoc, SnipWithLines, DocParser::tokenizer, VerbInclude, warn_doc_error() , 以及 XmlInclude.

被这些函数引用 DocPara::handleInclude().

◆ text()

QCString DocInclude::text ( ) const
inline

◆ type()

类成员变量说明

◆ m_blockId

QCString DocInclude::m_blockId
private

在文件 docparser.h602 行定义.

被这些函数引用 blockId() , 以及 parse().

◆ m_context

QCString DocInclude::m_context
private

在文件 docparser.h596 行定义.

被这些函数引用 context().

◆ m_exampleFile

QCString DocInclude::m_exampleFile
private

在文件 docparser.h601 行定义.

被这些函数引用 exampleFile().

◆ m_file

QCString DocInclude::m_file
private

在文件 docparser.h595 行定义.

被这些函数引用 extension(), file() , 以及 parse().

◆ m_isBlock

bool DocInclude::m_isBlock
private

在文件 docparser.h600 行定义.

被这些函数引用 isBlock().

◆ m_isExample

bool DocInclude::m_isExample
private

在文件 docparser.h599 行定义.

被这些函数引用 isExample().

◆ m_text

QCString DocInclude::m_text
private

在文件 docparser.h597 行定义.

被这些函数引用 parse() , 以及 text().

◆ m_type

Type DocInclude::m_type
private

在文件 docparser.h598 行定义.

被这些函数引用 parse() , 以及 type().


该类的文档由以下文件生成:
DocInclude::HtmlInclude
@ HtmlInclude
Definition: docparser.h:566
DocParser::context
DocParserContext context
Definition: docparser.cpp:175
DocInclude::m_isExample
bool m_isExample
Definition: docparser.h:599
DocVisitor::visit
virtual void visit(DocWord *)=0
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
DocNode::Kind_Include
@ Kind_Include
Definition: docparser.h:131
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:86
DocInclude::m_context
QCString m_context
Definition: docparser.h:596
DocInclude::Snippet
@ Snippet
Definition: docparser.h:567
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
DocInclude::isExample
bool isExample() const
Definition: docparser.h:588
DocInclude::XmlInclude
@ XmlInclude
Definition: docparser.h:568
DocParserContext::includeFileShowLineNo
bool includeFileShowLineNo
Definition: docparser.cpp:127
DocParser::tokenizer
DocTokenizer tokenizer
Definition: docparser.cpp:176
DocInclude::IncludeDoc
@ IncludeDoc
Definition: docparser.h:567
warn_doc_error
void warn_doc_error(const QCString &file, int line, const char *fmt,...)
Definition: message.cpp:186
DocInclude::m_file
QCString m_file
Definition: docparser.h:595
err
void err(const char *fmt,...)
Definition: message.cpp:203
DocInclude::DocbookInclude
@ DocbookInclude
Definition: docparser.h:568
DocInclude::DontInclude
@ DontInclude
Definition: docparser.h:566
DocInclude::VerbInclude
@ VerbInclude
Definition: docparser.h:566
QCString::contains
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:138
DocParserContext::includeFileLine
int includeFileLine
Definition: docparser.cpp:126
uint
unsigned uint
Definition: qcstring.h:40
DocParserContext::fileName
QCString fileName
Definition: docparser.cpp:110
DocInclude::file
QCString file() const
Definition: docparser.h:577
DocParserContext::includeFileOffset
uint includeFileOffset
Definition: docparser.cpp:124
DocInclude::SnipWithLines
@ SnipWithLines
Definition: docparser.h:567
DocInclude::m_type
Type m_type
Definition: docparser.h:598
DocNode::m_parser
DocParser & m_parser
Definition: docparser.h:184
DocInclude::m_blockId
QCString m_blockId
Definition: docparser.h:602
DocTokenizer::getLineNr
int getLineNr(void)
DocInclude::m_isBlock
bool m_isBlock
Definition: docparser.h:600
DocInclude::IncWithLines
@ IncWithLines
Definition: docparser.h:567
DocInclude::isBlock
bool isBlock() const
Definition: docparser.h:590
DocParserContext::includeFileLength
uint includeFileLength
Definition: docparser.cpp:125
DocInclude::RtfInclude
@ RtfInclude
Definition: docparser.h:568
DocInclude::SnippetDoc
@ SnippetDoc
Definition: docparser.h:567
DocInclude::LatexInclude
@ LatexInclude
Definition: docparser.h:566
DocInclude::m_exampleFile
QCString m_exampleFile
Definition: docparser.h:601
DocInclude::Include
@ Include
Definition: docparser.h:566
DocParserContext::includeFileName
QCString includeFileName
Definition: docparser.cpp:122
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
DocInclude::blockId
QCString blockId() const
Definition: docparser.h:587
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string
Definition: qcstring.h:153
DocParserContext::includeFileText
QCString includeFileText
Definition: docparser.cpp:123
DocInclude::DontIncWithLines
@ DontIncWithLines
Definition: docparser.h:568
DocParser::readTextFileByName
void readTextFileByName(const QCString &file, QCString &text)
Definition: docparser.cpp:1785
DocNode::DocNode
DocNode(DocParser &parser)
Definition: docparser.h:157
DocNode::parent
DocNode * parent() const
Definition: docparser.h:166
DBG
#define DBG(x)
Definition: docparser.cpp:58
DocInclude::ManInclude
@ ManInclude
Definition: docparser.h:568
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
DocNode::m_parent
DocNode * m_parent
Definition: docparser.h:182
DocInclude::exampleFile
QCString exampleFile() const
Definition: docparser.h:589
DocInclude::m_text
QCString m_text
Definition: docparser.h:597
DocInclude::context
QCString context() const
Definition: docparser.h:586
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108