You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
708 B
35 lines
708 B
Object subclass: GSTProcessVariableHolder [ |
|
| val | |
|
<category: 'OsmoLogging-Pharo'> |
|
|
|
value: aValue [ |
|
<category: 'set'> |
|
val := val. |
|
] |
|
|
|
value [ |
|
<category: 'get'> |
|
^ val |
|
] |
|
] |
|
|
|
ProcessLocalVariable subclass: GSTProcessVariable [ |
|
| dict | |
|
<category: 'OsmoLogging-Pharo'> |
|
|
|
GSTProcessVariable class >> key: aKey [ |
|
<category: 'creation'> |
|
^ self soleInstance key: aKey. |
|
] |
|
|
|
dict [ |
|
<category: 'creation'> |
|
^ dict ifNil: [dict := Dictionary new]. |
|
] |
|
|
|
key: aKey [ |
|
<category: 'key'> |
|
^ self dict at: aKey ifAbsent: |
|
[self dict at: aKey put: GSTProcessVariableHolder new]. |
|
] |
|
]
|
|
|