0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
class_diagram
model
class_method.cc
Go to the documentation of this file.
1
/**
2
* @file src/class_diagram/model/class_method.cc
3
*
4
* Copyright (c) 2021-2025 Bartek Kryza <bkryza@gmail.com>
5
*
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
9
*
10
* http://www.apache.org/licenses/LICENSE-2.0
11
*
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
17
*/
18
19
#include "
class_method.h
"
20
21
namespace
clanguml::class_diagram::model
{
22
23
class_method::class_method
(
common::model::access_t
access,
24
const
std::string &name,
const
std::string &type)
25
:
class_method_base
{access, name, type}
26
{
27
}
28
29
void
class_method::update
(
const
common::model::namespace_
&un)
30
{
31
if
(
template_params
().empty()) {
32
set_display_name
(
name
());
33
}
34
else
{
35
std::stringstream template_params_str;
36
render_template_params
(template_params_str, un,
true
);
37
set_display_name
(
38
fmt::format(
"{}{}"
,
name
(), template_params_str.str()));
39
}
40
}
41
42
bool
class_method::is_pure_virtual
()
const
{
return
is_pure_virtual_
; }
43
44
void
class_method::is_pure_virtual
(
bool
is_pure_virtual)
45
{
46
is_pure_virtual_
=
is_pure_virtual
;
47
}
48
49
bool
class_method::is_virtual
()
const
{
return
is_virtual_
; }
50
51
void
class_method::is_virtual
(
bool
is_virtual) {
is_virtual_
=
is_virtual
; }
52
53
bool
class_method::is_const
()
const
{
return
is_const_
; }
54
55
void
class_method::is_const
(
bool
is_const) {
is_const_
=
is_const
; }
56
57
bool
class_method::is_defaulted
()
const
{
return
is_defaulted_
; }
58
59
void
class_method::is_defaulted
(
bool
is_defaulted)
60
{
61
is_defaulted_
=
is_defaulted
;
62
}
63
64
bool
class_method::is_deleted
()
const
{
return
is_deleted_
; }
65
66
void
class_method::is_deleted
(
bool
is_deleted) {
is_deleted_
=
is_deleted
; }
67
68
bool
class_method::is_constexpr
()
const
{
return
is_constexpr_
; }
69
70
void
class_method::is_constexpr
(
bool
is_constexpr)
71
{
72
is_constexpr_
=
is_constexpr
;
73
}
74
75
bool
class_method::is_consteval
()
const
{
return
is_consteval_
; }
76
77
void
class_method::is_consteval
(
bool
is_consteval)
78
{
79
is_consteval_
=
is_consteval
;
80
}
81
82
bool
class_method::is_coroutine
()
const
{
return
is_coroutine_
; }
83
84
void
class_method::is_coroutine
(
bool
is_coroutine)
85
{
86
is_coroutine_
=
is_coroutine
;
87
}
88
89
bool
class_method::is_noexcept
()
const
{
return
is_noexcept_
; }
90
91
void
class_method::is_noexcept
(
bool
is_noexcept) {
is_noexcept_
=
is_noexcept
; }
92
93
bool
class_method::is_constructor
()
const
{
return
is_constructor_
; }
94
95
void
class_method::is_constructor
(
bool
is_constructor)
96
{
97
is_constructor_
=
is_constructor
;
98
}
99
100
bool
class_method::is_destructor
()
const
{
return
is_destructor_
; }
101
102
void
class_method::is_destructor
(
bool
is_destructor)
103
{
104
is_destructor_
=
is_destructor
;
105
}
106
107
bool
class_method::is_move_assignment
()
const
{
return
is_move_assignment_
; }
108
109
void
class_method::is_move_assignment
(
bool
is_move_assignment)
110
{
111
is_move_assignment_
=
is_move_assignment
;
112
}
113
114
bool
class_method::is_copy_assignment
()
const
{
return
is_copy_assignment_
; }
115
116
void
class_method::is_copy_assignment
(
bool
is_copy_assignment)
117
{
118
is_copy_assignment_
=
is_copy_assignment
;
119
}
120
121
bool
class_method::is_operator
()
const
{
return
is_operator_
; }
122
123
void
class_method::is_operator
(
bool
is_operator) {
is_operator_
=
is_operator
; }
124
125
}
// namespace clanguml::class_diagram::model
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7