-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathEnumerations.h
91 lines (74 loc) · 1.94 KB
/
Enumerations.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef ENUMERATIONS_H
#define ENUMERATIONS_H
#include <QStandardItem>
namespace q2d {
// FIXME deprecated
/**
* @brief The ComponentDescriptorRole enum lists all roles
* that can be fulfilled by data of an item in the component hierarchy.
*/
enum ComponentDescriptorRole {
CIRCUIT_SYMBOL_FILE = Qt::UserRole + 2000,
DESCRIPTOR_FILE, // path to the descriptor file that was used for instantiating
PORT_DIRECTION,
PORT_POSITION,
HIERARCHY_NAME
};
namespace enums {
enum class DocumentEntryType {
COMPONENT,
MODULE_INTERFACE,
PORT,
WIRE,
UNDEFINED
};
extern QMap<DocumentEntryType, QString> map_DocumentEntryType;
QString DocumentEntryTypeToString(const DocumentEntryType type);
DocumentEntryType StringToDocumentEntryType(const QString string);
}
namespace metamodel {
namespace enums {
/**
* @brief The Type enum lists all concrete types of which a metamodel element can be.
* Purely virtual types are ommitted.
*/
enum class ElementType {
CATEGORY = QStandardItem::UserType + 2000,
COMPONENT,
CONFIG_BIT_GROUP,
CONFIG_BIT,
PORT,
FUNCTION,
INVALID
};
int elementTypeToInt(ElementType t);
ElementType intToElementType(int i);
} // namespace enums
} // namespace metamodel
namespace model {
namespace enums {
enum class PortDirection {
IN,
OUT,
IN_OUT,
UNSPECIFIED
};
PortDirection StringToPortDirection(const QString string);
QString PortDirectionToString(const PortDirection direction);
PortDirection invert(const PortDirection initial);
/**
* @brief The ConfigurationBitState enum
* Represents the state of an q2d::model::ConfigurationBit
*
* Usually, the state is NOT_SET and may be changed to TRUE or FALSE after solving the SAT-problem
* that is posed by the schematic, by the means of backward annotation.
*/
enum class ConfigurationBitState {
FALSE,
TRUE,
NOT_SET
};
} // namespace enums
} // namespace model
} // namespace q2d
#endif // ENUMERATIONS_H