1 | "use strict";
|
2 | var __extends = (this && this.__extends) || (function () {
|
3 | var extendStatics = function (d, b) {
|
4 | extendStatics = Object.setPrototypeOf ||
|
5 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7 | return extendStatics(d, b);
|
8 | };
|
9 | return function (d, b) {
|
10 | extendStatics(d, b);
|
11 | function __() { this.constructor = d; }
|
12 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13 | };
|
14 | })();
|
15 | Object.defineProperty(exports, "__esModule", { value: true });
|
16 | exports.DocParamCollection = void 0;
|
17 | var DocNode_1 = require("./DocNode");
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | var DocParamCollection = (function (_super) {
|
23 | __extends(DocParamCollection, _super);
|
24 | |
25 |
|
26 |
|
27 |
|
28 | function DocParamCollection(parameters) {
|
29 | var _this = _super.call(this, parameters) || this;
|
30 | _this._blocks = [];
|
31 | return _this;
|
32 | }
|
33 | Object.defineProperty(DocParamCollection.prototype, "kind", {
|
34 |
|
35 | get: function () {
|
36 | return DocNode_1.DocNodeKind.ParamCollection;
|
37 | },
|
38 | enumerable: false,
|
39 | configurable: true
|
40 | });
|
41 | |
42 |
|
43 |
|
44 | DocParamCollection.prototype[Symbol.iterator] = function () {
|
45 | return this._blocks[Symbol.iterator]();
|
46 | };
|
47 | Object.defineProperty(DocParamCollection.prototype, "blocks", {
|
48 | |
49 |
|
50 |
|
51 | get: function () {
|
52 | return this._blocks;
|
53 | },
|
54 | enumerable: false,
|
55 | configurable: true
|
56 | });
|
57 | Object.defineProperty(DocParamCollection.prototype, "count", {
|
58 | |
59 |
|
60 |
|
61 | get: function () {
|
62 | return this._blocks.length;
|
63 | },
|
64 | enumerable: false,
|
65 | configurable: true
|
66 | });
|
67 | |
68 |
|
69 |
|
70 | DocParamCollection.prototype.add = function (docParamBlock) {
|
71 | this._blocks.push(docParamBlock);
|
72 |
|
73 | if (this._blocksByName === undefined) {
|
74 | this._blocksByName = new Map();
|
75 | }
|
76 |
|
77 | if (!this._blocksByName.has(docParamBlock.parameterName)) {
|
78 | this._blocksByName.set(docParamBlock.parameterName, docParamBlock);
|
79 | }
|
80 | };
|
81 | |
82 |
|
83 |
|
84 | DocParamCollection.prototype.clear = function () {
|
85 | this._blocks.length = 0;
|
86 | this._blocksByName = undefined;
|
87 | };
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | DocParamCollection.prototype.tryGetBlockByName = function (parameterName) {
|
99 | if (this._blocksByName) {
|
100 | return this._blocksByName.get(parameterName);
|
101 | }
|
102 | return undefined;
|
103 | };
|
104 |
|
105 | DocParamCollection.prototype.onGetChildNodes = function () {
|
106 | return this._blocks;
|
107 | };
|
108 | return DocParamCollection;
|
109 | }(DocNode_1.DocNode));
|
110 | exports.DocParamCollection = DocParamCollection;
|
111 |
|
\ | No newline at end of file |