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