0.5.4
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-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
23
25
28
29enum class relationship_t {
30 kNone,
39 kAlias,
42};
43
44/// Types of sequence diagram activity elements
45enum class message_t {
46 kCall,
47 kReturn,
48 kIf,
49 kElse,
50 kElseIf,
51 kIfEnd,
52 kWhile,
54 kDo,
55 kDoEnd,
56 kFor,
57 kForEnd,
58 kTry,
59 kCatch,
60 kTryEnd,
61 kSwitch,
62 kCase,
67 kNone
68};
69
70/// The scope of the call expression represented in the sequence diagram
71enum 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
77std::string to_string(relationship_t r);
78
79std::string to_string(access_t r);
80
81std::string to_string(module_access_t r);
82
83std::string to_string(message_t m);
84
85std::string to_string(diagram_t r);
86
87std::string to_string(message_scope_t t);
88
89diagram_t from_string(const std::string &s);
90
91} // namespace clanguml::common::model