WIP
This commit is contained in:
parent
ef2d4c47ad
commit
952a3cd34c
1 changed files with 46 additions and 49 deletions
17
src/app/store/unique.ts
Normal file
17
src/app/store/unique.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { Initiable } from './initiable';
|
||||
|
||||
export abstract class Unique extends Initiable {
|
||||
protected static nextId = 0;
|
||||
static get ObjectCount(): number {
|
||||
return Unique.nextId;
|
||||
}
|
||||
|
||||
get id(): number {
|
||||
return this._id;
|
||||
}
|
||||
private _id: number;
|
||||
|
||||
protected initiate() {
|
||||
this._id = Unique.nextId++;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue