-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNodeFeatures.py
More file actions
36 lines (33 loc) · 1.57 KB
/
NodeFeatures.py
File metadata and controls
36 lines (33 loc) · 1.57 KB
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
from enum import Enum
# node types in the type graph
class NodeTypes(Enum):
"""
Enum representing different types of nodes in a type graph.
Each node type corresponds to a specific element in the type system,
providing a way to categorize and manage these elements programmatically.
"""
# TPackage
PACKAGE = "TPackage"
# TModule
MODULE = "TModule"
# TClass
CLASS = "TClass"
# TMethod
METHOD = "TMethod"
METHOD_SIGNATURE = "TMethodSignature" # missing firstParameter does not need to be implemented.
METHOD_DEFINITION = "TMethodDefinition" # missing "".overloading and "".overloadedBY does not need to be implemented.
PARAMETER = "TParameter"
# TField
FIELD = "TField"
FIELD_SIGNATURE = "TFieldSignature" # Todo implement this in AstToEcoreConverter (only missing TFieldSignature.type)
FIELD_DEFINITION = "TFieldDefinition" # missing TFieldDefinition.hidden and "".hiddenBy does not to be implemented
# TAccess
CALL = "TCall"
READ = "TRead" # Todo implement this in AstToEcoreConverter
WRITE = "TWrite" # Todo implement this in AstToEcoreConverter
READ_WRITE = "TReadWrite" # Todo implement this in AstToEcoreConverter
# TInterface
INTERFACE = "TInterface"
# In Python, there is no formal concept of interfaces as found in some other programming languages like Java or C#.
# However, Python supports a similar concept through the use of abstract base classes (ABCs) and duck typing.
# The return on investment probably is not sufficient to justify the implementation.