0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
class_diagram
model
enum.h
Go to the documentation of this file.
1
/**
2
* @file src/class_diagram/model/enum.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.h
"
21
22
#include <string>
23
#include <vector>
24
25
namespace
clanguml::class_diagram::model
{
26
27
/*
28
* @brief Diagram element representing an enum.
29
*/
30
class
enum_
:
public
common::model::element
,
31
public
common::model::stylable_element
{
32
public
:
33
enum_
(
const
common::model::namespace_
&using_namespaces);
34
35
enum_
(
const
enum_
&) =
delete
;
36
enum_
(
enum_
&&) =
delete
;
37
enum_
&
operator=
(
const
enum_
&) =
delete
;
38
enum_
&
operator=
(
enum_
&&) =
delete
;
39
40
std::string
type_name
()
const override
{
return
"enum"
; }
41
42
friend
bool
operator==
(
const
enum_
&l,
const
enum_
&r);
43
44
/**
45
* @brief Get the enums constants.
46
*
47
* @return Enums constants names list.
48
*/
49
std::vector<std::string> &
constants
();
50
51
/**
52
* @brief Get the enums constants.
53
*
54
* @return Enums constants names list.
55
*/
56
const
std::vector<std::string> &
constants
()
const
;
57
58
/**
59
* @brief Get Doxygen link to documentation page for this element.
60
*
61
* @return Doxygen link for this element.
62
*/
63
std::optional<std::string>
doxygen_link
()
const override
;
64
65
protected
:
66
std::string
full_name_impl
(
bool
relative =
true
)
const override
;
67
68
private
:
69
std::vector<std::string>
constants_
;
70
};
71
72
}
// namespace clanguml::class_diagram::model
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7