forked from naddison36/sol2uml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
umlClass.d.ts
86 lines (86 loc) · 1.88 KB
/
umlClass.d.ts
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
export declare enum Visibility {
None = 0,
Public = 1,
External = 2,
Internal = 3,
Private = 4
}
export declare enum ClassStereotype {
None = 0,
Library = 1,
Interface = 2,
Abstract = 3,
Contract = 4,
Struct = 5,
Enum = 6
}
export declare enum OperatorStereotype {
None = 0,
Modifier = 1,
Event = 2,
Payable = 3,
Fallback = 4,
Abstract = 5
}
export interface Parameter {
name?: string;
type: string;
}
export interface Attribute {
visibility?: Visibility;
name: string;
type?: string;
}
export interface Operator extends Attribute {
stereotype?: OperatorStereotype;
parameters?: Parameter[];
returnParameters?: Parameter[];
isPayable?: boolean;
}
export declare enum ReferenceType {
Memory = 0,
Storage = 1
}
export interface Association {
referenceType: ReferenceType;
targetUmlClassName: string;
targetUmlClassStereotype?: ClassStereotype;
realization?: boolean;
}
export interface ClassProperties {
name: string;
absolutePath: string;
relativePath: string;
importedFileNames?: string[];
stereotype?: ClassStereotype;
enums?: {
[name: string]: string[];
};
attributes?: Attribute[];
operators?: Operator[];
associations?: {
[name: string]: Association;
};
}
export declare class UmlClass implements ClassProperties {
static idCounter: number;
id: number;
name: string;
absolutePath: string;
relativePath: string;
importedPaths?: string[];
stereotype?: ClassStereotype;
attributes: Attribute[];
operators: Operator[];
enums: {
[name: string]: string[];
};
structs: {
[name: string]: Parameter[];
};
associations: {
[name: string]: Association;
};
constructor(properties: ClassProperties);
addAssociation(association: Association): void;
}