Skip to content

Commit 693813b

Browse files
committed
Put all in toplo-example
1 parent 2db40cf commit 693813b

5 files changed

Lines changed: 62 additions & 7 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Extension { #name : 'CapellaSimpleExchange' }
2+
3+
{ #category : '*ExecutableRequirements-Toplo-Example' }
4+
CapellaSimpleExchange >> exReqDescription [
5+
6+
^ 'The component named <1s> in the function <2s> transmit <3s> to the component named <4s> in the function <5s>'
7+
expandMacrosWithArguments: {
8+
self simpleSource simpleComponent prettyPrintCapellaObject.
9+
self simpleSource prettyPrintCapellaObject.
10+
self prettyPrintCapellaObject.
11+
self simpleTarget prettyPrintCapellaObject.
12+
self simpleTarget simpleComponent prettyPrintCapellaObject }
13+
]
14+
15+
{ #category : '*ExecutableRequirements-Toplo-Example' }
16+
CapellaSimpleExchange >> exReqTitle [
17+
18+
^ '<1s> send "<2s>" to <3s>'
19+
expandMacrosWith: self simpleSource simpleComponent name
20+
with: self name
21+
with: self simpleTarget simpleComponent name
22+
]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Extension { #name : 'CapellaSimpleObject' }
2+
3+
{ #category : '*ExecutableRequirements-Toplo-Example' }
4+
CapellaSimpleObject >> asExReqRequirement [
5+
6+
^ ExReqRequirement new title: self exReqTitle; description: self exReqDescription; yourself
7+
]
8+
9+
{ #category : '*ExecutableRequirements-Toplo-Example' }
10+
CapellaSimpleObject >> asExReqRequirementForCapellaProjectNamed: aString [
11+
12+
^ self asExReqRequirement
13+
sourceDocument: (ExReqCapellaDocument new
14+
name: aString;
15+
id: self id;
16+
yourself);
17+
yourself
18+
]
19+
20+
{ #category : '*ExecutableRequirements-Toplo-Example' }
21+
CapellaSimpleObject >> prettyPrintCapellaObject [
22+
23+
^ '"<1s>"[<2s>]' expandMacrosWith: self name with: self id.
24+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Extension { #name : 'CapellaSimpleProject' }
2+
3+
{ #category : '*ExecutableRequirements-Toplo-Example' }
4+
CapellaSimpleProject >> asExReqRequirements [
5+
6+
^ self simpleExchanges collect: [ :each |
7+
each asExReqRequirementForCapellaProjectNamed: self project name ]
8+
]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Extension { #name : 'ExReqRequirement' }
2+
3+
{ #category : '*ExecutableRequirements-Toplo-Example' }
4+
ExReqRequirement >> stashAccessors [
5+
6+
<stashAccessors>
7+
^ { #title . #description . #sourceDocument }
8+
]

src/ExecutableRequirements/ExReqRequirement.class.st

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,6 @@ ExReqRequirement >> sourceDocument: anObject [
117117
sourceDocument := anObject
118118
]
119119

120-
{ #category : 'as yet unclassified' }
121-
ExReqRequirement >> stashAccessors [
122-
123-
<stashAccessors>
124-
^ { #title . #description . #sourceDocument }
125-
]
126-
127120
{ #category : 'accessing' }
128121
ExReqRequirement >> title [
129122
^ title

0 commit comments

Comments
 (0)