Skip to content

Commit cabf0df

Browse files
authored
Merge pull request #35 from moosetechnology/add-relation
Update C and preproc Metamodel
2 parents da30aa2 + 0ff8cf9 commit cabf0df

File tree

56 files changed

+1492
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1492
-371
lines changed

src/BaselineOfFamixCpp/BaselineOfFamixCpp.class.st

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,53 @@
22
Baseline of cpps
33
"
44
Class {
5-
#name : #BaselineOfFamixCpp,
6-
#superclass : #BaselineOf,
7-
#category : #BaselineOfFamixCpp
5+
#name : 'BaselineOfFamixCpp',
6+
#superclass : 'BaselineOf',
7+
#category : 'BaselineOfFamixCpp',
8+
#package : 'BaselineOfFamixCpp'
89
}
910

10-
{ #category : #baselines }
11+
{ #category : 'baselines' }
1112
BaselineOfFamixCpp >> baseline: spec [
1213

1314
<baseline>
1415
spec for: #common do: [
15-
self petitParser2: spec.
16-
self xmlParserHtml: spec.
16+
self petitParser2: spec.
17+
self xmlParserHtml: spec.
1718

18-
spec
19-
package: 'Famix-CPreproc-Generator';
20-
package: 'Famix-CPreproc-Entities';
21-
22-
package: 'Famix-C-Generator';
23-
package: 'Famix-C-Entities'
24-
with: [ spec requires: #( 'Famix-CPreproc-Entities' ) ];
25-
26-
package: 'Famix-Cpp-Generator';
27-
package: 'Famix-Cpp-Entities'
28-
with: [ spec requires: #( 'Famix-CPreproc-Entities' 'Famix-C-Entities' ) ];
29-
package: 'Famix-Cpp-Entities-Tests'
30-
with: [ spec requires: #( 'Famix-Cpp-Entities' ) ];
31-
32-
package: 'Famix-Cpp-Parser'
33-
with: [ spec requires: #( 'PetitParser2Core' ) ];
34-
package: 'Famix-Cpp-Parser-Tests'
35-
with: [ spec requires: #( 'Famix-Cpp-Parser' ) ];
36-
37-
package: 'Famix-CPreproc-Importer'
38-
with: [ spec requires: #( 'Famix-CPreproc-Entities' XMLParserHTML ) ];
39-
package: 'Famix-CPreproc-Importer-Tests'
40-
with: [ spec requires: #( 'Famix-CPreproc-Importer' ) ] ]
19+
spec
20+
package: 'Famix-Preproc-Generator';
21+
package: 'Famix-Preproc-Traits';
22+
package: 'Famix-C-Generator';
23+
package: 'Famix-C-Entities' with: [ spec requires: #( 'Famix-Preproc-Traits' ) ];
24+
package: 'Famix-Cpp-Generator';
25+
package: 'Famix-Cpp-Entities' with: [ spec requires: #( 'Famix-C-Entities' ) ];
26+
package: 'Famix-Cpp-Entities-Tests' with: [ spec requires: #( 'Famix-Cpp-Entities' ) ];
27+
package: 'Famix-Cpp-Parser' with: [ spec requires: #( 'PetitParser2Core' ) ];
28+
package: 'Famix-Cpp-Parser-Tests' with: [ spec requires: #( 'Famix-Cpp-Parser' ) ];
29+
package: 'Famix-CPreproc-Generator';
30+
package: 'Famix-CPreproc-Entities';
31+
package: 'Famix-CPreproc-Importer' with: [ spec requires: #( 'Famix-CPreproc-Entities' XMLParserHTML ) ];
32+
package: 'Famix-CPreproc-Importer-Tests' with: [ spec requires: #( 'Famix-CPreproc-Importer' ) ].
33+
34+
spec
35+
group: 'Preprocessing' with: #( 'Famix-Preproc-Generator' 'Famix-Preproc-Traits' );
36+
group: 'OldPreprocessing' with: #( 'Famix-CPreproc-Generator' 'Famix-CPreproc-Entities' 'Famix-CPreproc-Importer' 'Famix-CPreproc-Importer-Tests' );
37+
group: 'C' with: #( 'Famix-C-Generator' 'Famix-C-Entities' );
38+
group: 'Cpp' with: #( 'Famix-Cpp-Generator' 'Famix-Cpp-Entities' 'Famix-Cpp-Entities-Tests' 'Famix-Cpp-Parser' 'Famix-Cpp-Parser-Tests' );
39+
group: 'All' with: #( 'Preprocessing' 'C' 'Cpp' 'OldPreprocessing' );
40+
group: 'default' with: #( 'Preprocessing' 'C' 'Cpp' ) ]
4141
]
4242

43-
{ #category : #dependencies }
43+
{ #category : 'dependencies' }
4444
BaselineOfFamixCpp >> petitParser2: spec [
4545

4646
spec
4747
baseline: 'PetitParser2Core'
4848
with: [ spec repository: 'github://kursjan/petitparser2' ]
4949
]
5050

51-
{ #category : #dependencies }
51+
{ #category : 'dependencies' }
5252
BaselineOfFamixCpp >> xmlParserHtml: spec [
5353

5454
spec baseline: 'XMLParserHTML' with: [

src/BaselineOfFamixCpp/package.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Package { #name : #BaselineOfFamixCpp }
1+
Package { #name : 'BaselineOfFamixCpp' }

src/Famix-C-Entities/FamixCAttribute.class.st

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
|---|
88
| `parentType` | `FamixTAttribute` | `attributes` | `FamixTWithAttributes` | Type declaring the attribute. belongsTo implementation|
99
10+
### Children
11+
| Relation | Origin | Opposite | Type | Comment |
12+
|---|
13+
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
14+
1015
### Outgoing dependencies
1116
| Relation | Origin | Opposite | Type | Comment |
1217
|---|
@@ -36,8 +41,8 @@
3641
Class {
3742
#name : 'FamixCAttribute',
3843
#superclass : 'FamixCNamedEntity',
39-
#traits : 'FamixTAttribute + FamixTInvocationsReceiver',
40-
#classTraits : 'FamixTAttribute classTrait + FamixTInvocationsReceiver classTrait',
44+
#traits : 'FamixTAttribute + FamixTInvocationsReceiver + FamixTWithComments',
45+
#classTraits : 'FamixTAttribute classTrait + FamixTInvocationsReceiver classTrait + FamixTWithComments classTrait',
4146
#category : 'Famix-C-Entities-Entities',
4247
#package : 'Famix-C-Entities',
4348
#tag : 'Entities'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"
2+
## Relations
3+
======================
4+
5+
### Outgoing dependencies
6+
| Relation | Origin | Opposite | Type | Comment |
7+
|---|
8+
| `includes` | `FamixPreprocTWithIncludes` | `includedBy` | `FamixPreprocTInclude` | All inclusions made by this C-File|
9+
10+
### Other
11+
| Relation | Origin | Opposite | Type | Comment |
12+
|---|
13+
| `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity|
14+
15+
16+
## Properties
17+
======================
18+
19+
| Name | Type | Default value | Comment |
20+
|---|
21+
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.|
22+
| `name` | `String` | nil | Basic name of the entity, not full reference.|
23+
24+
"
25+
Class {
26+
#name : 'FamixCCompilationUnit',
27+
#superclass : 'FamixCPreprocessingFile',
28+
#traits : 'FamixPreprocTWithIncludes + FamixTCanBeStub + FamixTNamedEntity + TEntityMetaLevelDependency',
29+
#classTraits : 'FamixPreprocTWithIncludes classTrait + FamixTCanBeStub classTrait + FamixTNamedEntity classTrait + TEntityMetaLevelDependency classTrait',
30+
#category : 'Famix-C-Entities-Entities',
31+
#package : 'Famix-C-Entities',
32+
#tag : 'Entities'
33+
}
34+
35+
{ #category : 'meta' }
36+
FamixCCompilationUnit class >> annotation [
37+
38+
<FMClass: #CompilationUnit super: #FamixCPreprocessingFile>
39+
<package: #'Famix-C-Entities'>
40+
<generated>
41+
^ self
42+
]
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
Class {
2+
#name : 'FamixCEntity',
3+
#superclass : 'MooseEntity',
4+
#category : 'Famix-C-Entities-Entities',
5+
#package : 'Famix-C-Entities',
6+
#tag : 'Entities'
7+
}
8+
9+
{ #category : 'meta' }
10+
FamixCEntity class >> annotation [
11+
12+
<FMClass: #Entity super: #MooseEntity>
13+
<package: #'Famix-C-Entities'>
14+
<generated>
15+
<abstract>
16+
^ self
17+
]
18+
19+
{ #category : 'testing' }
20+
FamixCEntity class >> isAbstract [
21+
22+
<generated>
23+
^ self == FamixCEntity
24+
]
25+
26+
{ #category : 'meta' }
27+
FamixCEntity class >> metamodel [
28+
29+
<generated>
30+
^ FamixCModel metamodel
31+
]
32+
33+
{ #category : 'testing' }
34+
FamixCEntity >> isAccess [
35+
36+
<generated>
37+
^ false
38+
]
39+
40+
{ #category : 'testing' }
41+
FamixCEntity >> isAssociation [
42+
43+
<generated>
44+
^ false
45+
]
46+
47+
{ #category : 'testing' }
48+
FamixCEntity >> isAttribute [
49+
50+
<generated>
51+
^ false
52+
]
53+
54+
{ #category : 'testing' }
55+
FamixCEntity >> isBehavioural [
56+
57+
<generated>
58+
^ false
59+
]
60+
61+
{ #category : 'testing' }
62+
FamixCEntity >> isComment [
63+
64+
<generated>
65+
^ false
66+
]
67+
68+
{ #category : 'testing' }
69+
FamixCEntity >> isEnumValue [
70+
71+
<generated>
72+
^ false
73+
]
74+
75+
{ #category : 'testing' }
76+
FamixCEntity >> isFileAnchor [
77+
78+
<generated>
79+
^ false
80+
]
81+
82+
{ #category : 'testing' }
83+
FamixCEntity >> isFunction [
84+
85+
<generated>
86+
^ false
87+
]
88+
89+
{ #category : 'testing' }
90+
FamixCEntity >> isGlobalVariable [
91+
92+
<generated>
93+
^ false
94+
]
95+
96+
{ #category : 'testing' }
97+
FamixCEntity >> isInvocation [
98+
99+
<generated>
100+
^ false
101+
]
102+
103+
{ #category : 'testing' }
104+
FamixCEntity >> isLocalVariable [
105+
106+
<generated>
107+
^ false
108+
]
109+
110+
{ #category : 'testing' }
111+
FamixCEntity >> isNamedEntity [
112+
113+
<generated>
114+
^ false
115+
]
116+
117+
{ #category : 'testing' }
118+
FamixCEntity >> isPrimitiveType [
119+
120+
<generated>
121+
^ false
122+
]
123+
124+
{ #category : 'testing' }
125+
FamixCEntity >> isQueryable [
126+
127+
<generated>
128+
^ false
129+
]
130+
131+
{ #category : 'testing' }
132+
FamixCEntity >> isReference [
133+
134+
<generated>
135+
^ false
136+
]
137+
138+
{ #category : 'testing' }
139+
FamixCEntity >> isStructuralEntity [
140+
141+
<generated>
142+
^ false
143+
]
144+
145+
{ #category : 'testing' }
146+
FamixCEntity >> isType [
147+
148+
<generated>
149+
^ false
150+
]

src/Famix-C-Entities/FamixCEntityTyping.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"
2525
Class {
2626
#name : 'FamixCEntityTyping',
27-
#superclass : 'FamixCPreprocEntity',
27+
#superclass : 'FamixCEntity',
2828
#traits : 'FamixTEntityTyping',
2929
#classTraits : 'FamixTEntityTyping classTrait',
3030
#category : 'Famix-C-Entities-Entities',
@@ -35,7 +35,7 @@ Class {
3535
{ #category : 'meta' }
3636
FamixCEntityTyping class >> annotation [
3737

38-
<FMClass: #EntityTyping super: #FamixCPreprocEntity>
38+
<FMClass: #EntityTyping super: #FamixCEntity>
3939
<package: #'Famix-C-Entities'>
4040
<generated>
4141
^ self

src/Famix-C-Entities/FamixCEnum.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
### Children
1111
| Relation | Origin | Opposite | Type | Comment |
1212
|---|
13+
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
1314
| `enumValues` | `FamixTWithEnumValues` | `parentEnum` | `FamixTEnumValue` | |
1415
1516
### Incoming dependencies
@@ -36,8 +37,8 @@
3637
Class {
3738
#name : 'FamixCEnum',
3839
#superclass : 'FamixCType',
39-
#traits : 'FamixTEnum',
40-
#classTraits : 'FamixTEnum classTrait',
40+
#traits : 'FamixTEnum + FamixTWithComments',
41+
#classTraits : 'FamixTEnum classTrait + FamixTWithComments classTrait',
4142
#category : 'Famix-C-Entities-Entities',
4243
#package : 'Famix-C-Entities',
4344
#tag : 'Entities'

src/Famix-C-Entities/FamixCEnumValue.class.st

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
|---|
88
| `parentEnum` | `FamixTEnumValue` | `enumValues` | `FamixTWithEnumValues` | The Enum declaring this value. It offers the implementation of belongsTo|
99
10+
### Children
11+
| Relation | Origin | Opposite | Type | Comment |
12+
|---|
13+
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
14+
1015
### Outgoing dependencies
1116
| Relation | Origin | Opposite | Type | Comment |
1217
|---|
@@ -35,8 +40,8 @@
3540
Class {
3641
#name : 'FamixCEnumValue',
3742
#superclass : 'FamixCNamedEntity',
38-
#traits : 'FamixTAccessible + FamixTEnumValue + FamixTSourceEntity',
39-
#classTraits : 'FamixTAccessible classTrait + FamixTEnumValue classTrait + FamixTSourceEntity classTrait',
43+
#traits : 'FamixTAccessible + FamixTEnumValue + FamixTSourceEntity + FamixTWithComments',
44+
#classTraits : 'FamixTAccessible classTrait + FamixTEnumValue classTrait + FamixTSourceEntity classTrait + FamixTWithComments classTrait',
4045
#category : 'Famix-C-Entities-Entities',
4146
#package : 'Famix-C-Entities',
4247
#tag : 'Entities'

src/Famix-C-Entities/FamixCFunction.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
### Children
1111
| Relation | Origin | Opposite | Type | Comment |
1212
|---|
13+
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
1314
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
1415
| `parameters` | `FamixTWithParameters` | `parentBehaviouralEntity` | `FamixTParameter` | List of formal parameters declared by this behaviour.|
1516
@@ -45,8 +46,8 @@
4546
Class {
4647
#name : 'FamixCFunction',
4748
#superclass : 'FamixCBehaviouralEntity',
48-
#traits : 'FamixTFunction',
49-
#classTraits : 'FamixTFunction classTrait',
49+
#traits : 'FamixTFunction + FamixTWithComments',
50+
#classTraits : 'FamixTFunction classTrait + FamixTWithComments classTrait',
5051
#category : 'Famix-C-Entities-Entities',
5152
#package : 'Famix-C-Entities',
5253
#tag : 'Entities'

0 commit comments

Comments
 (0)