docparser.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  * Documents produced by Doxygen are derivative works derived from the
15  * input used in their production; they are not affected by this license.
16  *
17  */
18 
19 #ifndef _DOCPARSER_H
20 #define _DOCPARSER_H
21 
22 #include <stdio.h>
23 
24 #include <qlist.h>
25 #include <qcstring.h>
26 
27 #include "docvisitor.h"
28 #include "htmlattrib.h"
29 
30 class DocNode;
31 class MemberDef;
32 class Definition;
33 class MemberGroup;
34 class SectionDict;
35 
36 //---------------------------------------------------------------------------
37 
38 
39 /*! Main entry point for the documentation parser.
40  * @param fileName File in which the documentation block is found (or the
41  * name of the example file in case isExample is TRUE).
42  * @param startLine Line at which the documentation block is found.
43  * @param context Class or namespace to which this block belongs.
44  * @param md Member definition to which the documentation belongs.
45  * Can be 0.
46  * @param input String representation of the documentation block.
47  * @param indexWords Indicates whether or not words should be put in the
48  * search index.
49  * @param isExample TRUE if the documentation belongs to an example.
50  * @param exampleName Base name of the example file (0 if isExample is FALSE).
51  * @param singleLine Output should be presented on a single line, so without
52  * starting a new paragraph at the end.
53  * @param linkFromIndex TRUE if the documentation is generated from an
54  * index page. In this case context is not used to determine
55  * the relative path when making a link.
56  * @returns Root node of the abstract syntax tree. Ownership of the
57  * pointer is handed over to the caller.
58  */
59 DocRoot *validatingParseDoc(const char *fileName,int startLine,
60  Definition *context, MemberDef *md,
61  const char *input,bool indexWords,
62  bool isExample,const char *exampleName=0,
63  bool singleLine=FALSE,bool linkFromIndex=FALSE);
64 
65 /*! Main entry point for parsing simple text fragments. These
66  * fragments are limited to words, whitespace and symbols.
67  */
68 DocText *validatingParseText(const char *input);
69 
70 /*! Searches for section and anchor commands in the input */
71 void docFindSections(const char *input,
72  Definition *d,
73  MemberGroup *m,
74  const char *fileName);
75 
76 //---------------------------------------------------------------------------
77 
78 /** Abstract node interface with type information. */
79 class DocNode
80 {
81  public:
82  /*! Available node types. */
83  enum Kind { Kind_Root = 0,
84  Kind_Word = 1,
86  Kind_Para = 3,
90  Kind_URL = 7,
93  Kind_Title = 10,
113  Kind_HRef = 30,
119  Kind_Link = 36,
120  Kind_Ref = 37,
129  Kind_Copy = 46,
130  Kind_Text = 47,
136  };
137  /*! Creates a new node */
139 
140  /*! Destroys a node. */
141  virtual ~DocNode() {}
142 
143  /*! Returns the kind of node. Provides runtime type information */
144  virtual Kind kind() const = 0;
145 
146  /*! Returns the parent of this node or 0 for the root node. */
147  DocNode *parent() const { return m_parent; }
148 
149  /*! Sets a new parent for this node. */
151 
152  /*! Acceptor function for node visitors. Part of the visitor pattern.
153  * @param v Abstract visitor.
154  */
155  virtual void accept(DocVisitor *v) = 0;
156 
157  /*! Returns TRUE iff this node is inside a preformatted section */
158  bool isPreformatted() const { return m_insidePre; }
159 
160  protected:
161  /*! Sets whether or not this item is inside a preformatted section */
164  private:
165 
167 };
168 
169 /** Default accept implementation for compound nodes in the abstract
170  * syntax tree.
171  */
172 template<class T> class CompAccept
173 {
174  public:
175  CompAccept() { m_children.setAutoDelete(TRUE); }
176  virtual ~CompAccept() {}
177  void accept(T *obj, DocVisitor *v)
178  {
179  v->visitPre(obj);
180  QListIterator<DocNode> cli(m_children);
181  DocNode *n;
182  for (cli.toFirst();(n=cli.current());++cli) n->accept(v);
183  v->visitPost(obj);
184  }
185  const QList<DocNode> &children() const { return m_children; }
186  QList<DocNode> &children() { return m_children; }
187 
188  protected:
190 };
191 
192 
193 /** Node representing a word
194  */
195 class DocWord : public DocNode
196 {
197  public:
199  QCString word() const { return m_word; }
200  Kind kind() const { return Kind_Word; }
201  void accept(DocVisitor *v) { v->visit(this); }
202 
203  private:
205 };
206 
207 /** Node representing a word that can be linked to something
208  */
209 class DocLinkedWord : public DocNode
210 {
211  public:
213  const QCString &ref,const QCString &file,
214  const QCString &anchor,const QCString &tooltip);
215  QCString word() const { return m_word; }
216  Kind kind() const { return Kind_LinkedWord; }
217  QCString file() const { return m_file; }
218  QCString relPath() const { return m_relPath; }
219  QCString ref() const { return m_ref; }
220  QCString anchor() const { return m_anchor; }
221  QCString tooltip() const { return m_tooltip; }
222  void accept(DocVisitor *v) { v->visit(this); }
223 
224  private:
231 };
232 
233 /** Node representing an URL (or email address) */
234 class DocURL : public DocNode
235 {
236  public:
237  DocURL(DocNode *parent,const QCString &url,bool isEmail) :
238  m_url(url), m_isEmail(isEmail) { m_parent=parent; }
239  QCString url() const { return m_url; }
240  Kind kind() const { return Kind_URL; }
241  void accept(DocVisitor *v) { v->visit(this); }
242  bool isEmail() const { return m_isEmail; }
243 
244  private:
246  bool m_isEmail;
247 };
248 
249 /** Node representing a line break */
250 class DocLineBreak : public DocNode
251 {
252  public:
254  Kind kind() const { return Kind_LineBreak; }
255  void accept(DocVisitor *v) { v->visit(this); }
256 
257  private:
258 };
259 
260 /** Node representing a horizonal ruler */
261 class DocHorRuler : public DocNode
262 {
263  public:
265  Kind kind() const { return Kind_HorRuler; }
266  void accept(DocVisitor *v) { v->visit(this); }
267 
268  private:
269 };
270 
271 /** Node representing an anchor */
272 class DocAnchor : public DocNode
273 {
274  public:
275  DocAnchor(DocNode *parent,const QCString &id,bool newAnchor);
276  Kind kind() const { return Kind_Anchor; }
277  QCString anchor() const { return m_anchor; }
278  QCString file() const { return m_file; }
279  void accept(DocVisitor *v) { v->visit(this); }
280 
281  private:
284 };
285 
286 /** Node representing a citation of some bibliographic reference */
287 class DocCite : public DocNode
288 {
289  public:
290  DocCite(DocNode *parent,const QCString &target,const QCString &context);
291  Kind kind() const { return Kind_Ref; }
292  QCString file() const { return m_file; }
293  QCString relPath() const { return m_relPath; }
294  QCString ref() const { return m_ref; }
295  QCString anchor() const { return m_anchor; }
296  QCString text() const { return m_text; }
297  void accept(DocVisitor *v) { v->visit(this); }
298 
299  private:
305 };
306 
307 
308 /** Node representing a style change */
309 class DocStyleChange : public DocNode
310 {
311  public:
312  enum Style { Bold = (1<<0),
313  Italic = (1<<1),
314  Code = (1<<2),
315  Center = (1<<3),
316  Small = (1<<4),
317  Subscript = (1<<5),
318  Superscript = (1<<6),
319  Preformatted = (1<<7),
320  Span = (1<<8),
321  Div = (1<<9)
322  };
323 
325  const HtmlAttribList *attribs=0) :
326  m_position(position), m_style(s), m_enable(enable)
327  { m_parent = parent; if (attribs) m_attribs=*attribs; }
328  Kind kind() const { return Kind_StyleChange; }
329  Style style() const { return m_style; }
330  const char *styleString() const;
331  bool enable() const { return m_enable; }
332  uint position() const { return m_position; }
333  void accept(DocVisitor *v) { v->visit(this); }
334  const HtmlAttribList &attribs() const { return m_attribs; }
335 
336  private:
339  bool m_enable;
341 };
342 
343 /** Node representing a special symbol */
344 class DocSymbol : public DocNode
345 {
346  public:
347  enum SymType { Sym_Unknown = -1,
348  Sym_nbsp, Sym_iexcl, Sym_cent, Sym_pound, Sym_curren,
349  Sym_yen, Sym_brvbar, Sym_sect, Sym_uml, Sym_copy,
350  Sym_ordf, Sym_laquo, Sym_not, Sym_shy, Sym_reg,
351  Sym_macr, Sym_deg, Sym_plusmn, Sym_sup2, Sym_sup3,
352  Sym_acute, Sym_micro, Sym_para, Sym_middot, Sym_cedil,
353  Sym_sup1, Sym_ordm, Sym_raquo, Sym_frac14, Sym_frac12,
354  Sym_frac34, Sym_iquest, Sym_Agrave, Sym_Aacute, Sym_Acirc,
355  Sym_Atilde, Sym_Auml, Sym_Aring, Sym_AElig, Sym_Ccedil,
356  Sym_Egrave, Sym_Eacute, Sym_Ecirc, Sym_Euml, Sym_Igrave,
357  Sym_Iacute, Sym_Icirc, Sym_Iuml, Sym_ETH, Sym_Ntilde,
358  Sym_Ograve, Sym_Oacute, Sym_Ocirc, Sym_Otilde, Sym_Ouml,
359  Sym_times, Sym_Oslash, Sym_Ugrave, Sym_Uacute, Sym_Ucirc,
360  Sym_Uuml, Sym_Yacute, Sym_THORN, Sym_szlig, Sym_agrave,
361  Sym_aacute, Sym_acirc, Sym_atilde, Sym_auml, Sym_aring,
362  Sym_aelig, Sym_ccedil, Sym_egrave, Sym_eacute, Sym_ecirc,
363  Sym_euml, Sym_igrave, Sym_iacute, Sym_icirc, Sym_iuml,
364  Sym_eth, Sym_ntilde, Sym_ograve, Sym_oacute, Sym_ocirc,
365  Sym_otilde, Sym_ouml, Sym_divide, Sym_oslash, Sym_ugrave,
366  Sym_uacute, Sym_ucirc, Sym_uuml, Sym_yacute, Sym_thorn,
367  Sym_yuml, Sym_fnof, Sym_Alpha, Sym_Beta, Sym_Gamma,
368  Sym_Delta, Sym_Epsilon, Sym_Zeta, Sym_Eta, Sym_Theta,
369  Sym_Iota, Sym_Kappa, Sym_Lambda, Sym_Mu, Sym_Nu,
370  Sym_Xi, Sym_Omicron, Sym_Pi, Sym_Rho, Sym_Sigma,
371  Sym_Tau, Sym_Upsilon, Sym_Phi, Sym_Chi, Sym_Psi,
372  Sym_Omega, Sym_alpha, Sym_beta, Sym_gamma, Sym_delta,
373  Sym_epsilon, Sym_zeta, Sym_eta, Sym_theta, Sym_iota,
374  Sym_kappa, Sym_lambda, Sym_mu, Sym_nu, Sym_xi,
375  Sym_omicron, Sym_pi, Sym_rho, Sym_sigmaf, Sym_sigma,
376  Sym_tau, Sym_upsilon, Sym_phi, Sym_chi, Sym_psi,
377  Sym_omega, Sym_thetasym, Sym_upsih, Sym_piv, Sym_bull,
378  Sym_hellip, Sym_prime, Sym_Prime, Sym_oline, Sym_frasl,
379  Sym_weierp, Sym_image, Sym_real, Sym_trade, Sym_alefsym,
380  Sym_larr, Sym_uarr, Sym_rarr, Sym_darr, Sym_harr,
381  Sym_crarr, Sym_lArr, Sym_uArr, Sym_rArr, Sym_dArr,
382  Sym_hArr, Sym_forall, Sym_part, Sym_exist, Sym_empty,
383  Sym_nabla, Sym_isin, Sym_notin, Sym_ni, Sym_prod,
384  Sym_sum, Sym_minus, Sym_lowast, Sym_radic, Sym_prop,
385  Sym_infin, Sym_ang, Sym_and, Sym_or, Sym_cap,
386  Sym_cup, Sym_int, Sym_there4, Sym_sim, Sym_cong,
387  Sym_asymp, Sym_ne, Sym_equiv, Sym_le, Sym_ge,
388  Sym_sub, Sym_sup, Sym_nsub, Sym_sube, Sym_supe,
389  Sym_oplus, Sym_otimes, Sym_perp, Sym_sdot, Sym_lceil,
390  Sym_rceil, Sym_lfloor, Sym_rfloor, Sym_lang, Sym_rang,
391  Sym_loz, Sym_spades, Sym_clubs, Sym_hearts, Sym_diams,
392  Sym_quot, Sym_amp, Sym_lt, Sym_gt, Sym_OElig,
393  Sym_oelig, Sym_Scaron, Sym_scaron, Sym_Yuml, Sym_circ,
394  Sym_tilde, Sym_ensp, Sym_emsp, Sym_thinsp, Sym_zwnj,
395  Sym_zwj, Sym_lrm, Sym_rlm, Sym_ndash, Sym_mdash,
396  Sym_lsquo, Sym_rsquo, Sym_sbquo, Sym_ldquo, Sym_rdquo,
397  Sym_bdquo, Sym_dagger, Sym_Dagger, Sym_permil, Sym_lsaquo,
398  Sym_rsaquo, Sym_euro,
399 
400  /* doxygen extensions */
401  Sym_tm, Sym_apos,
402 
403  /* doxygen commands mapped */
404  Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp,
405  Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe,
406  Sym_Quot, Sym_Minus, Sym_Plus, Sym_Dot
407  };
408  enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut,
409  Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde,
410  Perl_cedilla, Perl_ring
411  };
412  typedef struct PerlSymb {
413  const char *symb;
414  const PerlType type;
415  }PerlSymb;
417  m_symbol(s) { m_parent = parent; }
418  SymType symbol() const { return m_symbol; }
419  Kind kind() const { return Kind_Symbol; }
420  void accept(DocVisitor *v) { v->visit(this); }
421  static SymType decodeSymbol(const QCString &symName);
422 
423  private:
425 };
426 
427 /** Node representing some amount of white space */
428 class DocWhiteSpace : public DocNode
429 {
430  public:
432  m_chars(chars) { m_parent = parent; }
433  Kind kind() const { return Kind_WhiteSpace; }
434  QCString chars() const { return m_chars; }
435  void accept(DocVisitor *v) { v->visit(this); }
436  private:
438 };
439 
440 /** Node representing a verbatim, unparsed text fragment */
441 class DocVerbatim : public DocNode
442 {
443  public:
444  enum Type { Code, HtmlOnly, ManOnly, LatexOnly, RtfOnly, XmlOnly, Verbatim, Dot, Msc, DocbookOnly, PlantUML };
445  DocVerbatim(DocNode *parent,const QCString &context,
446  const QCString &text, Type t,bool isExample,
447  const QCString &exampleFile,bool isBlock=FALSE,const QCString &lang=QCString());
448  Kind kind() const { return Kind_Verbatim; }
449  Type type() const { return m_type; }
450  QCString text() const { return m_text; }
451  QCString context() const { return m_context; }
452  void accept(DocVisitor *v) { v->visit(this); }
453  bool isExample() const { return m_isExample; }
454  QCString exampleFile() const { return m_exampleFile; }
455  QCString relPath() const { return m_relPath; }
456  QCString language() const { return m_lang; }
457  bool isBlock() const { return m_isBlock; }
458  bool hasCaption() const { return !m_children.isEmpty(); }
459  QCString width() const { return m_width; }
460  QCString height() const { return m_height; }
461  const QList<DocNode> &children() const { return m_children; }
462  QList<DocNode> &children() { return m_children; }
463  void setText(const QCString &t) { m_text=t; }
464  void setWidth(const QCString &w) { m_width=w; }
465  void setHeight(const QCString &h) { m_height=h; }
466 
467  private:
475  bool m_isBlock;
479 };
480 
481 
482 /** Node representing an included text block from file */
483 class DocInclude : public DocNode
484 {
485  public:
486  enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude, IncWithLines, Snippet };
488  const QCString context, Type t,
489  bool isExample,const QCString exampleFile,
490  const QCString blockId) :
491  m_file(file), m_context(context), m_type(t),
492  m_isExample(isExample), m_exampleFile(exampleFile),
493  m_blockId(blockId) { m_parent = parent; }
494  Kind kind() const { return Kind_Include; }
495  QCString file() const { return m_file; }
496  QCString extension() const { int i=m_file.findRev('.');
497  if (i!=-1)
498  return m_file.right(m_file.length()-i);
499  else
500  return "";
501  }
502  Type type() const { return m_type; }
503  QCString text() const { return m_text; }
504  QCString context() const { return m_context; }
505  QCString blockId() const { return m_blockId; }
506  bool isExample() const { return m_isExample; }
507  QCString exampleFile() const { return m_exampleFile; }
508  void accept(DocVisitor *v) { v->visit(this); }
509  void parse();
510 
511  private:
519 };
520 
521 /** Node representing a include/dontinclude operator block */
522 class DocIncOperator : public DocNode
523 {
524  public:
525  enum Type { Line, SkipLine, Skip, Until };
527  const QCString &context,bool isExample,const QCString &exampleFile) :
528  m_type(t), m_pattern(pat), m_context(context),
529  m_isFirst(FALSE), m_isLast(FALSE),
530  m_isExample(isExample), m_exampleFile(exampleFile) { m_parent = parent; }
531  Kind kind() const { return Kind_IncOperator; }
532  Type type() const { return m_type; }
533  QCString text() const { return m_text; }
534  QCString pattern() const { return m_pattern; }
535  QCString context() const { return m_context; }
536  void accept(DocVisitor *v) { v->visit(this); }
537  bool isFirst() const { return m_isFirst; }
538  bool isLast() const { return m_isLast; }
539  void markFirst(bool v=TRUE) { m_isFirst = v; }
540  void markLast(bool v=TRUE) { m_isLast = v; }
541  bool isExample() const { return m_isExample; }
542  QCString exampleFile() const { return m_exampleFile; }
543  void parse();
544 
545  private:
550  bool m_isFirst;
551  bool m_isLast;
554 };
555 
556 /** Node representing an item of a cross-referenced list */
557 class DocFormula : public DocNode
558 {
559  public:
560  DocFormula(DocNode *parent,int id);
561  Kind kind() const { return Kind_Formula; }
562  QCString name() const { return m_name; }
563  QCString text() const { return m_text; }
564  QCString relPath() const { return m_relPath; }
565  int id() const { return m_id; }
566  void accept(DocVisitor *v) { v->visit(this); }
567  bool isInline() { return m_text.length()>0 ? m_text.at(0)!='\\' : TRUE; }
568 
569  private:
573  int m_id;
574 };
575 
576 /** Node representing an entry in the index. */
577 class DocIndexEntry : public DocNode
578 {
579  public:
581  : m_scope(scope), m_member(md){ m_parent = parent; }
582  Kind kind() const { return Kind_IndexEntry; }
583  int parse();
584  Definition *scope() const { return m_scope; }
585  MemberDef *member() const { return m_member; }
586  QCString entry() const { return m_entry; }
587  void accept(DocVisitor *v) { v->visit(this); }
588 
589  private:
593 };
594 
595 //-----------------------------------------------------------------------
596 
597 /** Node representing a copy of documentation block. */
598 class DocCopy : public DocNode
599 {
600  public:
601  DocCopy(DocNode *parent,const QCString &link,bool copyBrief,bool copyDetails)
602  : m_link(link),
603  m_copyBrief(copyBrief), m_copyDetails(copyDetails) { m_parent = parent; }
604  Kind kind() const { return Kind_Copy; }
605  QCString link() const { return m_link; }
606  void accept(DocVisitor * /*v*/) { /*CompAccept<DocCopy>::accept(this,v);*/ }
607  void parse(QList<DocNode> &children);
608 
609  private:
613 };
614 
615 /** Node representing an auto List */
616 class DocAutoList : public CompAccept<DocAutoList>, public DocNode
617 {
618  public:
619  DocAutoList(DocNode *parent,int indent,bool isEnumList,int depth);
620  Kind kind() const { return Kind_AutoList; }
621  bool isEnumList() const { return m_isEnumList; }
622  int indent() const { return m_indent; }
623  int depth() const { return m_depth; }
625  int parse();
626 
627  private:
628  int m_indent;
630  int m_depth;
631 };
632 
633 /** Node representing an item of a auto list */
634 class DocAutoListItem : public CompAccept<DocAutoListItem>, public DocNode
635 {
636  public:
638  Kind kind() const { return Kind_AutoListItem; }
639  int itemNumber() const { return m_itemNum; }
641  int parse();
642 
643  private:
644  int m_indent;
646 };
647 
648 
649 
650 /** Node representing a simple section title */
651 class DocTitle : public CompAccept<DocTitle>, public DocNode
652 {
653  public:
655  void parse();
656  void parseFromString(const QCString &title);
657  Kind kind() const { return Kind_Title; }
659 
660  private:
661 };
662 
663 /** Node representing an item of a cross-referenced list */
664 class DocXRefItem : public CompAccept<DocXRefItem>, public DocNode
665 {
666  public:
667  DocXRefItem(DocNode *parent,int id,const char *key);
668  Kind kind() const { return Kind_XRefItem; }
669  QCString file() const { return m_file; }
670  QCString anchor() const { return m_anchor; }
671  QCString title() const { return m_title; }
672  QCString relPath() const { return m_relPath; }
673  QCString key() const { return m_key; }
675  bool parse();
676 
677  private:
678  int m_id;
684 };
685 
686 /** Node representing an image */
687 class DocImage : public CompAccept<DocImage>, public DocNode
688 {
689  public:
690  enum Type { Html, Latex, Rtf, DocBook };
691  DocImage(DocNode *parent,const HtmlAttribList &attribs,
692  const QCString &name,Type t,const QCString &url=QCString());
693  Kind kind() const { return Kind_Image; }
694  Type type() const { return m_type; }
695  QCString name() const { return m_name; }
696  bool hasCaption() const { return !m_children.isEmpty(); }
697  QCString width() const { return m_width; }
698  QCString height() const { return m_height; }
699  QCString relPath() const { return m_relPath; }
700  QCString url() const { return m_url; }
701  const HtmlAttribList &attribs() const { return m_attribs; }
703  void parse();
704 
705  private:
713 };
714 
715 /** Node representing a dot file */
716 class DocDotFile : public CompAccept<DocDotFile>, public DocNode
717 {
718  public:
719  DocDotFile(DocNode *parent,const QCString &name,const QCString &context);
720  void parse();
721  Kind kind() const { return Kind_DotFile; }
722  QCString name() const { return m_name; }
723  QCString file() const { return m_file; }
724  QCString relPath() const { return m_relPath; }
725  bool hasCaption() const { return !m_children.isEmpty(); }
726  QCString width() const { return m_width; }
727  QCString height() const { return m_height; }
728  QCString context() const { return m_context; }
730  private:
737 };
738 
739 /** Node representing a msc file */
740 class DocMscFile : public CompAccept<DocMscFile>, public DocNode
741 {
742  public:
743  DocMscFile(DocNode *parent,const QCString &name,const QCString &context);
744  void parse();
745  Kind kind() const { return Kind_MscFile; }
746  QCString name() const { return m_name; }
747  QCString file() const { return m_file; }
748  QCString relPath() const { return m_relPath; }
749  bool hasCaption() const { return !m_children.isEmpty(); }
750  QCString width() const { return m_width; }
751  QCString height() const { return m_height; }
752  QCString context() const { return m_context; }
754  private:
761 };
762 
763 /** Node representing a dia file */
764 class DocDiaFile : public CompAccept<DocDiaFile>, public DocNode
765 {
766  public:
767  DocDiaFile(DocNode *parent,const QCString &name,const QCString &context);
768  void parse();
769  Kind kind() const { return Kind_DiaFile; }
770  QCString name() const { return m_name; }
771  QCString file() const { return m_file; }
772  QCString relPath() const { return m_relPath; }
773  bool hasCaption() const { return !m_children.isEmpty(); }
774  QCString width() const { return m_width; }
775  QCString height() const { return m_height; }
776  QCString context() const { return m_context; }
778  private:
785 };
786 
787 /** Node representing a VHDL flow chart */
788 class DocVhdlFlow : public CompAccept<DocVhdlFlow>, public DocNode
789 {
790  public:
792  void parse();
793  Kind kind() const { return Kind_VhdlFlow; }
794  bool hasCaption() { return !m_children.isEmpty(); }
796  private:
797 };
798 
799 /** Node representing a link to some item */
800 class DocLink : public CompAccept<DocLink>, public DocNode
801 {
802  public:
804  QCString parse(bool,bool isXmlLink=FALSE);
805  Kind kind() const { return Kind_Link; }
806  QCString file() const { return m_file; }
807  QCString relPath() const { return m_relPath; }
808  QCString ref() const { return m_ref; }
809  QCString anchor() const { return m_anchor; }
811 
812  private:
818 };
819 
820 /** Node representing a reference to some item */
821 class DocRef : public CompAccept<DocRef>, public DocNode
822 {
823  public:
824  DocRef(DocNode *parent,const QCString &target,const QCString &context);
825  void parse();
826  Kind kind() const { return Kind_Ref; }
827  QCString file() const { return m_file; }
828  QCString relPath() const { return m_relPath; }
829  QCString ref() const { return m_ref; }
830  QCString anchor() const { return m_anchor; }
831  QCString targetTitle() const { return m_text; }
832  bool hasLinkText() const { return !m_children.isEmpty(); }
833  bool refToAnchor() const { return m_refType==Anchor; }
834  bool refToSection() const { return m_refType==Section; }
835  bool refToTable() const { return m_refType==Table; }
836  bool isSubPage() const { return m_isSubPage; }
838 
839  private:
840  enum RefType { Unknown, Anchor, Section, Table };
848 };
849 
850 /** Node representing an internal reference to some item */
851 class DocInternalRef : public CompAccept<DocInternalRef>, public DocNode
852 {
853  public:
855  void parse();
856  Kind kind() const { return Kind_Ref; }
857  QCString file() const { return m_file; }
858  QCString relPath() const { return m_relPath; }
859  QCString anchor() const { return m_anchor; }
861 
862  private:
866 };
867 
868 /** Node representing a Hypertext reference */
869 class DocHRef : public CompAccept<DocHRef>, public DocNode
870 {
871  public:
873  const QCString &relPath) :
874  m_attribs(attribs), m_url(url), m_relPath(relPath) { m_parent = parent; }
875  int parse();
876  QCString url() const { return m_url; }
877  QCString relPath() const { return m_relPath; }
878  Kind kind() const { return Kind_HRef; }
880  const HtmlAttribList &attribs() const { return m_attribs; }
881 
882  private:
886 };
887 
888 /** Node Html heading */
889 class DocHtmlHeader : public CompAccept<DocHtmlHeader>, public DocNode
890 {
891  public:
893  m_level(level), m_attribs(attribs) { m_parent = parent; }
894  int level() const { return m_level; }
895  Kind kind() const { return Kind_HtmlHeader; }
896  const HtmlAttribList &attribs() const { return m_attribs; }
898  int parse();
899 
900  private:
901  int m_level;
903 };
904 
905 /** Node representing a Html description item */
906 class DocHtmlDescTitle : public CompAccept<DocHtmlDescTitle>, public DocNode
907 {
908  public:
910  m_attribs(attribs) { m_parent = parent; }
911  Kind kind() const { return Kind_HtmlDescTitle; }
912  const HtmlAttribList &attribs() const { return m_attribs; }
914  int parse();
915 
916  private:
918 };
919 
920 /** Node representing a Html description list */
921 class DocHtmlDescList : public CompAccept<DocHtmlDescList>, public DocNode
922 {
923  public:
925  m_attribs(attribs) { m_parent = parent; }
926  Kind kind() const { return Kind_HtmlDescList; }
927  const HtmlAttribList &attribs() const { return m_attribs; }
929  int parse();
930 
931  private:
933 };
934 
935 /** Node representing a normal section */
936 class DocSection : public CompAccept<DocSection>, public DocNode
937 {
938  public:
940  m_level(level), m_id(id) { m_parent = parent; }
941  Kind kind() const { return Kind_Section; }
942  int level() const { return m_level; }
943  QCString title() const { return m_title; }
944  QCString anchor() const { return m_anchor; }
945  QCString id() const { return m_id; }
946  QCString file() const { return m_file; }
948  int parse();
949 
950  private:
951  int m_level;
956 };
957 
958 /** Node representing a reference to a section */
959 class DocSecRefItem : public CompAccept<DocSecRefItem>, public DocNode
960 {
961  public:
963  m_target(target) { m_parent = parent; }
964  Kind kind() const { return Kind_SecRefItem; }
965  QCString target() const { return m_target; }
966  QCString file() const { return m_file; }
967  QCString anchor() const { return m_anchor; }
969  void parse();
970 
971  private:
975 };
976 
977 /** Node representing a list of section references */
978 class DocSecRefList : public CompAccept<DocSecRefList>, public DocNode
979 {
980  public:
982  void parse();
983  Kind kind() const { return Kind_SecRefList; }
985 
986  private:
987 };
988 
989 /** Node representing an internal section of documentation */
990 class DocInternal : public CompAccept<DocInternal>, public DocNode
991 {
992  public:
994  int parse(int);
995  Kind kind() const { return Kind_Internal; }
997 
998  private:
999 };
1000 
1001 /** Node representing an block of paragraphs */
1002 class DocParBlock : public CompAccept<DocParBlock>, public DocNode
1003 {
1004  public:
1006  int parse();
1007  Kind kind() const { return Kind_ParBlock; }
1009 
1010  private:
1011 };
1012 
1013 
1014 /** Node representing a simple list */
1015 class DocSimpleList : public CompAccept<DocSimpleList>, public DocNode
1016 {
1017  public:
1019  Kind kind() const { return Kind_SimpleList; }
1021  int parse();
1022 
1023  private:
1024 };
1025 
1026 /** Node representing a Html list */
1027 class DocHtmlList : public CompAccept<DocHtmlList>, public DocNode
1028 {
1029  public:
1030  enum Type { Unordered, Ordered };
1032  m_type(t), m_attribs(attribs) { m_parent = parent; }
1033  Kind kind() const { return Kind_HtmlList; }
1034  Type type() const { return m_type; }
1036  const HtmlAttribList &attribs() const { return m_attribs; }
1037  int parse();
1038  int parseXml();
1039 
1040  private:
1043 };
1044 
1045 /** Node representing a simple section */
1046 class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
1047 {
1048  public:
1049  enum Type
1050  {
1051  Unknown, See, Return, Author, Authors, Version, Since, Date,
1052  Note, Warning, Copyright, Pre, Post, Invar, Remark, Attention, User, Rcs
1053  };
1055  virtual ~DocSimpleSect();
1056  Kind kind() const { return Kind_SimpleSect; }
1057  Type type() const { return m_type; }
1058  QCString typeString() const;
1059  void accept(DocVisitor *v);
1060  int parse(bool userTitle,bool needsSeparator);
1061  int parseRcs();
1062  int parseXml();
1063  void appendLinkWord(const QCString &word);
1064 
1065  private:
1068 };
1069 
1070 /** Node representing a separator between two simple sections of the
1071  * same type.
1072  */
1074 {
1075  public:
1077  Kind kind() const { return Kind_SimpleSectSep; }
1078  void accept(DocVisitor *v) { v->visit(this); }
1079 
1080  private:
1081 };
1082 
1083 /** Node representing a parameter section */
1084 class DocParamSect : public CompAccept<DocParamSect>, public DocNode
1085 {
1086  friend class DocParamList;
1087  public:
1088  enum Type
1089  {
1090  Unknown, Param, RetVal, Exception, TemplateParam
1091  };
1093  {
1094  In=1, Out=2, InOut=3, Unspecified=0
1095  };
1097  : m_type(t), m_hasInOutSpecifier(FALSE), m_hasTypeSpecifier(FALSE)
1098  { m_parent = parent; }
1099  int parse(const QCString &cmdName,bool xmlContext,Direction d);
1100  Kind kind() const { return Kind_ParamSect; }
1101  Type type() const { return m_type; }
1103  bool hasInOutSpecifier() const { return m_hasInOutSpecifier; }
1104  bool hasTypeSpecifier() const { return m_hasTypeSpecifier; }
1105 
1106  private:
1110 };
1111 
1112 /** Node representing a paragraph in the documentation tree */
1113 class DocPara : public CompAccept<DocPara>, public DocNode
1114 {
1115  public:
1117  m_isFirst(FALSE), m_isLast(FALSE) { m_parent = parent; }
1118  int parse();
1119  Kind kind() const { return Kind_Para; }
1120  bool isEmpty() const { return m_children.isEmpty(); }
1122  void markFirst(bool v=TRUE) { m_isFirst=v; }
1123  void markLast(bool v=TRUE) { m_isLast=v; }
1124  bool isFirst() const { return m_isFirst; }
1125  bool isLast() const { return m_isLast; }
1126 
1127  int handleCommand(const QCString &cmdName);
1128  int handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs);
1129  int handleHtmlEndTag(const QCString &tagName);
1130  int handleSimpleSection(DocSimpleSect::Type t,bool xmlContext=FALSE);
1131  int handleXRefItem();
1132  int handleParamSection(const QCString &cmdName,DocParamSect::Type t,
1133  bool xmlContext,
1134  int direction);
1135  void handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type t);
1136  void handleImage(const QCString &cmdName);
1137  template<class T> void handleFile(const QCString &cmdName);
1138  void handleInclude(const QCString &cmdName,DocInclude::Type t);
1139  void handleLink(const QCString &cmdName,bool isJavaLink);
1140  void handleCite();
1141  void handleRef(const QCString &cmdName);
1142  void handleSection(const QCString &cmdName);
1143  void handleInheritDoc();
1144  void handleVhdlFlow();
1145  int handleStartCode();
1146  int handleHtmlHeader(const HtmlAttribList &tagHtmlAttribs,int level);
1147 
1148  bool injectToken(int tok,const QCString &tokText);
1149 
1150  private:
1153  bool m_isLast;
1154 };
1155 
1156 /** Node representing a parameter list. */
1157 class DocParamList : public DocNode
1158 {
1159  public:
1161  : m_type(t), m_dir(d), m_isFirst(TRUE), m_isLast(TRUE)
1162  { m_paragraphs.setAutoDelete(TRUE);
1163  m_params.setAutoDelete(TRUE);
1164  m_paramTypes.setAutoDelete(TRUE);
1165  m_parent = parent;
1166  }
1167  virtual ~DocParamList() { }
1168  Kind kind() const { return Kind_ParamList; }
1169  const QList<DocNode> &parameters() { return m_params; }
1170  const QList<DocNode> &paramTypes() { return m_paramTypes; }
1171  DocParamSect::Type type() const { return m_type; }
1172  DocParamSect::Direction direction() const { return m_dir; }
1173  void markFirst(bool b=TRUE) { m_isFirst=b; }
1174  void markLast(bool b=TRUE) { m_isLast=b; }
1175  bool isFirst() const { return m_isFirst; }
1176  bool isLast() const { return m_isLast; }
1178  {
1179  v->visitPre(this);
1180  QListIterator<DocPara> cli(m_paragraphs);
1181  DocNode *n;
1182  for (cli.toFirst();(n=cli.current());++cli) n->accept(v);
1183  v->visitPost(this);
1184  }
1185  int parse(const QCString &cmdName);
1186  int parseXml(const QCString &paramName);
1187 
1188  private:
1195  bool m_isLast;
1196 };
1197 
1198 /** Node representing a simple list item */
1200 {
1201  public:
1203  { m_paragraph=new DocPara(this); m_parent = parent; }
1204  int parse();
1205  virtual ~DocSimpleListItem() { delete m_paragraph; }
1206  Kind kind() const { return Kind_SimpleListItem; }
1208  {
1209  v->visitPre(this);
1210  m_paragraph->accept(v);
1211  v->visitPost(this);
1212  }
1213 
1214  private:
1216 };
1217 
1218 /** Node representing a HTML list item */
1219 class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
1220 {
1221  public:
1223  m_attribs(attribs), m_itemNum(num) { m_parent = parent; }
1224  Kind kind() const { return Kind_HtmlListItem; }
1225  int itemNumber() const { return m_itemNum; }
1226  const HtmlAttribList &attribs() const { return m_attribs; }
1228  int parse();
1229  int parseXml();
1230 
1231  private:
1234 };
1235 
1236 /** Node representing a HTML description data */
1237 class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
1238 {
1239  public:
1241  Kind kind() const { return Kind_HtmlDescData; }
1242  const HtmlAttribList &attribs() const { return m_attribs; }
1244  int parse();
1245 
1246  private:
1248 };
1249 
1250 /** Node representing a HTML table cell */
1251 class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
1252 {
1253  friend class DocHtmlTable;
1254  public:
1255  enum Alignment { Left, Right, Center };
1256  DocHtmlCell(DocNode *parent,const HtmlAttribList &attribs,bool isHeading) :
1257  m_isHeading(isHeading),
1258  m_isFirst(FALSE), m_isLast(FALSE), m_attribs(attribs),
1259  m_rowIdx(-1), m_colIdx(-1) { m_parent = parent; }
1260  bool isHeading() const { return m_isHeading; }
1261  bool isFirst() const { return m_isFirst; }
1262  bool isLast() const { return m_isLast; }
1263  Kind kind() const { return Kind_HtmlCell; }
1265  void markFirst(bool v=TRUE) { m_isFirst=v; }
1266  void markLast(bool v=TRUE) { m_isLast=v; }
1267  const HtmlAttribList &attribs() const { return m_attribs; }
1268  int parse();
1269  int parseXml();
1270  int rowIndex() const { return m_rowIdx; }
1271  int columnIndex() const { return m_colIdx; }
1272  int rowSpan() const;
1273  int colSpan() const;
1274  Alignment alignment() const;
1275 
1276  private:
1277  void setRowIndex(int idx) { m_rowIdx = idx; }
1278  void setColumnIndex(int idx) { m_colIdx = idx; }
1281  bool m_isLast;
1285 };
1286 
1287 /** Node representing a HTML table caption */
1288 class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
1289 {
1290  public:
1291  DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs);
1292  Kind kind() const { return Kind_HtmlCaption; }
1294  const HtmlAttribList &attribs() const { return m_attribs; }
1295  int parse();
1296  bool hasCaptionId() const { return m_hasCaptionId; }
1297  QCString file() const { return m_file; }
1298  QCString anchor() const { return m_anchor; }
1299 
1300  private:
1305 };
1306 
1307 /** Node representing a HTML table row */
1308 class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
1309 {
1310  friend class DocHtmlTable;
1311  public:
1313  m_attribs(attribs), m_visibleCells(-1), m_rowIdx(-1) { m_parent = parent; }
1314  Kind kind() const { return Kind_HtmlRow; }
1315  uint numCells() const { return m_children.count(); }
1317  const HtmlAttribList &attribs() const { return m_attribs; }
1318  int parse();
1319  int parseXml(bool header);
1320  bool isHeading() const { // a row is a table heading if all cells are marked as such
1321  bool heading=TRUE;
1323  DocNode *n;
1324  for (;(n=it.current());++it)
1325  {
1326  if (n->kind()==Kind_HtmlCell)
1327  {
1328  heading = heading && ((DocHtmlCell*)n)->isHeading();
1329  }
1330  }
1331  return m_children.count()>0 && heading;
1332  }
1333  void setVisibleCells(int n) { m_visibleCells = n; }
1334  int visibleCells() const { return m_visibleCells; }
1335  int rowIndex() const { return m_rowIdx; }
1336 
1337  private:
1338  void setRowIndex(int idx) { m_rowIdx = idx; }
1342 };
1343 
1344 /** Node representing a HTML table */
1345 class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
1346 {
1347  public:
1349  : m_attribs(attribs) { m_caption=0; m_parent = parent; }
1350  ~DocHtmlTable() { delete m_caption; }
1351  Kind kind() const { return Kind_HtmlTable; }
1352  uint numRows() const { return m_children.count(); }
1353  bool hasCaption() { return m_caption!=0; }
1354  const HtmlAttribList &attribs() const { return m_attribs; }
1355  int parse();
1356  int parseXml();
1357  uint numColumns() const { return m_numCols; }
1358  void accept(DocVisitor *v);
1359  DocHtmlCaption *caption() const { return m_caption; }
1361  DocNode *n = m_children.getFirst();
1362  if (n && n->kind()==Kind_HtmlRow) return (DocHtmlRow*)n;
1363  return 0;
1364  }
1365 
1366  private:
1367  void computeTableGrid();
1371 };
1372 
1373 /** Node representing an HTML blockquote */
1374 class DocHtmlBlockQuote : public CompAccept<DocHtmlBlockQuote>, public DocNode
1375 {
1376  public:
1378  : m_attribs(attribs) { m_parent = parent; }
1379  Kind kind() const { return Kind_HtmlBlockQuote; }
1380  int parse();
1382  const HtmlAttribList &attribs() const { return m_attribs; }
1383 
1384  private:
1386 };
1387 
1388 /** Root node of a text fragment */
1389 class DocText : public CompAccept<DocText>, public DocNode
1390 {
1391  public:
1392  DocText() {}
1393  Kind kind() const { return Kind_Text; }
1395  void parse();
1396  bool isEmpty() const { return m_children.isEmpty(); }
1397 };
1398 
1399 /** Root node of documentation tree */
1400 class DocRoot : public CompAccept<DocRoot>, public DocNode
1401 {
1402  public:
1403  DocRoot(bool indent,bool sl) : m_indent(indent), m_singleLine(sl) {}
1404  Kind kind() const { return Kind_Root; }
1406  void parse();
1407  bool indent() const { return m_indent; }
1408  bool singleLine() const { return m_singleLine; }
1409  bool isEmpty() const { return m_children.isEmpty(); }
1410 
1411  private:
1412  bool m_indent;
1414 };
1415 
1416 
1417 #endif
bool refToSection() const
Definition: docparser.h:834
static QCString name
Definition: declinfo.cpp:673
void markLast(bool b=TRUE)
Definition: docparser.h:1174
DocNode * parent() const
Definition: docparser.h:147
QCString m_width
Definition: docparser.h:758
QCString exampleFile() const
Definition: docparser.h:454
QCString file() const
Definition: docparser.h:946
QCString m_relPath
Definition: docparser.h:572
Type type() const
Definition: docparser.h:532
Type type() const
Definition: docparser.h:1034
QCString m_ref
Definition: docparser.h:226
bool m_isFirst
Definition: docparser.h:1152
Kind kind() const
Definition: docparser.h:638
void accept(DocVisitor *v)
Definition: docparser.h:452
Kind kind() const
Definition: docparser.h:1119
Kind kind() const
Definition: docparser.h:856
const HtmlAttribList & attribs() const
Definition: docparser.h:1267
DocParamSect::Type m_type
Definition: docparser.h:1192
QCString file() const
Definition: docparser.h:1297
QList< DocNode > m_children
Definition: docparser.h:189
void accept(DocVisitor *v)
Definition: docparser.h:1177
QCString name() const
Definition: docparser.h:695
QCString m_anchor
Definition: docparser.h:865
QCString file() const
Definition: docparser.h:723
QCString anchor() const
Definition: docparser.h:830
QCString relPath() const
Definition: docparser.h:877
QCString ref() const
Definition: docparser.h:219
void markLast(bool v=TRUE)
Definition: docparser.h:1266
DocHtmlTable(DocNode *parent, const HtmlAttribList &attribs)
Definition: docparser.h:1348
int parse(const QCString &cmdName)
Definition: docparser.cpp:4650
void accept(DocVisitor *v)
Definition: docparser.h:897
void markLast(bool v=TRUE)
Definition: docparser.h:540
void accept(DocVisitor *v)
Definition: docparser.h:1264
QCString anchor() const
Definition: docparser.h:277
QCString pattern() const
Definition: docparser.h:534
QCString name() const
Definition: docparser.h:746
virtual ~DocParamList()
Definition: docparser.h:1167
static QCString scope
Definition: declinfo.cpp:668
void accept(DocVisitor *v)
Definition: docparser.h:1035
QCString m_text
Definition: docparser.h:469
Kind kind() const
Definition: docparser.h:561
bool m_isEmail
Definition: docparser.h:246
QCString url() const
Definition: docparser.h:239
DocParamSect::Type type() const
Definition: docparser.h:1171
QCString width() const
Definition: docparser.h:697
QCString m_word
Definition: docparser.h:225
const HtmlAttribList & attribs() const
Definition: docparser.h:927
QCString text() const
Definition: docparser.h:296
MemberDef * member() const
Definition: docparser.h:585
bool m_insidePre
Definition: docparser.h:166
Kind kind() const
Definition: docparser.h:240
bool isFirst() const
Definition: docparser.h:537
void accept(DocVisitor *v)
Definition: docparser.h:297
DocSymbol(DocNode *parent, SymType s)
Definition: docparser.h:416
bool isFirst() const
Definition: docparser.h:1124
HtmlAttribList m_attribs
Definition: docparser.h:1282
QCString relPath() const
Definition: docparser.h:564
DocHtmlCaption * caption() const
Definition: docparser.h:1359
QCString file() const
Definition: docparser.h:747
bool refToAnchor() const
Definition: docparser.h:833
void accept(DocVisitor *v)
Definition: docparser.h:536
QCString file() const
Definition: docparser.h:966
void accept(DocVisitor *v)
Definition: docparser.h:729
bool m_indent
Definition: docparser.h:1412
void accept(DocVisitor *v)
Definition: docparser.h:279
QCString m_width
Definition: docparser.h:476
void setColumnIndex(int idx)
Definition: docparser.h:1278
int itemNumber() const
Definition: docparser.h:1225
void accept(DocVisitor *v)
Definition: docparser.h:777
void setRowIndex(int idx)
Definition: docparser.h:1277
Kind kind() const
Definition: docparser.h:419
bool isEmail() const
Definition: docparser.h:242
int level() const
Definition: docparser.h:942
QCString anchor() const
Definition: docparser.h:944
Kind kind() const
Definition: docparser.h:1351
DocRoot(bool indent, bool sl)
Definition: docparser.h:1403
QCString m_relPath
Definition: docparser.h:301
static bool handleCite(const QCString &)
bool hasCaption() const
Definition: docparser.h:773
void accept(DocVisitor *v)
Definition: docparser.h:1405
QCString m_anchor
Definition: docparser.h:681
static bool handleSection(const QCString &)
QCString blockId() const
Definition: docparser.h:505
QCString m_tooltip
Definition: docparser.h:230
Kind kind() const
Definition: docparser.h:1404
const HtmlAttribList & attribs() const
Definition: docparser.h:1382
void accept(DocVisitor *v)
Definition: docparser.h:587
QCString m_relPath
Definition: docparser.h:844
Type m_type
Definition: docparser.h:515
QCString m_link
Definition: docparser.h:610
virtual ~DocNode()
Definition: docparser.h:141
QCString m_chars
Definition: docparser.h:437
void accept(DocVisitor *v)
Definition: docparser.h:1243
bool m_copyDetails
Definition: docparser.h:612
void accept(DocVisitor *v)
Definition: docparser.h:837
QCString m_file
Definition: docparser.h:955
QCString m_file
Definition: docparser.h:512
Kind kind() const
Definition: docparser.h:1393
QCString m_height
Definition: docparser.h:735
QCString text() const
Definition: docparser.h:503
Kind kind() const
Definition: docparser.h:200
QCString m_file
Definition: docparser.h:283
QCString file() const
Definition: docparser.h:278
int rowIndex() const
Definition: docparser.h:1335
Kind kind() const
Definition: docparser.h:793
Type type() const
Definition: docparser.h:1101
DocSecRefList(DocNode *parent)
Definition: docparser.h:981
DocParamSect(DocNode *parent, Type t)
Definition: docparser.h:1096
uint position() const
Definition: docparser.h:332
DocTitle(DocNode *parent)
Definition: docparser.h:654
QCString m_name
Definition: docparser.h:570
int m_rowIdx
Definition: docparser.h:1341
QCString relPath() const
Definition: docparser.h:724
const bool FALSE
Definition: qglobal.h:370
bool isHeading() const
Definition: docparser.h:1320
QCString m_anchor
Definition: docparser.h:229
bool m_isHeading
Definition: docparser.h:1279
QCString m_context
Definition: docparser.h:736
const HtmlAttribList & attribs() const
Definition: docparser.h:1242
void accept(DocVisitor *v)
Definition: docparser.h:795
bool m_isLast
Definition: docparser.h:1281
QList< DocNode > & children()
Definition: docparser.h:186
void accept(DocVisitor *v)
Definition: docparser.h:702
Kind kind() const
Definition: docparser.h:1077
void markFirst(bool v=TRUE)
Definition: docparser.h:1122
Kind kind() const
Definition: docparser.h:1019
const HtmlAttribList & attribs() const
Definition: docparser.h:1354
DocSimpleListItem(DocNode *parent)
Definition: docparser.h:1202
const HtmlAttribList & attribs() const
Definition: docparser.h:1036
Kind kind() const
Definition: docparser.h:494
void accept(DocVisitor *v)
Definition: docparser.h:1207
const HtmlAttribList & attribs() const
Definition: docparser.h:1294
const QList< DocNode > & paramTypes()
Definition: docparser.h:1170
HtmlAttribList m_attribs
Definition: docparser.h:1301
Kind kind() const
Definition: docparser.h:1007
bool isFirst() const
Definition: docparser.h:1175
QCString m_file
Definition: docparser.h:732
RefType m_refType
Definition: docparser.h:841
QCString tooltip() const
Definition: docparser.h:221
QCString file() const
Definition: docparser.h:827
bool singleLine() const
Definition: docparser.h:1408
Type type() const
Definition: docparser.h:502
virtual Kind kind() const =0
QCString m_url
Definition: docparser.h:884
QCString anchor() const
Definition: docparser.h:859
QCString m_width
Definition: docparser.h:734
int rowIndex() const
Definition: docparser.h:1270
bool m_copyBrief
Definition: docparser.h:611
void accept(DocVisitor *v)
Definition: docparser.h:1316
QCString ref() const
Definition: docparser.h:294
Type m_type
Definition: docparser.h:470
SymType m_symbol
Definition: docparser.h:424
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
QCString anchor() const
Definition: docparser.h:967
Definition * scope() const
Definition: docparser.h:584
QCString width() const
Definition: docparser.h:459
QCString m_width
Definition: docparser.h:709
static bool handleXRefItem(const QCString &)
DocParBlock(DocNode *parent)
Definition: docparser.h:1005
Kind kind() const
Definition: docparser.h:216
DocIncOperator(DocNode *parent, Type t, const QCString &pat, const QCString &context, bool isExample, const QCString &exampleFile)
Definition: docparser.h:526
void accept(DocVisitor *v)
Definition: docparser.h:996
void markFirst(bool b=TRUE)
Definition: docparser.h:1173
QCString name() const
Definition: docparser.h:770
Kind kind() const
Definition: docparser.h:276
const HtmlAttribList & attribs() const
Definition: docparser.h:896
QCString m_file
Definition: docparser.h:780
QCString height() const
Definition: docparser.h:698
QCString m_file
Definition: docparser.h:680
QCString exampleFile() const
Definition: docparser.h:542
void setInsidePreformatted(bool p)
Definition: docparser.h:162
int level() const
Definition: docparser.h:894
QCString m_relPath
Definition: docparser.h:757
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:90
Kind kind() const
Definition: docparser.h:926
bool isExample() const
Definition: docparser.h:453
Kind kind() const
Definition: docparser.h:328
QCString height() const
Definition: docparser.h:460
void accept(DocVisitor *v)
Definition: docparser.h:420
bool isSubPage() const
Definition: docparser.h:836
QCString m_file
Definition: docparser.h:756
QCString m_id
Definition: docparser.h:952
void setText(const QCString &t)
Definition: docparser.h:463
Kind kind() const
Definition: docparser.h:620
Kind kind() const
Definition: docparser.h:895
QCString m_anchor
Definition: docparser.h:303
QCString m_height
Definition: docparser.h:783
Type m_type
Definition: docparser.h:708
QCString relPath() const
Definition: docparser.h:858
QList< DocNode > & children()
Definition: docparser.h:462
QCString targetTitle() const
Definition: docparser.h:831
void setWidth(const QCString &w)
Definition: docparser.h:464
def cli(ctx)
Definition: main.py:7
void docFindSections(const char *input, Definition *d, MemberGroup *m, const char *fileName)
Definition: docparser.cpp:7434
const HtmlAttribList & attribs() const
Definition: docparser.h:880
MemberDef * m_member
Definition: docparser.h:592
uint count() const
Definition: qlist.h:66
void setHeight(const QCString &h)
Definition: docparser.h:465
QCString height() const
Definition: docparser.h:775
QCString relPath() const
Definition: docparser.h:672
DocWhiteSpace(DocNode *parent, const QCString &chars)
Definition: docparser.h:431
QCString file() const
Definition: docparser.h:292
bool hasCaption()
Definition: docparser.h:794
QCString name() const
Definition: docparser.h:722
QCString file() const
Definition: docparser.h:771
Kind kind() const
Definition: docparser.h:1206
QCString context() const
Definition: docparser.h:776
DocNode * m_parent
Definition: docparser.h:163
DocPara * m_paragraph
Definition: docparser.h:1215
QCString ref() const
Definition: docparser.h:829
void markFirst(bool v=TRUE)
Definition: docparser.h:1265
QCString file() const
Definition: docparser.h:857
DocHtmlListItem(DocNode *parent, const HtmlAttribList &attribs, int num)
Definition: docparser.h:1222
QCString m_file
Definition: docparser.h:843
QCString context() const
Definition: docparser.h:728
QCString relPath() const
Definition: docparser.h:772
static int input(void)
Definition: code.cpp:15695
QCString text() const
Definition: docparser.h:450
HtmlAttribList m_attribs
Definition: docparser.h:1369
fileName
Definition: dumpTree.py:9
DocTitle * m_title
Definition: docparser.h:1067
QCString text() const
Definition: docparser.h:563
QCString width() const
Definition: docparser.h:726
Kind kind() const
Definition: docparser.h:265
QCString m_text
Definition: docparser.h:571
QCString context() const
Definition: docparser.h:752
QCString anchor() const
Definition: docparser.h:670
QCString m_relPath
Definition: docparser.h:228
QCString word() const
Definition: docparser.h:199
bool hasCaption() const
Definition: docparser.h:749
def key(type, name=None)
Definition: graph.py:13
void accept(DocVisitor *v)
Definition: docparser.h:753
QCString m_anchor
Definition: docparser.h:954
QCString m_context
Definition: docparser.h:468
QCString m_word
Definition: docparser.h:204
Kind kind() const
Definition: docparser.h:1379
const char * symb
Definition: docparser.h:413
QCString m_width
Definition: docparser.h:782
int visibleCells() const
Definition: docparser.h:1334
void accept(DocVisitor *v)
Definition: docparser.h:1293
bool hasCaption() const
Definition: docparser.h:696
std::void_t< T > n
QCString m_relPath
Definition: docparser.h:781
Definition * m_scope
Definition: docparser.h:591
Kind kind() const
Definition: docparser.h:769
void setVisibleCells(int n)
Definition: docparser.h:1333
void markFirst(bool v=TRUE)
Definition: docparser.h:539
DocSimpleSectSep(DocNode *parent)
Definition: docparser.h:1076
HtmlAttribList m_attribs
Definition: docparser.h:706
void markLast(bool v=TRUE)
Definition: docparser.h:1123
bool isExample() const
Definition: docparser.h:541
Kind kind() const
Definition: docparser.h:983
QCString id() const
Definition: docparser.h:945
QCString m_text
Definition: docparser.h:304
QCString context() const
Definition: docparser.h:535
void accept(T *obj, DocVisitor *v)
Definition: docparser.h:177
void accept(DocVisitor *v)
Definition: docparser.h:222
QCString height() const
Definition: docparser.h:751
DocPara(DocNode *parent)
Definition: docparser.h:1116
void accept(DocVisitor *v)
Definition: docparser.h:1121
bool isFirst() const
Definition: docparser.h:1261
QCString m_name
Definition: docparser.h:731
void accept(DocVisitor *v)
Definition: docparser.h:255
QCString m_anchor
Definition: docparser.h:846
void accept(DocVisitor *v)
Definition: docparser.h:266
bool isEmpty() const
Definition: docparser.h:1396
QCString m_blockId
Definition: docparser.h:518
virtual void visitPre(DocAutoList *)=0
void accept(DocVisitor *v)
Definition: docparser.h:566
QCString relPath() const
Definition: docparser.h:828
void accept(DocVisitor *v)
Definition: docparser.h:640
DocText * validatingParseText(const char *input)
Definition: docparser.cpp:7381
const QList< DocNode > & children() const
Definition: docparser.h:461
void setParent(DocNode *parent)
Definition: docparser.h:150
p
Definition: test.py:223
bool isLast() const
Definition: docparser.h:1176
Kind kind() const
Definition: docparser.h:1263
bool isLast() const
Definition: docparser.h:1262
QCString text() const
Definition: docparser.h:533
void accept(DocVisitor *v)
Definition: docparser.h:1078
QCString key() const
Definition: docparser.h:673
Kind kind() const
Definition: docparser.h:911
bool isLast() const
Definition: docparser.h:538
Kind kind() const
Definition: docparser.h:878
QCString m_file
Definition: docparser.h:227
QCString m_pattern
Definition: docparser.h:548
QCString m_anchor
Definition: docparser.h:282
QCString m_entry
Definition: docparser.h:590
QCString m_height
Definition: docparser.h:477
HtmlAttribList m_attribs
Definition: docparser.h:1385
DocStyleChange(DocNode *parent, uint position, Style s, bool enable, const HtmlAttribList *attribs=0)
Definition: docparser.h:324
const HtmlAttribList & attribs() const
Definition: docparser.h:1226
type * current() const
Definition: qlist.h:146
Kind kind() const
Definition: docparser.h:1292
QCString url() const
Definition: docparser.h:876
QCString width() const
Definition: docparser.h:750
QList< DocNode > m_params
Definition: docparser.h:1190
QCString m_target
Definition: docparser.h:972
Kind kind() const
Definition: docparser.h:433
void accept(DocVisitor *v)
Definition: docparser.h:1381
bool isBlock() const
Definition: docparser.h:457
Type type() const
Definition: docparser.h:1057
Style style() const
Definition: docparser.h:329
bool isHeading() const
Definition: docparser.h:1260
QCString m_name
Definition: docparser.h:779
void accept(DocVisitor *v)
Definition: docparser.h:624
int id() const
Definition: docparser.h:565
void accept(DocVisitor *v)
Definition: docparser.h:928
void accept(DocVisitor *v)
Definition: docparser.h:1227
bool m_isSubPage
Definition: docparser.h:842
Kind kind() const
Definition: docparser.h:1033
QCString m_file
Definition: docparser.h:863
DocHtmlBlockQuote(DocNode *parent, const HtmlAttribList &attribs)
Definition: docparser.h:1377
DocParamSect::Direction m_dir
Definition: docparser.h:1193
QCString m_url
Definition: docparser.h:712
void accept(DocVisitor *v)
Definition: docparser.h:333
QCString entry() const
Definition: docparser.h:586
bool isExample() const
Definition: docparser.h:506
void accept(DocVisitor *v)
Definition: docparser.h:1394
DocCopy(DocNode *parent, const QCString &link, bool copyBrief, bool copyDetails)
Definition: docparser.h:601
QCString m_exampleFile
Definition: docparser.h:472
QCString relPath() const
Definition: docparser.h:748
#define SkipLine
Definition: pre.cpp:4273
QCString word() const
Definition: docparser.h:215
QCString m_name
Definition: docparser.h:755
bool isInline()
Definition: docparser.h:567
bool m_singleLine
Definition: docparser.h:1413
QCString relPath() const
Definition: docparser.h:455
void accept(DocVisitor *v)
Definition: docparser.h:674
#define Include
Definition: config.cpp:1237
QCString m_name
Definition: docparser.h:707
QCString language() const
Definition: docparser.h:456
bool m_hasCaptionId
Definition: docparser.h:1302
Kind kind() const
Definition: docparser.h:448
void accept(DocVisitor *v)
Definition: docparser.h:658
Kind kind() const
Definition: docparser.h:1241
void accept(DocVisitor *v)
Definition: docparser.h:984
DocParamSect::Direction direction() const
Definition: docparser.h:1172
Kind kind() const
Definition: docparser.h:1168
QCString title() const
Definition: docparser.h:943
HtmlAttribList m_attribs
Definition: docparser.h:917
Kind kind() const
Definition: docparser.h:745
QCString m_context
Definition: docparser.h:549
QList< DocPara > m_paragraphs
Definition: docparser.h:1189
QCString m_lang
Definition: docparser.h:474
QCString m_file
Definition: docparser.h:973
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
QCString m_relPath
Definition: docparser.h:683
virtual ~CompAccept()
Definition: docparser.h:176
DocIndexEntry(DocNode *parent, Definition *scope, MemberDef *md)
Definition: docparser.h:580
Kind kind() const
Definition: docparser.h:1056
void accept(DocVisitor *v)
Definition: docparser.h:860
uint numRows() const
Definition: docparser.h:1352
HtmlAttribList m_attribs
Definition: docparser.h:932
QCString link() const
Definition: docparser.h:605
Kind kind() const
Definition: docparser.h:964
void accept(DocVisitor *v)
Definition: docparser.h:1008
DocHtmlDescList(DocNode *parent, const HtmlAttribList &attribs)
Definition: docparser.h:924
QCString file() const
Definition: docparser.h:495
HtmlAttribList m_attribs
Definition: docparser.h:1247
Kind kind() const
Definition: docparser.h:604
bool indent() const
Definition: docparser.h:1407
int m_indent
Definition: docparser.h:628
bool hasInOutSpecifier() const
Definition: docparser.h:1103
Kind kind() const
Definition: docparser.h:693
void accept(DocVisitor *v)
Definition: docparser.h:1020
const QList< DocNode > & parameters()
Definition: docparser.h:1169
DocNode()
Definition: docparser.h:138
DocParamList(DocNode *parent, DocParamSect::Type t, DocParamSect::Direction d)
Definition: docparser.h:1160
const HtmlAttribList & attribs() const
Definition: docparser.h:334
uint numCells() const
Definition: docparser.h:1315
QCString context() const
Definition: docparser.h:451
bool m_hasTypeSpecifier
Definition: docparser.h:1109
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *context, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: docparser.cpp:7179
QCString m_title
Definition: docparser.h:682
QCString m_ref
Definition: docparser.h:845
void accept(DocVisitor *)
Definition: docparser.h:606
QCString height() const
Definition: docparser.h:727
#define Verbatim
QCString m_ref
Definition: docparser.h:302
int m_level
Definition: docparser.h:951
DocInternal(DocNode *parent)
Definition: docparser.h:993
QCString m_file
Definition: docparser.h:1303
HtmlAttribList m_attribs
Definition: docparser.h:340
QCString m_key
Definition: docparser.h:679
QCString relPath() const
Definition: docparser.h:699
int columnIndex() const
Definition: docparser.h:1271
DocLineBreak(DocNode *parent)
Definition: docparser.h:253
Kind kind() const
Definition: docparser.h:1224
bool isEnumList() const
Definition: docparser.h:621
DocHtmlDescData(DocNode *parent)
Definition: docparser.h:1240
QCString m_context
Definition: docparser.h:760
bool hasTypeSpecifier() const
Definition: docparser.h:1104
int indent() const
Definition: docparser.h:622
Kind kind() const
Definition: docparser.h:582
SymType symbol() const
Definition: docparser.h:418
QCString file() const
Definition: docparser.h:669
DocHRef(DocNode *parent, const HtmlAttribList &attribs, const QCString &url, const QCString &relPath)
Definition: docparser.h:872
bool hasLinkText() const
Definition: docparser.h:832
virtual void visitPost(DocAutoList *)=0
const PerlType type
Definition: docparser.h:414
QCString m_file
Definition: docparser.h:300
HtmlAttribList m_attribs
Definition: docparser.h:883
bool m_isExample
Definition: docparser.h:552
virtual void visit(DocWord *)=0
QCString m_anchor
Definition: docparser.h:974
QCString m_title
Definition: docparser.h:953
int m_visibleCells
Definition: docparser.h:1340
bool m_isExample
Definition: docparser.h:516
const HtmlAttribList & attribs() const
Definition: docparser.h:701
virtual ~DocSimpleListItem()
Definition: docparser.h:1205
static bool * b
Definition: config.cpp:1043
QCString m_text
Definition: docparser.h:514
bool m_isExample
Definition: docparser.h:471
QCString anchor() const
Definition: docparser.h:1298
int itemNumber() const
Definition: docparser.h:639
const HtmlAttribList & attribs() const
Definition: docparser.h:912
QCString exampleFile() const
Definition: docparser.h:507
void accept(DocVisitor *v)
Definition: docparser.h:879
QCString context() const
Definition: docparser.h:504
QCString anchor() const
Definition: docparser.h:295
QCString m_exampleFile
Definition: docparser.h:553
DocHtmlRow(DocNode *parent, const HtmlAttribList &attribs)
Definition: docparser.h:1312
QCString m_text
Definition: docparser.h:547
bool m_isFirst
Definition: docparser.h:1194
bool refToTable() const
Definition: docparser.h:835
QCString file() const
Definition: docparser.h:217
Kind kind() const
Definition: docparser.h:531
DocHorRuler(DocNode *parent)
Definition: docparser.h:264
DocHtmlCell(DocNode *parent, const HtmlAttribList &attribs, bool isHeading)
Definition: docparser.h:1256
bool isEmpty() const
Definition: docparser.h:1409
bool enable() const
Definition: docparser.h:331
bool m_isBlock
Definition: docparser.h:475
void accept(DocVisitor *v)
Definition: docparser.h:913
QCString m_context
Definition: docparser.h:784
bool hasCaption() const
Definition: docparser.h:458
bool hasCaptionId() const
Definition: docparser.h:1296
QCString chars() const
Definition: docparser.h:434
QCString m_anchor
Definition: docparser.h:1304
bool m_isLast
Definition: docparser.h:1153
DocHtmlDescTitle(DocNode *parent, const HtmlAttribList &attribs)
Definition: docparser.h:909
DocInclude(DocNode *parent, const QCString &file, const QCString context, Type t, bool isExample, const QCString exampleFile, const QCString blockId)
Definition: docparser.h:487
void accept(DocVisitor *v)
Definition: docparser.h:1102
QCString width() const
Definition: docparser.h:774
DocHtmlRow * firstRow() const
Definition: docparser.h:1360
QCString title() const
Definition: docparser.h:671
Kind kind() const
Definition: docparser.h:291
QCString extension() const
Definition: docparser.h:496
HtmlAttribList m_attribs
Definition: docparser.h:1042
Kind kind() const
Definition: docparser.h:826
QList< DocNode > m_children
Definition: docparser.h:478
void accept(DocVisitor *v)
Definition: docparser.h:508
bool hasCaption() const
Definition: docparser.h:725
Type type() const
Definition: docparser.h:449
QCString relPath() const
Definition: docparser.h:218
DocHtmlCaption * m_caption
Definition: docparser.h:1368
HtmlAttribList m_attribs
Definition: docparser.h:1232
QCString m_relPath
Definition: docparser.h:885
A list of Html attributes.
Definition: htmlattrib.h:32
static bool handleFile(const QCString &)
bool m_isFirst
Definition: docparser.h:1280
Kind kind() const
Definition: docparser.h:995
QList< DocNode > m_paramTypes
Definition: docparser.h:1191
QCString m_context
Definition: docparser.h:513
QCString url() const
Definition: docparser.h:700
Kind kind() const
Definition: docparser.h:721
void accept(DocVisitor *v)
Definition: docparser.h:435
Kind kind() const
Definition: docparser.h:1314
unsigned uint
Definition: qglobal.h:351
Type type() const
Definition: docparser.h:694
QCString anchor() const
Definition: docparser.h:220
bool isLast() const
Definition: docparser.h:1125
QCString m_relPath
Definition: docparser.h:473
bool isPreformatted() const
Definition: docparser.h:158
Kind kind() const
Definition: docparser.h:1100
int depth() const
Definition: docparser.h:623
void accept(DocVisitor *v)
Definition: docparser.h:241
virtual void accept(DocVisitor *v)=0
QCString m_height
Definition: docparser.h:759
Kind kind() const
Definition: docparser.h:254
QCString m_text
Definition: docparser.h:847
QCString relPath() const
Definition: docparser.h:293
const HtmlAttribList & attribs() const
Definition: docparser.h:1317
static QCString * s
Definition: config.cpp:1042
bool isEmpty() const
Definition: docparser.h:1120
union ptb::content::word::word word
const bool TRUE
Definition: qglobal.h:371
QCString m_sectionId
Definition: docparser.h:1151
HtmlAttribList m_attribs
Definition: docparser.h:902
void accept(DocVisitor *v)
Definition: docparser.h:968
DocHtmlHeader(DocNode *parent, const HtmlAttribList &attribs, int level)
Definition: docparser.h:892
bool hasCaption()
Definition: docparser.h:1353
QCString target() const
Definition: docparser.h:965
QCString m_height
Definition: docparser.h:710
void accept(DocVisitor *v)
Definition: docparser.h:201
QCString m_url
Definition: docparser.h:245
uint numColumns() const
Definition: docparser.h:1357
Kind kind() const
Definition: docparser.h:657
Kind kind() const
Definition: docparser.h:668
QCString m_exampleFile
Definition: docparser.h:517
Kind kind() const
Definition: docparser.h:941
void setRowIndex(int idx)
Definition: docparser.h:1338
QCString m_relPath
Definition: docparser.h:711
QCString m_relPath
Definition: docparser.h:864
bool m_isEnumList
Definition: docparser.h:629
DocSecRefItem(DocNode *parent, const QCString &target)
Definition: docparser.h:962
bool m_hasInOutSpecifier
Definition: docparser.h:1108
DocHtmlList(DocNode *parent, const HtmlAttribList &attribs, Type t)
Definition: docparser.h:1031
QCString m_relPath
Definition: docparser.h:733
const QList< DocNode > & children() const
Definition: docparser.h:185
QCString name() const
Definition: docparser.h:562
HtmlAttribList m_attribs
Definition: docparser.h:1339
type * toFirst()
Definition: qlist.h:135
void accept(DocVisitor *v)
Definition: docparser.h:947
DocSection(DocNode *parent, int level, const QCString &id)
Definition: docparser.h:939
DocSimpleList(DocNode *parent)
Definition: docparser.h:1018
DocURL(DocNode *parent, const QCString &url, bool isEmail)
Definition: docparser.h:237