Doxygen
Loading...
Searching...
No Matches
docoptions.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2025 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 DOCOPTIONS_H
17#define DOCOPTIONS_H
18
19#include "config.h"
20#include "qcstring.h"
21
23{
24 public:
25 // === getters for optional params
26 bool indexWords() const { return m_indexWords; }
27 bool isExample() const { return m_isExample; }
29 bool singleLine() const { return m_singleLine; }
30 bool linkFromIndex() const { return m_linkFromIndex; }
31 bool markdownSupport() const { return m_markdownSupport; }
32 bool autolinkSupport() const { return m_autolinkSupport; }
33 int sectionLevel() const { return m_sectionLevel; }
34
35 // === setters for optional params
36
37 /// Indicates whether or not words should be put in the search index.
39 { m_indexWords=b; return *this; }
40
41 /// Associate this comment block with a given example
43 { m_isExample=!name.isEmpty(); m_exampleName = name; return *this; }
44
45 /// Select if this is for a single line, so without starting a new paragraph at the end.
47 { m_singleLine=b; return *this; }
48
49 /// Select if the documentation is generated from an
50 /// index page. In this case context is not used to determine
51 /// the relative path when making a link.
53 { m_linkFromIndex=b; return *this; }
54
55 /// Select if the input needs to take markdown markup into account.
57 { m_markdownSupport=b; return *this; }
58
59 /// Select if the input need to perform auto linking of words
61 { m_autolinkSupport=b; return *this; }
62
63 /// Restrict output up to the given section level
65 { m_sectionLevel=l; return *this; }
66
67 private:
68 // optional params with defaults
69 bool m_indexWords = false;
70 bool m_isExample = false;
72 bool m_singleLine = false;
73 bool m_linkFromIndex = false;
74 bool m_markdownSupport = Config_getBool(MARKDOWN_SUPPORT);
75 bool m_autolinkSupport = Config_getBool(AUTOLINK_SUPPORT);
77};
78
79#endif
80
This is an alternative implementation of QCString.
Definition qcstring.h:101
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
#define Config_getBool(name)
Definition config.h:33
bool m_isExample
Definition docoptions.h:70
bool m_autolinkSupport
Definition docoptions.h:75
DocOptions & setLinkFromIndex(bool b)
Select if the documentation is generated from an index page.
Definition docoptions.h:52
DocOptions & setSingleLine(bool b)
Select if this is for a single line, so without starting a new paragraph at the end.
Definition docoptions.h:46
DocOptions & setMarkdownSupport(bool b)
Select if the input needs to take markdown markup into account.
Definition docoptions.h:56
bool autolinkSupport() const
Definition docoptions.h:32
bool m_indexWords
Definition docoptions.h:69
bool linkFromIndex() const
Definition docoptions.h:30
bool markdownSupport() const
Definition docoptions.h:31
int sectionLevel() const
Definition docoptions.h:33
DocOptions & setSectionLevel(int l)
Restrict output up to the given section level.
Definition docoptions.h:64
bool m_linkFromIndex
Definition docoptions.h:73
DocOptions & setAutolinkSupport(bool b)
Select if the input need to perform auto linking of words.
Definition docoptions.h:60
bool m_markdownSupport
Definition docoptions.h:74
DocOptions & setIndexWords(bool b)
Indicates whether or not words should be put in the search index.
Definition docoptions.h:38
DocOptions & setExample(const QCString &name)
Associate this comment block with a given example.
Definition docoptions.h:42
QCString exampleName() const
Definition docoptions.h:28
bool indexWords() const
Definition docoptions.h:26
QCString m_exampleName
Definition docoptions.h:71
bool singleLine() const
Definition docoptions.h:29
bool m_singleLine
Definition docoptions.h:72
int m_sectionLevel
Definition docoptions.h:76
bool isExample() const
Definition docoptions.h:27