Skip to content

Commit

Permalink
Merge pull request #59 from moosetechnology/remove-property-segment-f…
Browse files Browse the repository at this point in the history
…rom-F77Variable

Remove property segment from f77 variable
  • Loading branch information
NicolasAnquetil authored Jun 12, 2024
2 parents f55a46e + 79f0960 commit 9396dcb
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 110 deletions.
4 changes: 2 additions & 2 deletions src/Famix-Fortran77-Entities/FamixF77Comment.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ a fortran comment
| Name | Type | Default value | Comment |
|---|
| `content` | `String` | nil | Content of the comment as a String|
| `isEsope` | `Boolean` | false | It is esope comment ?|
| `isEsope` | `Boolean` | false | Is it an esope comment ?|
"
Class {
Expand Down Expand Up @@ -44,7 +44,7 @@ FamixF77Comment >> isEsope [

<FMProperty: #isEsope type: #Boolean defaultValue: false>
<generated>
<FMComment: 'It is esope comment ?'>
<FMComment: 'Is it an esope comment ?'>
^ isEsope ifNil: [ isEsope := false ]
]

Expand Down
6 changes: 4 additions & 2 deletions src/Famix-Fortran77-Entities/FamixF77Implicit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
| Name | Type | Default value | Comment |
|---|
| `letters` | `Object` | nil | |
| `type` | `FamixTType` | nil | |
| `letters` | `Object` | nil | Initials for the IMPLICIT statement|
| `type` | `FamixTType` | nil | Type for the initials of the IMPLICIT statement|
"
Class {
Expand All @@ -34,6 +34,7 @@ FamixF77Implicit >> letters [

<FMProperty: #letters type: #Object>
<generated>
<FMComment: 'Initials for the IMPLICIT statement'>
^ letters
]

Expand All @@ -48,6 +49,7 @@ FamixF77Implicit >> type [

<FMProperty: #type type: #FamixTType>
<generated>
<FMComment: 'Type for the initials of the IMPLICIT statement'>
^ type
]

Expand Down
4 changes: 2 additions & 2 deletions src/Famix-Fortran77-Entities/FamixF77PUFunction.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ a function procedure
| Name | Type | Default value | Comment |
|---|
| `isEsope` | `Boolean` | false | It is kind of esope function ?|
| `isEsope` | `Boolean` | false | Is it an Esope function (segini,...) ?|
"
Class {
Expand Down Expand Up @@ -43,7 +43,7 @@ FamixF77PUFunction >> isEsope [

<FMProperty: #isEsope type: #Boolean defaultValue: false>
<generated>
<FMComment: 'It is kind of esope function ?'>
<FMComment: 'Is it an Esope function (segini,...) ?'>
^ isEsope ifNil: [ isEsope := false ]
]

Expand Down
8 changes: 4 additions & 4 deletions src/Famix-Fortran77-Entities/FamixF77Type.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Im a Abstract Type, can be subclassed by TypeInstrinsic and Segment
| Name | Type | Default value | Comment |
|---|
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.|
| `kind` | `Number` | nil | kind attribute|
| `length` | `Number` | nil | length attribute|
| `kind` | `Number` | nil | kind attribute of a type|
| `length` | `Number` | nil | length attribute of a type|
| `name` | `String` | nil | Basic name of the entity, not full reference.|
"
Expand Down Expand Up @@ -58,7 +58,7 @@ FamixF77Type >> kind [

<FMProperty: #kind type: #Number>
<generated>
<FMComment: 'kind attribute'>
<FMComment: 'kind attribute of a type'>
^ kind
]

Expand All @@ -73,7 +73,7 @@ FamixF77Type >> length [

<FMProperty: #length type: #Number>
<generated>
<FMComment: 'length attribute'>
<FMComment: 'length attribute of a type'>
^ length
]

Expand Down
23 changes: 3 additions & 20 deletions src/Famix-Fortran77-Entities/FamixF77Variable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ a local variable of a program unit
| Name | Type | Default value | Comment |
|---|
| `isEsope` | `Boolean` | false | It is esope attribute variable from segment definition ?|
| `isEsope` | `Boolean` | false | Is it an Esope pointer ?|
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.|
| `name` | `String` | nil | Basic name of the entity, not full reference.|
| `segment` | `String` | nil | variable belong to this segment|
"
Class {
Expand All @@ -38,8 +37,7 @@ Class {
#traits : 'FamixTLocalVariable',
#classTraits : 'FamixTLocalVariable classTrait',
#instVars : [
'#isEsope => FMProperty defaultValue: false',
'#segment => FMProperty'
'#isEsope => FMProperty defaultValue: false'
],
#category : #'Famix-Fortran77-Entities-Entities'
}
Expand All @@ -58,7 +56,7 @@ FamixF77Variable >> isEsope [

<FMProperty: #isEsope type: #Boolean defaultValue: false>
<generated>
<FMComment: 'It is esope attribute variable from segment definition ?'>
<FMComment: 'Is it an Esope pointer ?'>
^ isEsope ifNil: [ isEsope := false ]
]

Expand All @@ -67,18 +65,3 @@ FamixF77Variable >> isEsope: anObject [
<generated>
isEsope := anObject
]

{ #category : #accessing }
FamixF77Variable >> segment [

<FMProperty: #segment type: #String>
<generated>
<FMComment: 'variable belong to this segment'>
^ segment
]

{ #category : #accessing }
FamixF77Variable >> segment: anObject [
<generated>
segment := anObject
]
19 changes: 7 additions & 12 deletions src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,19 @@ FamixFortran77Generator >> defineProperties [
super defineProperties.

(comment property: #isEsope type: #Boolean defaultValue: false)
comment: 'It is esope comment ?'.
comment: 'Is it an esope comment ?'.

(implicit property: #letters type: #Object) comment: ''.
(implicit property: #type type: #FamixTType) comment: ''.
(implicit property: #letters type: #Object) comment: 'Initials for the IMPLICIT statement'.
(implicit property: #type type: #FamixTType) comment: 'Type for the initials of the IMPLICIT statement'.

(include property: #isLocal type: #Boolean) comment:
'Whether this is a local include (with "included.h") or a system one (with <included.h>)'.

(include property: #filename type: #String) comment:
'Hold the name of the file included. Will be used to link this relation with the includedFile entity'.

(type property: #length type: #Number) comment: 'length attribute'.
(type property: #kind type: #Number) comment: 'kind attribute'.

"(parameter property: #variable type: #Object) comment:
'variable declaration related to this parameter'."
(type property: #length type: #Number) comment: 'length attribute of a type'.
(type property: #kind type: #Number) comment: 'kind attribute of a type'.

(programFile property: #version type: #String) comment:
'Fortran version of the file'.
Expand All @@ -310,13 +307,11 @@ FamixFortran77Generator >> defineProperties [
'Fortran name of the file'.

(puFunction property: #isEsope type: #Boolean defaultValue: false)
comment: 'It is kind of esope function ?'.
comment: 'Is it an Esope function (segini,...) ?'.

(variable property: #isEsope type: #Boolean defaultValue: false)
comment: 'It is esope attribute variable from segment definition ?'.
comment: 'Is it an Esope pointer ?'.

(variable property: #segment type: #String) comment:
'variable belong to this segment'
]

{ #category : #definition }
Expand Down
27 changes: 0 additions & 27 deletions src/Famix-FortranUDT-Entities/FamixFortranAttribute.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ the segment `myseg` have the following attributes: `scalar`, `array`, `matrix`,
| Relation | Origin | Opposite | Type | Comment |
|---|
| `parentType` | `FamixTAttribute` | `attributes` | `FamixTWithAttributes` | Type declaring the attribute. belongsTo implementation|
| `userDefinedType` | `FamixFortranAttribute` | `attributes` | `FamixFortranUserDefinedType` | |
### Incoming dependencies
| Relation | Origin | Opposite | Type | Comment |
Expand Down Expand Up @@ -58,9 +57,6 @@ Class {
#superclass : #FamixF77Variable,
#traits : 'FamixTAttribute',
#classTraits : 'FamixTAttribute classTrait',
#instVars : [
'#userDefinedType => FMOne type: #FamixFortranUserDefinedType opposite: #attributes'
],
#category : #'Famix-FortranUDT-Entities-Entities'
}

Expand All @@ -72,26 +68,3 @@ FamixFortranAttribute class >> annotation [
<generated>
^ self
]

{ #category : #accessing }
FamixFortranAttribute >> userDefinedType [
"Relation named: #userDefinedType type: #FamixFortranUserDefinedType opposite: #attributes"

<generated>
<container>
^ userDefinedType
]

{ #category : #accessing }
FamixFortranAttribute >> userDefinedType: anObject [

<generated>
userDefinedType := anObject
]

{ #category : #navigation }
FamixFortranAttribute >> userDefinedTypeGroup [
<generated>
<navigation: 'UserDefinedType'>
^ MooseSpecializedGroup with: self userDefinedType
]
7 changes: 7 additions & 0 deletions src/Famix-FortranUDT-Entities/FamixFortranEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ FamixFortranEntity >> isAttribute [
^ false
]

{ #category : #testing }
FamixFortranEntity >> isNamedEntity [

<generated>
^ false
]

{ #category : #testing }
FamixFortranEntity >> isQueryable [

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ FamixFortranNamedEntity class >> isAbstract [
<generated>
^ self == FamixFortranNamedEntity
]

{ #category : #testing }
FamixFortranNamedEntity >> isNamedEntity [

<generated>
^ true
]
36 changes: 3 additions & 33 deletions src/Famix-FortranUDT-Entities/FamixFortranUserDefinedType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `attributes` | `FamixFortranUserDefinedType` | `userDefinedType` | `FamixFortranAttribute` | |
| `attributes` | `FamixTWithAttributes` | `parentType` | `FamixTAttribute` | List of attributes declared by this type.|
"
Class {
#name : #FamixFortranUserDefinedType,
#superclass : #FamixF77Type,
#instVars : [
'#attributes => FMMany type: #FamixFortranAttribute opposite: #userDefinedType'
],
#traits : 'FamixTWithAttributes',
#classTraits : 'FamixTWithAttributes classTrait',
#category : #'Famix-FortranUDT-Entities-Entities'
}

Expand All @@ -35,32 +34,3 @@ FamixFortranUserDefinedType class >> isAbstract [
<generated>
^ self == FamixFortranUserDefinedType
]

{ #category : #adding }
FamixFortranUserDefinedType >> addAttribute: anObject [
<generated>
^ self attributes add: anObject
]

{ #category : #accessing }
FamixFortranUserDefinedType >> attributes [
"Relation named: #attributes type: #FamixFortranAttribute opposite: #userDefinedType"

<generated>
<derived>
^ attributes
]

{ #category : #accessing }
FamixFortranUserDefinedType >> attributes: anObject [

<generated>
attributes value: anObject
]

{ #category : #navigation }
FamixFortranUserDefinedType >> attributesGroup [
<generated>
<navigation: 'Attributes'>
^ MooseSpecializedGroup withAll: self attributes asSet
]
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,5 @@ FamixFortranUDTGenerator >> defineHierarchy [
attribute --|> variable.

userDefinedType --|> type.
]

{ #category : #definition }
FamixFortranUDTGenerator >> defineRelations [

super defineRelations.

userDefinedType <>-* attribute
userDefinedType --|> #TWithAttributes.
]

0 comments on commit 9396dcb

Please sign in to comment.