0.6.0
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
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
25
27
30
31enum class relationship_t {
32 kNone,
41 kAlias,
44};
45
46/// Types of sequence diagram activity elements
47enum class message_t {
48 kCall,
49 kReturn,
50 kIf,
51 kElse,
52 kElseIf,
53 kIfEnd,
54 kWhile,
56 kDo,
57 kDoEnd,
58 kFor,
59 kForEnd,
60 kTry,
61 kCatch,
62 kTryEnd,
63 kSwitch,
64 kCase,
69 kNone
70};
71
72/// The scope of the call expression represented in the sequence diagram
73enum 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
79std::string to_string(relationship_t r);
80
81std::string to_string(access_t r);
82
83std::string to_string(module_access_t r);
84
85std::string to_string(message_t m);
86
87std::string to_string(diagram_t r);
88
89std::string to_string(message_scope_t t);
90
91diagram_t from_string(const std::string &s);
92
93} // namespace clanguml::common::model
94