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
#include <algorithm>
15
16
#include "
arguments.h
"
17
#include "
util.h
"
18
19
/*! the argument list is documented if one of its
20
* arguments is documented
21
*/
22
bool
ArgumentList::hasDocumentation
()
const
23
{
24
return
std::any_of(
begin
(),
end
(),[](
const
Argument
&a){
return
a.
hasDocumentation
(); });
25
}
26
27
/*! the template argument list is documented if one of its
28
* template arguments is documented
29
*/
30
bool
ArgumentList::hasTemplateDocumentation
()
const
31
{
32
return
std::any_of(
begin
(),
end
(),[](
const
Argument
&a){
return
a.
hasTemplateDocumentation
(); });
33
}
34
35
/*! Sets the trailing return type for a method */
36
void
ArgumentList::setTrailingReturnType
(
const
QCString
&s)
37
{
38
m_trailingReturnType
= s;
39
}
40
41
void
ArgumentList::appendTrailingReturnType
(
const
QCString
&s)
42
{
43
m_trailingReturnType
+= s;
44
}
45
46
void
ArgumentList::finishTrailingReturnType
()
47
{
48
if
(!
m_trailingReturnType
.isEmpty())
49
{
50
m_trailingReturnType
=
" "
+
removeRedundantWhiteSpace
(
m_trailingReturnType
);
51
}
52
}
arguments.h
ArgumentList::appendTrailingReturnType
void appendTrailingReturnType(const QCString &s)
Definition
arguments.cpp:41
ArgumentList::m_trailingReturnType
QCString m_trailingReturnType
Definition
arguments.h:138
ArgumentList::end
iterator end()
Definition
arguments.h:94
ArgumentList::setTrailingReturnType
void setTrailingReturnType(const QCString &s)
Definition
arguments.cpp:36
ArgumentList::hasDocumentation
bool hasDocumentation() const
Definition
arguments.cpp:22
ArgumentList::hasTemplateDocumentation
bool hasTemplateDocumentation() const
Definition
arguments.cpp:30
ArgumentList::finishTrailingReturnType
void finishTrailingReturnType()
Definition
arguments.cpp:46
ArgumentList::begin
iterator begin()
Definition
arguments.h:93
QCString
This is an alternative implementation of QCString.
Definition
qcstring.h:101
Argument
This class contains the information about the argument of a function or template.
Definition
arguments.h:27
Argument::hasDocumentation
bool hasDocumentation() const
Definition
arguments.h:31
Argument::hasTemplateDocumentation
bool hasTemplateDocumentation() const
Definition
arguments.h:36
removeRedundantWhiteSpace
QCString removeRedundantWhiteSpace(const QCString &s)
Definition
util.cpp:568
util.h
A bunch of utility functions.
src
arguments.cpp
Generated by
1.17.0