"Happy Squeaking Sample(8)" "Copyright (C) 1999 OGIS-RI" ClassDescription subclass: #Interface instanceVariableNames: 'name operationList ' classVariableNames: '' poolDictionaries: '' category: 'Metamodel-Interface'! !Interface methodsFor: 'actions'! by: anObject self operationList do:[ :each | (anObject respondsTo: each) ifFalse:[^self error: anObject name , ' does not support ', self name, ' interface']]. ^anObject ! ! !Interface methodsFor: 'actions'! mixIn: anInterface | newNm newOpList newIf | newNm := self name, ' + ' , anInterface name. newOpList := Set new. newOpList addAll: self operationList; addAll: anInterface operationList. newIf := self class name: newNm operationList: newOpList. ^newIf ! ! !Interface methodsFor: 'accessing'! name name isNil ifTrue:[ name := 'a nameless interface']. ^name! ! !Interface methodsFor: 'accessing'! name: newName name := newName! ! !Interface methodsFor: 'accessing'! operationList operationList isNil ifTrue:[ operationList := Set new]. ^operationList! ! !Interface methodsFor: 'accessing'! operationList: aListOfOperaionSymbol operationList := aListOfOperaionSymbol ! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! Interface class instanceVariableNames: ''! !Interface class methodsFor: 'instance creation'! name: aNameString operationList: aSetOfOperationSymbol ^self new name: aNameString; operationList: aSetOfOperationSymbol asSet ! !