2018-01-27 17:11:11 +00:00
|
|
|
import * as plugins from "./lik.plugins";
|
2017-07-05 12:29:08 +00:00
|
|
|
|
2018-01-27 17:11:11 +00:00
|
|
|
import { Objectmap } from "./lik.objectmap";
|
2017-07-05 12:29:08 +00:00
|
|
|
|
|
|
|
export class LoopTracker<T> {
|
2018-01-27 17:11:11 +00:00
|
|
|
referenceObjectMap = new Objectmap<any>();
|
|
|
|
constructor() {
|
2017-07-05 12:29:08 +00:00
|
|
|
// nothing here
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* checks and tracks an object
|
|
|
|
* @param objectArg
|
|
|
|
*/
|
2018-01-27 17:11:11 +00:00
|
|
|
checkAndTrack(objectArg: T) {
|
|
|
|
return this.referenceObjectMap.add(objectArg);
|
2017-07-05 12:29:08 +00:00
|
|
|
}
|
|
|
|
}
|