0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
class_diagram
model
objc_method.h
Go to the documentation of this file.
1
/**
2
* @file src/class_diagram/model/objc_method.h
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
#pragma once
19
20
#include "
class_method_base.h
"
21
#include "
method_parameter.h
"
22
23
#include <string>
24
#include <vector>
25
26
namespace
clanguml::class_diagram::model
{
27
28
/**
29
* @brief ObjC class method model.
30
*
31
* This includes both interface and protocol methods.
32
*/
33
class
objc_method
:
public
class_method_base
{
34
public
:
35
/**
36
* @brief Constructor.
37
*
38
* @param access Methods access scope (e.g. public)
39
* @param name Methods name.
40
* @param type Methods return type as string.
41
*/
42
objc_method
(
common::model::access_t
access
,
const
std::string &
name
,
43
const
std::string &
type
);
44
45
~objc_method
()
override
=
default
;
46
47
/**
48
* @brief Sets whether the protocol method is optional.
49
*
50
* @param io A boolean value indicating whether the method is optional.
51
*/
52
void
is_optional
(
bool
io);
53
54
/**
55
* @brief Checks if the protocol method is optional.
56
*
57
* @return True if the method is optional, false otherwise.
58
*/
59
bool
is_optional
()
const
;
60
61
private
:
62
bool
is_optional_
{
false
};
63
};
64
}
// namespace clanguml::class_diagram::model
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7