Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Singleton/OxygenBasic/singleton.basic
Normal file
11
Task/Singleton/OxygenBasic/singleton.basic
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Class Singleton
|
||||
static sys inst 'private
|
||||
int instantiated() { return inst }
|
||||
void constructor(){ if not inst then inst=@this }
|
||||
|
||||
'all other methods start with @this=inst
|
||||
end class
|
||||
|
||||
'if not singleton.instantiated
|
||||
new Singleton MySingleton
|
||||
'endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue