Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Famix-C-Entities/FamixCEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ FamixCEntity >> isFunction [
^ false
]

{ #category : 'testing' }
FamixCEntity >> isGlobalVariable [

<generated>
^ false
]

{ #category : 'testing' }
FamixCEntity >> isInvocation [

Expand Down
52 changes: 52 additions & 0 deletions src/Famix-C-Entities/FamixCGlobalVariable.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"
## Relations
======================

### Parents
| Relation | Origin | Opposite | Type | Comment |
|---|
| `parentScope` | `FamixTGlobalVariable` | `globalVariables` | `FamixTWithGlobalVariables` | Scope declaring the global variable. belongsTo implementation|

### Outgoing dependencies
| Relation | Origin | Opposite | Type | Comment |
|---|
| `typing` | `FamixTTypedEntity` | `typedEntity` | `FamixTEntityTyping` | Association linking this entity to its declared type.|

### Incoming dependencies
| Relation | Origin | Opposite | Type | Comment |
|---|
| `incomingAccesses` | `FamixTAccessible` | `variable` | `FamixTAccess` | All Famix accesses pointing to this structural entity|

### Other
| Relation | Origin | Opposite | Type | Comment |
|---|
| `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity|


## Properties
======================

| 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.|
| `name` | `String` | nil | Basic name of the entity, not full reference.|

"
Class {
#name : 'FamixCGlobalVariable',
#superclass : 'FamixCNamedEntity',
#traits : 'FamixTGlobalVariable',
#classTraits : 'FamixTGlobalVariable classTrait',
#category : 'Famix-C-Entities-Entities',
#package : 'Famix-C-Entities',
#tag : 'Entities'
}

{ #category : 'meta' }
FamixCGlobalVariable class >> annotation [

<FMClass: #GlobalVariable super: #FamixCNamedEntity>
<package: #'Famix-C-Entities'>
<generated>
^ self
]
14 changes: 14 additions & 0 deletions src/Famix-C-Entities/FamixCImportingContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ FamixCImportingContext >> importFunction [
^ self importConcreteEntity: (self class fm3ClassNamed: #Function)
]

{ #category : 'importing' }
FamixCImportingContext >> importGlobalVariable [

<generated>
^ self importConcreteEntity: (self class fm3ClassNamed: #GlobalVariable)
]

{ #category : 'importing' }
FamixCImportingContext >> importIndexedFileAnchor [

Expand Down Expand Up @@ -318,6 +325,13 @@ FamixCImportingContext >> shouldImportFunction [
^ self shouldImport: #Function
]

{ #category : 'testing' }
FamixCImportingContext >> shouldImportGlobalVariable [

<generated>
^ self shouldImport: #GlobalVariable
]

{ #category : 'testing' }
FamixCImportingContext >> shouldImportIndexedFileAnchor [

Expand Down
70 changes: 70 additions & 0 deletions src/Famix-C-Entities/FamixCTEntityCreator.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ FamixCTEntityCreator >> newAliasType [
^ self add: FamixCAliasType new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newAliasTypeNamed: aName [

<generated>
^ self add: (FamixCAliasType named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newAssociation [

Expand Down Expand Up @@ -62,6 +69,13 @@ FamixCTEntityCreator >> newBehaviouralEntity [
^ self add: FamixCBehaviouralEntity new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newBehaviouralEntityNamed: aName [

<generated>
^ self add: (FamixCBehaviouralEntity named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newBehaviouralPointer [

Expand All @@ -83,6 +97,13 @@ FamixCTEntityCreator >> newContainerEntity [
^ self add: FamixCContainerEntity new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newContainerEntityNamed: aName [

<generated>
^ self add: (FamixCContainerEntity named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newDereferencedInvocation [

Expand Down Expand Up @@ -139,6 +160,20 @@ FamixCTEntityCreator >> newFunctionNamed: aName [
^ self add: (FamixCFunction named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newGlobalVariable [

<generated>
^ self add: FamixCGlobalVariable new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newGlobalVariableNamed: aName [

<generated>
^ self add: (FamixCGlobalVariable named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newIndexedFileAnchor [

Expand Down Expand Up @@ -237,13 +272,27 @@ FamixCTEntityCreator >> newStruct [
^ self add: FamixCStruct new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newStructNamed: aName [

<generated>
^ self add: (FamixCStruct named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newStructuredType [

<generated>
^ self add: FamixCStructuredType new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newStructuredTypeNamed: aName [

<generated>
^ self add: (FamixCStructuredType named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newType [

Expand All @@ -265,20 +314,41 @@ FamixCTEntityCreator >> newUnion [
^ self add: FamixCUnion new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnionNamed: aName [

<generated>
^ self add: (FamixCUnion named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnknownBehaviouralEntity [

<generated>
^ self add: FamixCUnknownBehaviouralEntity new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnknownBehaviouralEntityNamed: aName [

<generated>
^ self add: (FamixCUnknownBehaviouralEntity named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnknownContainerEntity [

<generated>
^ self add: FamixCUnknownContainerEntity new
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnknownContainerEntityNamed: aName [

<generated>
^ self add: (FamixCUnknownContainerEntity named: aName)
]

{ #category : 'entity creation' }
FamixCTEntityCreator >> newUnknownVariable [

Expand Down
6 changes: 6 additions & 0 deletions src/Famix-C-Generator/FamixCGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Class {
'enum',
'enumValue',
'function',
'globalVar',
'headerFile',
'indexedFileAnchor',
'invocation',
Expand Down Expand Up @@ -76,6 +77,7 @@ FamixCGenerator >> defineClasses [
"STRCTURAL ENTITIES"
attribute := builder newClassNamed: #Attribute.
localVar := builder newClassNamed: #LocalVariable.
globalVar := builder newClassNamed: #GlobalVariable.
unknownVar := builder newClassNamed: #UnknownVariable.
parameter := builder newClassNamed: #Parameter.
enumValue := builder newClassNamed: #EnumValue.
Expand Down Expand Up @@ -161,12 +163,16 @@ FamixCGenerator >> defineHierarchy [

function --|> behaviouralEntity.
function --|> #TFunction.

globalVar --|> namedEntity.
globalVar --|> #TGlobalVariable.

invocation --|> association.
invocation --|> #THasSignature.

localVar --|> namedEntity.
localVar --|> #TLocalVariable.


namedEntity --|> sourcedEntity.
namedEntity --|> #TEntityMetaLevelDependency.
Expand Down