0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
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
22
24 const std::string &name, const std::string &type)
25 : class_method_base{access, name, type}
26{
27}
28
30{
31 if (template_params().empty()) {
33 }
34 else {
35 std::stringstream template_params_str;
36 render_template_params(template_params_str, un, true);
38 fmt::format("{}{}", name(), template_params_str.str()));
39 }
40}
41
43
44void class_method::is_pure_virtual(bool is_pure_virtual)
45{
47}
48
49bool class_method::is_virtual() const { return is_virtual_; }
50
52
53bool class_method::is_const() const { return is_const_; }
54
55void class_method::is_const(bool is_const) { is_const_ = is_const; }
56
58
59void class_method::is_defaulted(bool is_defaulted)
60{
62}
63
64bool class_method::is_deleted() const { return is_deleted_; }
65
67
69
70void class_method::is_constexpr(bool is_constexpr)
71{
73}
74
76
77void class_method::is_consteval(bool is_consteval)
78{
80}
81
83
84void class_method::is_coroutine(bool is_coroutine)
85{
87}
88
90
92
94
95void class_method::is_constructor(bool is_constructor)
96{
98}
99
101
102void class_method::is_destructor(bool is_destructor)
103{
105}
106
108
109void class_method::is_move_assignment(bool is_move_assignment)
110{
112}
113
115
116void class_method::is_copy_assignment(bool is_copy_assignment)
117{
119}
120
122
124
125} // namespace clanguml::class_diagram::model