all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
18
Task/Singleton/Objeck/singleton.objeck
Normal file
18
Task/Singleton/Objeck/singleton.objeck
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
class Singleton {
|
||||
@singleton : static : Singleton;
|
||||
|
||||
New : private () {
|
||||
}
|
||||
|
||||
function : GetInstance() ~ Singleton {
|
||||
if(@singleton <> Nil) {
|
||||
@singleton := Singleton->New();
|
||||
};
|
||||
|
||||
return @singleton;
|
||||
}
|
||||
|
||||
method : public : DoStuff() ~ Nil {
|
||||
...
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue