Skip to main content

DocInclude Class

Node representing an included text block from file. More...

Declaration​

class DocInclude { ... }

Included Headers​

#include <src/docnode.h>

Base class​

classDocNode

Abstract node interface with type information. More...

Enumerations Index​

enumType { ... }

Public Constructors Index​

DocInclude (DocParser *parser, DocNodeVariant *parent, const QCString &file, const QCString &context, Type t, bool stripCodeComments, bool isExample, const QCString &exampleFile, const QCString &blockId, bool isBlock, bool trimLeft)

Public Member Functions Index​

QCStringfile () const
QCStringextension () const
Typetype () const
QCStringtext () const
QCStringcontext () const
QCStringblockId () const
boolstripCodeComments () const
boolisExample () const
QCStringexampleFile () const
boolisBlock () const
booltrimLeft () const
voidparse ()

Private Member Attributes Index​

QCStringm_file
QCStringm_context
QCStringm_text
Typem_type
boolm_stripCodeComments
boolm_isExample
boolm_isBlock
boolm_trimLeft
QCStringm_exampleFile
QCStringm_blockId

Description​

Node representing an included text block from file.

Definition at line 434 of file docnode.h.

Enumerations​

Type​

enum DocInclude::Type
Enumeration values
Include
DontInclude
VerbInclude
HtmlInclude
LatexInclude
IncWithLines
Snippet
SnippetWithLines
DontIncWithLines
RtfInclude
ManInclude
DocbookInclude
XmlInclude

Definition at line 437 of file docnode.h.

Public Constructors​

DocInclude()​

DocInclude::DocInclude (DocParser * parser, DocNodeVariant * parent, const QCString & file, const QCString & context, Type t, bool stripCodeComments, bool isExample, const QCString & exampleFile, const QCString & blockId, bool isBlock, bool trimLeft)
inline

Public Member Functions​

blockId()​

context()​

exampleFile()​

extension()​

QCString DocInclude::extension ()
inline

file()​

isBlock()​

bool DocInclude::isBlock ()
inline

Definition at line 458 of file docnode.h.

458 bool isBlock() const { return m_isBlock; }

Reference m_isBlock.

Referenced by DocInclude, HtmlDocVisitor::operator(), PrintDocVisitor::operator() and XmlDocVisitor::operator().

isExample()​

bool DocInclude::isExample ()
inline

parse()​

void DocInclude::parse ()

Declaration at line 460 of file docnode.h, definition at line 268 of file docnode.cpp.

269{
270 AUTO_TRACE("file={} text={}",m_file,Trace::trunc(m_text));
271 switch(m_type)
272 {
274 // fall through
275 case IncWithLines:
276 // fall through
277 case Include:
278 // fall through
279 case DontInclude:
288 //printf("parser->context.includeFile=<<%s>>\n",qPrint(parser->context.includeFileText));
289 break;
290 case VerbInclude:
291 // fall through
292 case HtmlInclude:
293 case LatexInclude:
299 break;
300 case Snippet:
303 // check here for the existence of the blockId inside the file, so we
304 // only generate the warning once.
305 int count = 0;
306 if (!m_blockId.isEmpty() && (count=m_text.contains(m_blockId.data()))!=2)
307 {
308 warn_doc_error(parser()->context.fileName,
309 parser()->tokenizer.getLineNr(),
310 "block marked with {} for \\snippet should appear twice in file {}, found it {:d} times",
311 m_blockId,m_file,count);
312 }
313 break;
314 }
315}

References AUTO_TRACE, context, DocParser::context, DocbookInclude, DontInclude, DontIncWithLines, HtmlInclude, Include, DocParserContext::includeFileLength, DocParserContext::includeFileLine, DocParserContext::includeFileName, DocParserContext::includeFileOffset, DocParserContext::includeFileShowLineNo, DocParserContext::includeFileText, IncWithLines, LatexInclude, m_blockId, m_file, m_stripCodeComments, m_text, m_type, ManInclude, DocNode::parser, DocParser::readTextFileByName, RtfInclude, Snippet, SnippetWithLines, DocParserContext::stripCodeComments, Trace::trunc, VerbInclude, warn_doc_error and XmlInclude.

stripCodeComments()​

text()​

trimLeft()​

bool DocInclude::trimLeft ()
inline

type()​

Private Member Attributes​

m_blockId​

QCString DocInclude::m_blockId

Definition at line 472 of file docnode.h.

Referenced by blockId, DocInclude and parse.

m_context​

QCString DocInclude::m_context

Definition at line 464 of file docnode.h.

Referenced by context and DocInclude.

m_exampleFile​

QCString DocInclude::m_exampleFile

Definition at line 471 of file docnode.h.

Referenced by DocInclude and exampleFile.

m_file​

QCString DocInclude::m_file

Definition at line 463 of file docnode.h.

Referenced by DocInclude, extension, file and parse.

m_isBlock​

bool DocInclude::m_isBlock

Definition at line 469 of file docnode.h.

Referenced by DocInclude and isBlock.

m_isExample​

bool DocInclude::m_isExample

Definition at line 468 of file docnode.h.

Referenced by DocInclude and isExample.

m_stripCodeComments​

bool DocInclude::m_stripCodeComments

Definition at line 467 of file docnode.h.

Referenced by DocInclude, parse and stripCodeComments.

m_text​

QCString DocInclude::m_text

Definition at line 465 of file docnode.h.

Referenced by parse and text.

m_trimLeft​

bool DocInclude::m_trimLeft

Definition at line 470 of file docnode.h.

Referenced by DocInclude and trimLeft.

m_type​

Type DocInclude::m_type

Definition at line 466 of file docnode.h.

Referenced by DocInclude, parse and type.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.14.0.