Doxygen
Toggle main menu visibility
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 "
dstring.h
"
21
22
/// @brief Helper class to pass options when calling OutputList::generateDoc()
23
struct
DocOptions
24
{
25
public
:
26
// === getters for optional params
27
bool
indexWords
()
const
{
return
m_indexWords
; }
28
bool
isExample
()
const
{
return
m_isExample
; }
29
DString
exampleName
()
const
{
return
m_exampleName
; }
30
bool
singleLine
()
const
{
return
m_singleLine
; }
31
bool
linkFromIndex
()
const
{
return
m_linkFromIndex
; }
32
bool
markdownSupport
()
const
{
return
m_markdownSupport
; }
33
bool
autolinkSupport
()
const
{
return
m_autolinkSupport
; }
34
int
sectionLevel
()
const
{
return
m_sectionLevel
; }
35
36
// === setters for optional params
37
38
/// Indicates whether or not words should be put in the search index.
39
DocOptions
&
setIndexWords
(
bool
b)
40
{
m_indexWords
=b;
return
*
this
; }
41
42
/// Associate this comment block with a given example
43
DocOptions
&
setExample
(
const
DString
&name)
44
{
m_isExample
=!name.
empty
();
m_exampleName
= name;
return
*
this
; }
45
46
/// Select if this is for a single line, so without starting a new paragraph at the end.
47
DocOptions
&
setSingleLine
(
bool
b)
48
{
m_singleLine
=b;
return
*
this
; }
49
50
/// Select if the documentation is generated from an
51
/// index page. In this case context is not used to determine
52
/// the relative path when making a link.
53
DocOptions
&
setLinkFromIndex
(
bool
b)
54
{
m_linkFromIndex
=b;
return
*
this
; }
55
56
/// Select if the input needs to take markdown markup into account.
57
DocOptions
&
setMarkdownSupport
(
bool
b)
58
{
m_markdownSupport
=b;
return
*
this
; }
59
60
/// Select if the input need to perform auto linking of words
61
DocOptions
&
setAutolinkSupport
(
bool
b)
62
{
m_autolinkSupport
=b;
return
*
this
; }
63
64
/// Restrict output up to the given section level
65
DocOptions
&
setSectionLevel
(
int
l)
66
{
m_sectionLevel
=l;
return
*
this
; }
67
68
private
:
69
// optional params with defaults
70
bool
m_indexWords
=
false
;
71
bool
m_isExample
=
false
;
72
DString
m_exampleName
;
73
bool
m_singleLine
=
false
;
74
bool
m_linkFromIndex
=
false
;
75
bool
m_markdownSupport
=
Config_getBool
(MARKDOWN_SUPPORT);
76
bool
m_autolinkSupport
=
Config_getBool
(AUTOLINK_SUPPORT);
77
int
m_sectionLevel
= -1;
78
};
79
80
#endif
81
DString
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition
dstring.h:88
DString::empty
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition
dstring.h:152
config.h
Config_getBool
#define Config_getBool(name)
Definition
config.h:33
dstring.h
DocOptions
Helper class to pass options when calling OutputList::generateDoc().
Definition
docoptions.h:24
DocOptions::m_isExample
bool m_isExample
Definition
docoptions.h:71
DocOptions::m_autolinkSupport
bool m_autolinkSupport
Definition
docoptions.h:76
DocOptions::setLinkFromIndex
DocOptions & setLinkFromIndex(bool b)
Select if the documentation is generated from an index page.
Definition
docoptions.h:53
DocOptions::setSingleLine
DocOptions & setSingleLine(bool b)
Select if this is for a single line, so without starting a new paragraph at the end.
Definition
docoptions.h:47
DocOptions::setMarkdownSupport
DocOptions & setMarkdownSupport(bool b)
Select if the input needs to take markdown markup into account.
Definition
docoptions.h:57
DocOptions::autolinkSupport
bool autolinkSupport() const
Definition
docoptions.h:33
DocOptions::setExample
DocOptions & setExample(const DString &name)
Associate this comment block with a given example.
Definition
docoptions.h:43
DocOptions::m_indexWords
bool m_indexWords
Definition
docoptions.h:70
DocOptions::exampleName
DString exampleName() const
Definition
docoptions.h:29
DocOptions::linkFromIndex
bool linkFromIndex() const
Definition
docoptions.h:31
DocOptions::markdownSupport
bool markdownSupport() const
Definition
docoptions.h:32
DocOptions::sectionLevel
int sectionLevel() const
Definition
docoptions.h:34
DocOptions::setSectionLevel
DocOptions & setSectionLevel(int l)
Restrict output up to the given section level.
Definition
docoptions.h:65
DocOptions::m_linkFromIndex
bool m_linkFromIndex
Definition
docoptions.h:74
DocOptions::setAutolinkSupport
DocOptions & setAutolinkSupport(bool b)
Select if the input need to perform auto linking of words.
Definition
docoptions.h:61
DocOptions::m_markdownSupport
bool m_markdownSupport
Definition
docoptions.h:75
DocOptions::setIndexWords
DocOptions & setIndexWords(bool b)
Indicates whether or not words should be put in the search index.
Definition
docoptions.h:39
DocOptions::indexWords
bool indexWords() const
Definition
docoptions.h:27
DocOptions::singleLine
bool singleLine() const
Definition
docoptions.h:30
DocOptions::m_singleLine
bool m_singleLine
Definition
docoptions.h:73
DocOptions::m_sectionLevel
int m_sectionLevel
Definition
docoptions.h:77
DocOptions::m_exampleName
DString m_exampleName
Definition
docoptions.h:72
DocOptions::isExample
bool isExample() const
Definition
docoptions.h:28
src
docoptions.h
Generated by
1.19.0