1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | function GlobalMethodIndexer () {
|
8 | this.index = 0;
|
9 | this.ignoredMethodsMap = {};
|
10 | }
|
11 |
|
12 | GlobalMethodIndexer.prototype.incrementIndex = function () {
|
13 | this.index ++;
|
14 | };
|
15 | GlobalMethodIndexer.prototype.getCurrentIndex = function () {
|
16 | return this.index;
|
17 | };
|
18 | GlobalMethodIndexer.prototype.setIgnoredMethod = function (methodIndex) {
|
19 | this.ignoredMethodsMap[methodIndex] = true;
|
20 | };
|
21 | GlobalMethodIndexer.prototype.isMethodIgnored = function (methodIndex) {
|
22 | return this.ignoredMethodsMap[methodIndex];
|
23 | };
|
24 | GlobalMethodIndexer.prototype.resetData = function () {
|
25 | this.index = 0;
|
26 | this.ignoredMethodsMap = {}
|
27 | };
|
28 | module.exports = new GlobalMethodIndexer();
|