0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
class_diagram
model
objc_interface.h
Go to the documentation of this file.
1
/**
2
* @file src/class_diagram/model/objc_interface.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 "
common/model/element.h
"
21
#include "
common/model/stylable_element.h
"
22
#include "
objc_member.h
"
23
#include "
objc_method.h
"
24
25
#include <string>
26
#include <vector>
27
28
namespace
clanguml::class_diagram::model
{
29
30
/*
31
* @brief Diagram element representing an ObjC interface.
32
*/
33
class
objc_interface
:
public
common::model::element
,
34
public
common::model::stylable_element
{
35
public
:
36
objc_interface
(
const
common::model::namespace_
&using_namespaces);
37
38
objc_interface
(
const
objc_interface
&) =
delete
;
39
objc_interface
(
objc_interface
&&) =
delete
;
40
objc_interface
&
operator=
(
const
objc_interface
&) =
delete
;
41
objc_interface
&
operator=
(
objc_interface
&&) =
delete
;
42
43
std::string
type_name
()
const override
44
{
45
if
(
is_protocol
())
46
return
"objc_protocol"
;
47
48
if
(
is_category
())
49
return
"objc_category"
;
50
51
return
"objc_interface"
;
52
}
53
54
friend
bool
operator==
(
const
objc_interface
&l,
const
objc_interface
&r);
55
56
void
add_member
(
objc_member
&&member);
57
58
void
add_method
(
objc_method
&&method);
59
60
const
std::vector<objc_member> &
members
()
const
;
61
62
const
std::vector<objc_method> &
methods
()
const
;
63
64
bool
is_protocol
()
const
;
65
66
void
is_protocol
(
bool
ip);
67
68
bool
is_category
()
const
;
69
70
void
is_category
(
bool
cat);
71
72
/**
73
* @brief Get Doxygen link to documentation page for this element.
74
*
75
* @return Doxygen link for this element.
76
*/
77
std::optional<std::string>
doxygen_link
()
const override
;
78
79
protected
:
80
std::string
full_name_impl
(
bool
relative =
true
)
const override
;
81
82
private
:
83
std::vector<objc_member>
members_
;
84
std::vector<objc_method>
methods_
;
85
bool
is_protocol_
{
false
};
86
bool
is_category_
{
false
};
87
};
88
89
}
// namespace clanguml::class_diagram::model
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7