1
0
mirror of https://github.com/lxsang/Diya-API.git synced 2024-12-28 12:28:21 +01:00
Diya-API/Diya/DiyaRootNode.class.st

31 lines
557 B
Smalltalk
Raw Normal View History

2022-03-01 22:58:58 +01:00
Class {
#name : #DiyaRootNode,
#superclass : #DiyaNode,
#classVars : [
'singleton'
],
#category : #'Diya-Graphics'
}
{ #category : #'instance creation' }
DiyaRootNode class >> new [
self error: 'Please use uniqueInstance'
]
{ #category : #'instance creation' }
DiyaRootNode class >> reset [
singleton := nil
]
{ #category : #'instance creation' }
DiyaRootNode class >> uniqueInstance [
singleton ifNil: [ singleton := super new].
^singleton
]
{ #category : #initialization }
DiyaRootNode >> initialize [
super initialize.
parent := self.
]