Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
arguments.cpp
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (C) 1997-2025 by Dimitri van Heesch.
3
*
4
* Permission to use, copy, modify, and distribute this software and its
5
* documentation under the terms of the GNU General Public License is hereby
6
* granted. No representations are made about the suitability of this software
7
* for any purpose. It is provided "as is" without express or implied warranty.
8
* See the GNU General Public License for more details.
9
*
10
* Documents produced by Doxygen are derivative works derived from the
11
* input used in their production; they are not affected by this license.
12
*/
13
14
// own include
15
#include "
arguments.h
"
16
17
// standard includes
18
#include <algorithm>
19
20
// other includes
21
#include "
util.h
"
22
23
/*! the argument list is documented if one of its
24
* arguments is documented
25
*/
26
bool
ArgumentList::hasDocumentation
(
bool
allowEmptyNames)
const
27
{
28
return
std::any_of(
begin
(),
end
(),[allowEmptyNames](
const
Argument
&a){
return
a.
hasDocumentation
(allowEmptyNames); });
29
}
30
31
/*! the template argument list is documented if one of its
32
* template arguments is documented
33
*/
34
bool
ArgumentList::hasTemplateDocumentation
()
const
35
{
36
return
std::any_of(
begin
(),
end
(),[](
const
Argument
&a){
return
a.
hasTemplateDocumentation
(); });
37
}
38
39
/*! Sets the trailing return type for a method */
40
void
ArgumentList::setTrailingReturnType
(
const
DString
&s)
41
{
42
m_trailingReturnType
= s;
43
}
44
45
void
ArgumentList::appendTrailingReturnType
(
const
DString
&s)
46
{
47
m_trailingReturnType
+= s;
48
}
49
50
void
ArgumentList::finishTrailingReturnType
()
51
{
52
if
(!
m_trailingReturnType
.
empty
())
53
{
54
m_trailingReturnType
=
" "
+
removeRedundantWhiteSpace
(
m_trailingReturnType
);
55
}
56
}
arguments.h
Argument
This class contains the information about the argument of a function or template.
Definition
arguments.h:27
Argument::hasDocumentation
bool hasDocumentation(bool allowEmptyName=false) const
Definition
arguments.h:32
Argument::hasTemplateDocumentation
bool hasTemplateDocumentation() const
Definition
arguments.h:37
ArgumentList::end
iterator end()
Definition
arguments.h:95
ArgumentList::m_trailingReturnType
DString m_trailingReturnType
Definition
arguments.h:139
ArgumentList::appendTrailingReturnType
void appendTrailingReturnType(const DString &s)
Definition
arguments.cpp:45
ArgumentList::hasDocumentation
bool hasDocumentation(bool allowEmptyNames=false) const
Definition
arguments.cpp:26
ArgumentList::setTrailingReturnType
void setTrailingReturnType(const DString &s)
Definition
arguments.cpp:40
ArgumentList::hasTemplateDocumentation
bool hasTemplateDocumentation() const
Definition
arguments.cpp:34
ArgumentList::finishTrailingReturnType
void finishTrailingReturnType()
Definition
arguments.cpp:50
ArgumentList::begin
iterator begin()
Definition
arguments.h:94
DString
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition
dstring.h:84
DString::empty
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
Definition
dstring.h:148
removeRedundantWhiteSpace
DString removeRedundantWhiteSpace(const DString &s)
Definition
util.cpp:426
util.h
A bunch of utility functions.
src
arguments.cpp
Generated by
1.19.0