Blender V4.3
BLI_dot_export_attribute_enums.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_string_ref.hh"
8
9namespace blender ::dot {
10
11enum class Attr_rankdir {
12 LeftToRight,
14};
15
16inline StringRef rankdir_to_string(Attr_rankdir value)
17{
18 switch (value) {
19 case Attr_rankdir::LeftToRight:
20 return "LR";
21 case Attr_rankdir::TopToBottom:
22 return "TB";
23 }
24 return "";
25}
26
27enum class Attr_shape {
29 Ellipse,
30 Circle,
31 Point,
32 Diamond,
33 Square,
34};
35
36inline StringRef shape_to_string(Attr_shape value)
37{
38 switch (value) {
39 case Attr_shape::Rectangle:
40 return "rectangle";
41 case Attr_shape::Ellipse:
42 return "ellipse";
43 case Attr_shape::Circle:
44 return "circle";
45 case Attr_shape::Point:
46 return "point";
47 case Attr_shape::Diamond:
48 return "diamond";
49 case Attr_shape::Square:
50 return "square";
51 }
52 return "";
53}
54
55enum class Attr_arrowType {
56 Normal,
57 Inv,
58 Dot,
59 None,
60 Empty,
61 Box,
62 Vee,
63};
64
65inline StringRef arrowType_to_string(Attr_arrowType value)
66{
67 switch (value) {
68 case Attr_arrowType::Normal:
69 return "normal";
70 case Attr_arrowType::Inv:
71 return "inv";
72 case Attr_arrowType::Dot:
73 return "dot";
74 case Attr_arrowType::None:
75 return "none";
76 case Attr_arrowType::Empty:
77 return "empty";
78 case Attr_arrowType::Box:
79 return "box";
80 case Attr_arrowType::Vee:
81 return "vee";
82 }
83 return "";
84}
85
86enum class Attr_dirType {
87 Forward,
88 Back,
89 Both,
90 None,
91};
92
93inline StringRef dirType_to_string(Attr_dirType value)
94{
95 switch (value) {
96 case Attr_dirType::Forward:
97 return "forward";
98 case Attr_dirType::Back:
99 return "back";
100 case Attr_dirType::Both:
101 return "both";
102 case Attr_dirType::None:
103 return "none";
104 }
105 return "";
106}
107
108} // namespace blender::dot
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Normal
static btScalar Dot(const btScalar *a, const btScalar *b, int ndof)
#define Square(a, x, y)
StringRef dirType_to_string(Attr_dirType value)
StringRef shape_to_string(Attr_shape value)
StringRef rankdir_to_string(Attr_rankdir value)
StringRef arrowType_to_string(Attr_arrowType value)