0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
src
common
model
enums.h
Go to the documentation of this file.
1
/**
2
* @file src/common/model/enums.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 <string>
21
22
#include "
util/fmt_formatters.h
"
23
24
namespace
clanguml::common::model
{
25
26
enum class
diagram_t
{
kClass
,
kSequence
,
kPackage
,
kInclude
};
27
28
enum class
module_access_t
{
kPublic
,
kPrivate
};
29
enum class
access_t
{
kPublic
,
kProtected
,
kPrivate
,
kNone
};
30
31
enum class
relationship_t
{
32
kNone
,
33
kExtension
,
34
kComposition
,
35
kAggregation
,
36
kContainment
,
37
kOwnership
,
38
kAssociation
,
39
kInstantiation
,
40
kFriendship
,
41
kAlias
,
42
kDependency
,
43
kConstraint
44
};
45
46
/// Types of sequence diagram activity elements
47
enum class
message_t
{
48
kCall
,
49
kReturn
,
50
kIf
,
51
kElse
,
52
kElseIf
,
53
kIfEnd
,
54
kWhile
,
55
kWhileEnd
,
56
kDo
,
57
kDoEnd
,
58
kFor
,
59
kForEnd
,
60
kTry
,
61
kCatch
,
62
kTryEnd
,
63
kSwitch
,
64
kCase
,
65
kSwitchEnd
,
66
kConditional
,
67
kConditionalElse
,
68
kConditionalEnd
,
69
kNone
70
};
71
72
/// The scope of the call expression represented in the sequence diagram
73
enum class
message_scope_t
{
74
kNormal
,
// This is a regular call expression
75
kCondition
// This is a call expression from within a control condition
76
// e.g if(a->is_valid()) { ... }
77
};
78
79
std::string
to_string
(
relationship_t
r);
80
81
std::string
to_string
(
access_t
r);
82
83
std::string
to_string
(
module_access_t
r);
84
85
std::string
to_string
(
message_t
m);
86
87
std::string
to_string
(
diagram_t
r);
88
89
std::string
to_string
(
message_scope_t
t);
90
91
diagram_t
from_string
(
const
std::string &s);
92
93
}
// namespace clanguml::common::model
94
95
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::relationship_t
)
96
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::access_t
)
97
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::module_access_t
)
98
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::message_t
)
99
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::diagram_t
)
100
MAKE_TO_STRING_FORMATTER
(
clanguml::common::model::message_scope_t
)
Copyright © 2022-present
Bartek Kryza
Generated by
1.9.7