lineputscript 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +347 -0
- package/dist/chunk-4R46Q3P5.js +2 -0
- package/dist/chunk-4RRNVMEO.mjs +233 -0
- package/dist/chunk-4SJFIYYU.js +971 -0
- package/dist/chunk-5Q637EJJ.js +158 -0
- package/dist/chunk-7GX2NBJV.mjs +1 -0
- package/dist/chunk-AER7UDD4.js +2 -0
- package/dist/chunk-IV3K5WDK.mjs +1 -0
- package/dist/chunk-JI4LI6KU.mjs +965 -0
- package/dist/chunk-MMWDSPQ5.js +21 -0
- package/dist/chunk-OV7CLVHP.mjs +156 -0
- package/dist/chunk-WZIZGAEG.js +238 -0
- package/dist/chunk-X2OHQJFP.mjs +14 -0
- package/dist/core.d.ts +264 -0
- package/dist/core.js +29 -0
- package/dist/core.mjs +4 -0
- package/dist/fint64-C-6kmcgU.d.ts +63 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +59 -0
- package/dist/index.mjs +6 -0
- package/dist/structure.d.ts +36 -0
- package/dist/structure.js +12 -0
- package/dist/structure.mjs +3 -0
- package/dist/types.d.ts +147 -0
- package/dist/types.js +2 -0
- package/dist/types.mjs +1 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +32 -0
- package/dist/utils.mjs +3 -0
- package/package.json +84 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
+
|
|
7
|
+
var crypto__default = /*#__PURE__*/_interopDefault(crypto);
|
|
8
|
+
|
|
9
|
+
// src/utils/hashing.ts
|
|
10
|
+
function getHashCode(text) {
|
|
11
|
+
const hash = crypto__default.default.createHash("sha512");
|
|
12
|
+
hash.update(text, "utf-8");
|
|
13
|
+
const buf = hash.digest();
|
|
14
|
+
return buf.readBigInt64LE(0);
|
|
15
|
+
}
|
|
16
|
+
function getHashCode32(text) {
|
|
17
|
+
return Number(getHashCode(text) & 0xffffffffn);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.getHashCode = getHashCode;
|
|
21
|
+
exports.getHashCode32 = getHashCode32;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { splitLimited, textDeReplace, textReplace, FInt64 } from './chunk-4RRNVMEO.mjs';
|
|
2
|
+
|
|
3
|
+
// src/structure/string-structure.ts
|
|
4
|
+
var StringStructure = class {
|
|
5
|
+
constructor(setstr, getstr, single = true) {
|
|
6
|
+
this._cache = null;
|
|
7
|
+
this.setstr = setstr;
|
|
8
|
+
this.getstr = getstr;
|
|
9
|
+
this.single = single;
|
|
10
|
+
}
|
|
11
|
+
get cache() {
|
|
12
|
+
if (!this.single || this._cache === null) {
|
|
13
|
+
this._cache = /* @__PURE__ */ new Map();
|
|
14
|
+
const raw = this.getstr();
|
|
15
|
+
if (raw) {
|
|
16
|
+
const pairs = splitLimited(raw, "/n");
|
|
17
|
+
for (const pair of pairs) {
|
|
18
|
+
const eqIdx = pair.indexOf("=");
|
|
19
|
+
if (eqIdx >= 0) {
|
|
20
|
+
const key = pair.substring(0, eqIdx);
|
|
21
|
+
const val = pair.substring(eqIdx + 1);
|
|
22
|
+
this._cache.set(key, val);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return this._cache;
|
|
28
|
+
}
|
|
29
|
+
set cache(value) {
|
|
30
|
+
const parts = [];
|
|
31
|
+
for (const [key, val] of value) {
|
|
32
|
+
parts.push(`${key}=${val}`);
|
|
33
|
+
}
|
|
34
|
+
this.setstr(parts.join("/n"));
|
|
35
|
+
}
|
|
36
|
+
getString(key, defaultValue) {
|
|
37
|
+
if (this._cache?.has(key) ?? this.cache.has(key)) {
|
|
38
|
+
return textDeReplace(this.cache.get(key)).replace("/!n", "\n");
|
|
39
|
+
}
|
|
40
|
+
return defaultValue !== void 0 ? defaultValue : null;
|
|
41
|
+
}
|
|
42
|
+
setString(key, value) {
|
|
43
|
+
const c = this.cache;
|
|
44
|
+
if (value === null) {
|
|
45
|
+
c.delete(key);
|
|
46
|
+
} else {
|
|
47
|
+
c.set(key, textReplace(value.replace("\n", "/!n")));
|
|
48
|
+
}
|
|
49
|
+
this.cache = c;
|
|
50
|
+
}
|
|
51
|
+
get(key) {
|
|
52
|
+
return this.getString(key) ?? "";
|
|
53
|
+
}
|
|
54
|
+
set(key, value) {
|
|
55
|
+
this.setString(key, value);
|
|
56
|
+
}
|
|
57
|
+
getBool(key, defaultValue = false) {
|
|
58
|
+
if (this.cache.has(key)) {
|
|
59
|
+
const val = this.cache.get(key).toLowerCase();
|
|
60
|
+
return val === "true" || val === "1" || val === "t";
|
|
61
|
+
}
|
|
62
|
+
return defaultValue;
|
|
63
|
+
}
|
|
64
|
+
setBool(key, value) {
|
|
65
|
+
this.setString(key, value ? "true" : "false");
|
|
66
|
+
}
|
|
67
|
+
getInt(key, defaultValue = 0) {
|
|
68
|
+
if (this.cache.has(key)) {
|
|
69
|
+
return parseInt(this.cache.get(key), 10) || 0;
|
|
70
|
+
}
|
|
71
|
+
return defaultValue;
|
|
72
|
+
}
|
|
73
|
+
setInt(key, value) {
|
|
74
|
+
this.setString(key, value.toString());
|
|
75
|
+
}
|
|
76
|
+
getInt64(key, defaultValue = 0n) {
|
|
77
|
+
if (this.cache.has(key)) {
|
|
78
|
+
return BigInt(this.cache.get(key));
|
|
79
|
+
}
|
|
80
|
+
return defaultValue;
|
|
81
|
+
}
|
|
82
|
+
setInt64(key, value) {
|
|
83
|
+
this.setString(key, value.toString());
|
|
84
|
+
}
|
|
85
|
+
getFloat(key, defaultValue) {
|
|
86
|
+
if (this.cache.has(key)) {
|
|
87
|
+
return FInt64.parse(this.cache.get(key));
|
|
88
|
+
}
|
|
89
|
+
return defaultValue ?? FInt64.Zero;
|
|
90
|
+
}
|
|
91
|
+
setFloat(key, value) {
|
|
92
|
+
this.setString(key, value.toStoreString());
|
|
93
|
+
}
|
|
94
|
+
getDateTime(key, defaultValue) {
|
|
95
|
+
if (this.cache.has(key)) {
|
|
96
|
+
const raw = this.cache.get(key);
|
|
97
|
+
const longMatch = /^-?\d+$/.test(raw);
|
|
98
|
+
if (longMatch) {
|
|
99
|
+
try {
|
|
100
|
+
const ticks = BigInt(raw);
|
|
101
|
+
const ticksPerMs = 10000n;
|
|
102
|
+
const epochOffset = 621355968000000000n;
|
|
103
|
+
const ms = Number((ticks - epochOffset) / ticksPerMs);
|
|
104
|
+
return new Date(ms);
|
|
105
|
+
} catch {
|
|
106
|
+
return defaultValue ?? null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const d = new Date(raw);
|
|
110
|
+
if (!isNaN(d.getTime())) return d;
|
|
111
|
+
}
|
|
112
|
+
return defaultValue ?? null;
|
|
113
|
+
}
|
|
114
|
+
setDateTime(key, value) {
|
|
115
|
+
const ticksPerMs = 10000n;
|
|
116
|
+
const epochOffset = 621355968000000000n;
|
|
117
|
+
const ticks = BigInt(value.getTime()) * ticksPerMs + epochOffset;
|
|
118
|
+
this.setString(key, ticks.toString());
|
|
119
|
+
}
|
|
120
|
+
getDouble(key, defaultValue = 0) {
|
|
121
|
+
if (this.cache.has(key)) {
|
|
122
|
+
return parseFloat(this.cache.get(key)) || 0;
|
|
123
|
+
}
|
|
124
|
+
return defaultValue;
|
|
125
|
+
}
|
|
126
|
+
setDouble(key, value) {
|
|
127
|
+
this.setString(key, value.toString());
|
|
128
|
+
}
|
|
129
|
+
containsKey(key) {
|
|
130
|
+
return this.cache.has(key);
|
|
131
|
+
}
|
|
132
|
+
get keys() {
|
|
133
|
+
return Array.from(this.cache.keys());
|
|
134
|
+
}
|
|
135
|
+
get values() {
|
|
136
|
+
return Array.from(this.cache.values());
|
|
137
|
+
}
|
|
138
|
+
get count() {
|
|
139
|
+
return this.cache.size;
|
|
140
|
+
}
|
|
141
|
+
clear() {
|
|
142
|
+
this._cache = null;
|
|
143
|
+
this.setstr("");
|
|
144
|
+
}
|
|
145
|
+
remove(key) {
|
|
146
|
+
const c = this.cache;
|
|
147
|
+
const result = c.delete(key);
|
|
148
|
+
if (result) this.cache = c;
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
[Symbol.iterator]() {
|
|
152
|
+
return this.cache.entries();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export { StringStructure };
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/escaping.ts
|
|
4
|
+
function textReplace(text) {
|
|
5
|
+
if (text === null || text === void 0) return "";
|
|
6
|
+
let result = text;
|
|
7
|
+
result = result.replace(/\|/g, "/|");
|
|
8
|
+
result = result.replace(/\//g, "/!");
|
|
9
|
+
result = result.replace(/:\|/g, "/stop");
|
|
10
|
+
result = result.replace(/\t/g, "/tab");
|
|
11
|
+
result = result.replace(/\n/g, "/n");
|
|
12
|
+
result = result.replace(/\r/g, "/r");
|
|
13
|
+
result = result.replace(/#/g, "/id");
|
|
14
|
+
result = result.replace(/,/g, "/com");
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
function textDeReplace(text) {
|
|
18
|
+
if (text === null || text === void 0) return "";
|
|
19
|
+
let result = text;
|
|
20
|
+
result = result.replace(/\/stop/g, ":|");
|
|
21
|
+
result = result.replace(/\/equ/g, "=");
|
|
22
|
+
result = result.replace(/\/tab/g, " ");
|
|
23
|
+
result = result.replace(/\/n/g, "\n");
|
|
24
|
+
result = result.replace(/\/r/g, "\r");
|
|
25
|
+
result = result.replace(/\/id/g, "#");
|
|
26
|
+
result = result.replace(/\/com/g, ",");
|
|
27
|
+
result = result.replace(/\/!/g, "/");
|
|
28
|
+
result = result.replace(/\/\|/g, "|");
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/utils/fint64.ts
|
|
33
|
+
var Anchor = 1000000000n;
|
|
34
|
+
var Anchord = 1e9;
|
|
35
|
+
var NaNValue = 9223372036854775807n - 1n;
|
|
36
|
+
var NegativeInfinityValue = -9223372036854775807n + 1n;
|
|
37
|
+
var PositiveInfinityValue = 9223372036854775807n;
|
|
38
|
+
var _FInt64 = class _FInt64 {
|
|
39
|
+
constructor(value) {
|
|
40
|
+
this.m_value = value;
|
|
41
|
+
}
|
|
42
|
+
static fromLong(value) {
|
|
43
|
+
return new _FInt64(value);
|
|
44
|
+
}
|
|
45
|
+
static fromDouble(value) {
|
|
46
|
+
return new _FInt64(BigInt(Math.round(value * Anchord)));
|
|
47
|
+
}
|
|
48
|
+
static fromNumber(value) {
|
|
49
|
+
return _FInt64.fromDouble(value);
|
|
50
|
+
}
|
|
51
|
+
static fromInt(value) {
|
|
52
|
+
return new _FInt64(BigInt(value) * Anchor);
|
|
53
|
+
}
|
|
54
|
+
static fromObject(value) {
|
|
55
|
+
if (value instanceof _FInt64) return value;
|
|
56
|
+
if (typeof value === "bigint") return new _FInt64(value);
|
|
57
|
+
if (typeof value === "number") {
|
|
58
|
+
if (Number.isInteger(value)) return _FInt64.fromInt(value);
|
|
59
|
+
return _FInt64.fromDouble(value);
|
|
60
|
+
}
|
|
61
|
+
if (typeof value === "string") return _FInt64.parse(value);
|
|
62
|
+
return _FInt64.NaN;
|
|
63
|
+
}
|
|
64
|
+
toDouble() {
|
|
65
|
+
if (this.isNaN()) return NaN;
|
|
66
|
+
return Number(this.m_value) / Anchord;
|
|
67
|
+
}
|
|
68
|
+
toStoreString() {
|
|
69
|
+
return this.m_value.toString();
|
|
70
|
+
}
|
|
71
|
+
toString() {
|
|
72
|
+
return this.toDouble().toString();
|
|
73
|
+
}
|
|
74
|
+
isNaN() {
|
|
75
|
+
return this.m_value === NaNValue;
|
|
76
|
+
}
|
|
77
|
+
isNegativeInfinity() {
|
|
78
|
+
return this.m_value === NegativeInfinityValue;
|
|
79
|
+
}
|
|
80
|
+
isPositiveInfinity() {
|
|
81
|
+
return this.m_value === PositiveInfinityValue;
|
|
82
|
+
}
|
|
83
|
+
isFinite() {
|
|
84
|
+
return !this.isNaN() && !this.isNegativeInfinity() && !this.isPositiveInfinity();
|
|
85
|
+
}
|
|
86
|
+
isInfinity() {
|
|
87
|
+
return this.isPositiveInfinity() || this.isNegativeInfinity();
|
|
88
|
+
}
|
|
89
|
+
isNegative() {
|
|
90
|
+
return this.m_value < 0n;
|
|
91
|
+
}
|
|
92
|
+
isNormal() {
|
|
93
|
+
return this.m_value !== 0n && this.isFinite();
|
|
94
|
+
}
|
|
95
|
+
toBoolean() {
|
|
96
|
+
return this.m_value > Anchor;
|
|
97
|
+
}
|
|
98
|
+
toInt32() {
|
|
99
|
+
return Math.trunc(this.toDouble());
|
|
100
|
+
}
|
|
101
|
+
toInt64() {
|
|
102
|
+
return this.m_value / Anchor;
|
|
103
|
+
}
|
|
104
|
+
// Arithmetic
|
|
105
|
+
add(other) {
|
|
106
|
+
return new _FInt64(this.m_value + other.m_value);
|
|
107
|
+
}
|
|
108
|
+
sub(other) {
|
|
109
|
+
return new _FInt64(this.m_value - other.m_value);
|
|
110
|
+
}
|
|
111
|
+
mul(other) {
|
|
112
|
+
return new _FInt64(this.m_value / 1000n * (other.m_value / 1000n) / 1000n);
|
|
113
|
+
}
|
|
114
|
+
div(other) {
|
|
115
|
+
return new _FInt64(this.m_value * 100000n / other.m_value * 10000n);
|
|
116
|
+
}
|
|
117
|
+
addDouble(other) {
|
|
118
|
+
return new _FInt64(this.m_value + BigInt(Math.round(other * Anchord)));
|
|
119
|
+
}
|
|
120
|
+
subDouble(other) {
|
|
121
|
+
return new _FInt64(this.m_value - BigInt(Math.round(other * Anchord)));
|
|
122
|
+
}
|
|
123
|
+
mulDouble(other) {
|
|
124
|
+
return new _FInt64(BigInt(Math.round(Number(this.m_value) * other)));
|
|
125
|
+
}
|
|
126
|
+
divDouble(other) {
|
|
127
|
+
return new _FInt64(BigInt(Math.round(Number(this.m_value) / other)));
|
|
128
|
+
}
|
|
129
|
+
negate() {
|
|
130
|
+
return new _FInt64(-this.m_value);
|
|
131
|
+
}
|
|
132
|
+
increment() {
|
|
133
|
+
return new _FInt64(this.m_value + Anchor);
|
|
134
|
+
}
|
|
135
|
+
decrement() {
|
|
136
|
+
return new _FInt64(this.m_value - Anchor);
|
|
137
|
+
}
|
|
138
|
+
// Bitwise
|
|
139
|
+
and(other) {
|
|
140
|
+
return new _FInt64(this.m_value & other.m_value);
|
|
141
|
+
}
|
|
142
|
+
or(other) {
|
|
143
|
+
return new _FInt64(this.m_value | other.m_value);
|
|
144
|
+
}
|
|
145
|
+
xor(other) {
|
|
146
|
+
return new _FInt64(this.m_value ^ other.m_value);
|
|
147
|
+
}
|
|
148
|
+
not() {
|
|
149
|
+
return new _FInt64(~this.m_value);
|
|
150
|
+
}
|
|
151
|
+
// Comparison
|
|
152
|
+
compareTo(other) {
|
|
153
|
+
if (this.isNaN()) return -1;
|
|
154
|
+
if (other.isNaN()) return 1;
|
|
155
|
+
if (this.m_value < other.m_value) return -1;
|
|
156
|
+
if (this.m_value > other.m_value) return 1;
|
|
157
|
+
return 0;
|
|
158
|
+
}
|
|
159
|
+
equals(other) {
|
|
160
|
+
if (this.isNaN() || other.isNaN()) return false;
|
|
161
|
+
return this.m_value === other.m_value;
|
|
162
|
+
}
|
|
163
|
+
// Parse
|
|
164
|
+
static parse(s) {
|
|
165
|
+
if (s === null || s === void 0) return _FInt64.NaN;
|
|
166
|
+
const longMatch = /^-?\d+$/.test(s);
|
|
167
|
+
if (longMatch) {
|
|
168
|
+
try {
|
|
169
|
+
const bi = BigInt(s);
|
|
170
|
+
return new _FInt64(bi);
|
|
171
|
+
} catch {
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const d = Number(s);
|
|
175
|
+
if (!isNaN(d)) {
|
|
176
|
+
return _FInt64.fromDouble(d);
|
|
177
|
+
}
|
|
178
|
+
return _FInt64.NaN;
|
|
179
|
+
}
|
|
180
|
+
static tryParse(s) {
|
|
181
|
+
if (s === null || s === void 0) return { result: _FInt64.Zero, success: false };
|
|
182
|
+
const parsed = _FInt64.parse(s);
|
|
183
|
+
if (parsed.isNaN()) return { result: _FInt64.Zero, success: false };
|
|
184
|
+
return { result: parsed, success: true };
|
|
185
|
+
}
|
|
186
|
+
// Static helpers
|
|
187
|
+
static isFinite(d) {
|
|
188
|
+
return d.isFinite();
|
|
189
|
+
}
|
|
190
|
+
static isInfinity(d) {
|
|
191
|
+
return d.isInfinity();
|
|
192
|
+
}
|
|
193
|
+
static isNaNStatic(d) {
|
|
194
|
+
return d.isNaN();
|
|
195
|
+
}
|
|
196
|
+
static isNegative(d) {
|
|
197
|
+
return d.isNegative();
|
|
198
|
+
}
|
|
199
|
+
static isNormal(d) {
|
|
200
|
+
return d.isNormal();
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
// Constants
|
|
204
|
+
_FInt64.Anchor = Anchor;
|
|
205
|
+
_FInt64.Anchord = Anchord;
|
|
206
|
+
_FInt64.MinValue = new _FInt64(-9223372036854775807n - 1n);
|
|
207
|
+
_FInt64.MaxValue = new _FInt64(9223372036854775807n);
|
|
208
|
+
_FInt64.NaN = new _FInt64(NaNValue);
|
|
209
|
+
_FInt64.NegativeInfinity = new _FInt64(NegativeInfinityValue);
|
|
210
|
+
_FInt64.PositiveInfinity = new _FInt64(PositiveInfinityValue);
|
|
211
|
+
_FInt64.Zero = new _FInt64(0n);
|
|
212
|
+
_FInt64.One = new _FInt64(Anchor);
|
|
213
|
+
_FInt64.NegativeOne = _FInt64.fromDouble(-1);
|
|
214
|
+
_FInt64.AdditiveIdentity = new _FInt64(0n);
|
|
215
|
+
_FInt64.MultiplicativeIdentity = new _FInt64(Anchor);
|
|
216
|
+
var FInt64 = _FInt64;
|
|
217
|
+
|
|
218
|
+
// src/utils/parsing.ts
|
|
219
|
+
function splitLimited(text, separator, count = -1) {
|
|
220
|
+
if (count === -1) {
|
|
221
|
+
return text.split(separator);
|
|
222
|
+
}
|
|
223
|
+
const result = [];
|
|
224
|
+
let remaining = text;
|
|
225
|
+
for (let i = 0; i < count; i++) {
|
|
226
|
+
const idx = remaining.indexOf(separator);
|
|
227
|
+
if (idx === -1) break;
|
|
228
|
+
result.push(remaining.substring(0, idx));
|
|
229
|
+
remaining = remaining.substring(idx + separator.length);
|
|
230
|
+
}
|
|
231
|
+
result.push(remaining);
|
|
232
|
+
return result;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
exports.FInt64 = FInt64;
|
|
236
|
+
exports.splitLimited = splitLimited;
|
|
237
|
+
exports.textDeReplace = textDeReplace;
|
|
238
|
+
exports.textReplace = textReplace;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
|
|
3
|
+
// src/utils/hashing.ts
|
|
4
|
+
function getHashCode(text) {
|
|
5
|
+
const hash = crypto.createHash("sha512");
|
|
6
|
+
hash.update(text, "utf-8");
|
|
7
|
+
const buf = hash.digest();
|
|
8
|
+
return buf.readBigInt64LE(0);
|
|
9
|
+
}
|
|
10
|
+
function getHashCode32(text) {
|
|
11
|
+
return Number(getHashCode(text) & 0xffffffffn);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { getHashCode, getHashCode32 };
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { ISub, ILine, ILpsDocument } from './types.js';
|
|
2
|
+
import { F as FInt64 } from './fint64-C-6kmcgU.js';
|
|
3
|
+
import { StringStructure } from './structure.js';
|
|
4
|
+
|
|
5
|
+
declare class Sub implements ISub {
|
|
6
|
+
name: string;
|
|
7
|
+
protected _info: string;
|
|
8
|
+
constructor();
|
|
9
|
+
constructor(lpsSub: string);
|
|
10
|
+
constructor(name: string, info: string);
|
|
11
|
+
constructor(name: string, ...infos: string[]);
|
|
12
|
+
getStoreString(): string;
|
|
13
|
+
getString(): string;
|
|
14
|
+
getInteger64(): bigint;
|
|
15
|
+
getInteger(): number;
|
|
16
|
+
getDouble(): number;
|
|
17
|
+
getFloat(): FInt64;
|
|
18
|
+
getDateTime(): Date;
|
|
19
|
+
getBoolean(): boolean;
|
|
20
|
+
setString(value: string): void;
|
|
21
|
+
setInteger(value: number): void;
|
|
22
|
+
setInteger64(value: bigint): void;
|
|
23
|
+
setDouble(value: number): void;
|
|
24
|
+
setFloat(value: FInt64): void;
|
|
25
|
+
setDateTime(value: Date): void;
|
|
26
|
+
setBoolean(value: boolean): void;
|
|
27
|
+
get info(): string;
|
|
28
|
+
set info(value: string);
|
|
29
|
+
get infoDisplay(): string;
|
|
30
|
+
set infoDisplay(value: string);
|
|
31
|
+
get infoToInt(): number;
|
|
32
|
+
set infoToInt(value: number);
|
|
33
|
+
get infoToInt64(): bigint;
|
|
34
|
+
set infoToInt64(value: bigint);
|
|
35
|
+
get infoToDouble(): number;
|
|
36
|
+
set infoToDouble(value: number);
|
|
37
|
+
get infoToBoolean(): boolean;
|
|
38
|
+
set infoToBoolean(value: boolean);
|
|
39
|
+
private _infos;
|
|
40
|
+
get infos(): StringStructure;
|
|
41
|
+
load(lps: string): void;
|
|
42
|
+
load(name: string, info: string): void;
|
|
43
|
+
set(other: ISub): void;
|
|
44
|
+
getInfo(): string;
|
|
45
|
+
getInfos(): string[];
|
|
46
|
+
first(): string | null;
|
|
47
|
+
last(): string | null;
|
|
48
|
+
getLongHashCode(): bigint;
|
|
49
|
+
toString(): string;
|
|
50
|
+
static split(text: string, separator: string, count?: number): string[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare class Line extends Sub implements ILine {
|
|
54
|
+
subs: ISub[];
|
|
55
|
+
_text: string;
|
|
56
|
+
comments: string;
|
|
57
|
+
constructor();
|
|
58
|
+
constructor(lpsLine: string);
|
|
59
|
+
constructor(line: ILine);
|
|
60
|
+
constructor(name: string, info: string, text?: string, ...subs: ISub[]);
|
|
61
|
+
load(lps: string): void;
|
|
62
|
+
load(name: string, info: string, text?: string, subs?: ISub[]): void;
|
|
63
|
+
load(line: ILine): void;
|
|
64
|
+
get text(): string;
|
|
65
|
+
set text(value: string);
|
|
66
|
+
get textDisplay(): string;
|
|
67
|
+
set textDisplay(value: string);
|
|
68
|
+
get textToInt(): number;
|
|
69
|
+
set textToInt(value: number);
|
|
70
|
+
get textToInt64(): bigint;
|
|
71
|
+
set textToInt64(value: bigint);
|
|
72
|
+
get textToDouble(): number;
|
|
73
|
+
set textToDouble(value: number);
|
|
74
|
+
getText(): string;
|
|
75
|
+
private _texts;
|
|
76
|
+
get texts(): StringStructure;
|
|
77
|
+
addSub(newSub: ISub): void;
|
|
78
|
+
addorReplaceSub(newSub: ISub): void;
|
|
79
|
+
addRange(newSubs: ISub[]): void;
|
|
80
|
+
insertSub(index: number, newSub: ISub): void;
|
|
81
|
+
insertRange(index: number, newSubs: ISub[]): void;
|
|
82
|
+
remove(sub: ISub): boolean;
|
|
83
|
+
removeByName(subName: string): boolean;
|
|
84
|
+
removeAll(subName: string): void;
|
|
85
|
+
removeAt(index: number): void;
|
|
86
|
+
contains(sub: ISub): boolean;
|
|
87
|
+
containsByName(value: string): boolean;
|
|
88
|
+
find(subName: string): ISub | null;
|
|
89
|
+
find(subName: string, subinfo: string): ISub | null;
|
|
90
|
+
findInfo(subinfo: string): ISub | null;
|
|
91
|
+
findAll(subName: string): ISub[];
|
|
92
|
+
findAll(subName: string, subinfo: string): ISub[];
|
|
93
|
+
findAllInfo(subinfo: string): ISub[];
|
|
94
|
+
findorAdd(subName: string): ISub;
|
|
95
|
+
searchAll(value: string): ISub[];
|
|
96
|
+
search(value: string): ISub | null;
|
|
97
|
+
indexOf(subName: string): number;
|
|
98
|
+
indexsOf(subName: string): number[];
|
|
99
|
+
getSubBool(subName: string): boolean;
|
|
100
|
+
setSubBool(subName: string, value: boolean): void;
|
|
101
|
+
getSubInt(subName: string, defaultValue?: number): number;
|
|
102
|
+
setSubInt(subName: string, value: number): void;
|
|
103
|
+
getSubInt64(subName: string, defaultValue?: bigint): bigint;
|
|
104
|
+
setSubInt64(subName: string, value: bigint): void;
|
|
105
|
+
getSubFloat(subName: string, defaultValue?: FInt64): FInt64;
|
|
106
|
+
setSubFloat(subName: string, value: FInt64): void;
|
|
107
|
+
getSubDateTime(subName: string, defaultValue?: Date): Date | null;
|
|
108
|
+
setSubDateTime(subName: string, value: Date): void;
|
|
109
|
+
getSubString(subName: string, defaultValue?: string | null): string | null;
|
|
110
|
+
setSubString(subName: string, value: string | null): void;
|
|
111
|
+
getSubDouble(subName: string, defaultValue?: number): number;
|
|
112
|
+
setSubDouble(subName: string, value: number): void;
|
|
113
|
+
getLongHashCode(): bigint;
|
|
114
|
+
toList(): ISub[];
|
|
115
|
+
toString(sb?: string[]): string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class LineDict extends Sub implements ILine {
|
|
119
|
+
private _subs;
|
|
120
|
+
_text: string;
|
|
121
|
+
comments: string;
|
|
122
|
+
constructor();
|
|
123
|
+
constructor(lpsLine: string);
|
|
124
|
+
constructor(line: ILine);
|
|
125
|
+
constructor(name: string, info: string, text?: string, ...subs: ISub[]);
|
|
126
|
+
load(lps: string): void;
|
|
127
|
+
load(name: string, info: string, text?: string, subs?: ISub[]): void;
|
|
128
|
+
load(line: ILine): void;
|
|
129
|
+
get text(): string;
|
|
130
|
+
set text(value: string);
|
|
131
|
+
get textDisplay(): string;
|
|
132
|
+
set textDisplay(value: string);
|
|
133
|
+
get textToInt(): number;
|
|
134
|
+
set textToInt(value: number);
|
|
135
|
+
get textToInt64(): bigint;
|
|
136
|
+
set textToInt64(value: bigint);
|
|
137
|
+
get textToDouble(): number;
|
|
138
|
+
set textToDouble(value: number);
|
|
139
|
+
getText(): string;
|
|
140
|
+
private _texts;
|
|
141
|
+
get texts(): StringStructure;
|
|
142
|
+
get subs(): ISub[];
|
|
143
|
+
set subs(value: ISub[]);
|
|
144
|
+
addSub(newSub: ISub): void;
|
|
145
|
+
addorReplaceSub(newSub: ISub): void;
|
|
146
|
+
addRange(newSubs: ISub[]): void;
|
|
147
|
+
insertSub(index: number, newSub: ISub): void;
|
|
148
|
+
insertRange(index: number, newSubs: ISub[]): void;
|
|
149
|
+
remove(sub: ISub): boolean;
|
|
150
|
+
removeByName(subName: string): boolean;
|
|
151
|
+
removeAll(subName: string): void;
|
|
152
|
+
removeAt(index: number): void;
|
|
153
|
+
contains(sub: ISub): boolean;
|
|
154
|
+
containsByName(value: string): boolean;
|
|
155
|
+
find(subName: string): ISub | null;
|
|
156
|
+
find(subName: string, subinfo: string): ISub | null;
|
|
157
|
+
findInfo(subinfo: string): ISub | null;
|
|
158
|
+
findAll(subName: string): ISub[];
|
|
159
|
+
findAll(subName: string, subinfo: string): ISub[];
|
|
160
|
+
findAllInfo(subinfo: string): ISub[];
|
|
161
|
+
findorAdd(subName: string): ISub;
|
|
162
|
+
searchAll(value: string): ISub[];
|
|
163
|
+
search(value: string): ISub | null;
|
|
164
|
+
indexOf(subName: string): number;
|
|
165
|
+
indexsOf(subName: string): number[];
|
|
166
|
+
getSubBool(subName: string): boolean;
|
|
167
|
+
setSubBool(subName: string, value: boolean): void;
|
|
168
|
+
getSubInt(subName: string, defaultValue?: number): number;
|
|
169
|
+
setSubInt(subName: string, value: number): void;
|
|
170
|
+
getSubInt64(subName: string, defaultValue?: bigint): bigint;
|
|
171
|
+
setSubInt64(subName: string, value: bigint): void;
|
|
172
|
+
getSubFloat(subName: string, defaultValue?: FInt64): FInt64;
|
|
173
|
+
setSubFloat(subName: string, value: FInt64): void;
|
|
174
|
+
getSubDateTime(subName: string, defaultValue?: Date): Date | null;
|
|
175
|
+
setSubDateTime(subName: string, value: Date): void;
|
|
176
|
+
getSubString(subName: string, defaultValue?: string | null): string | null;
|
|
177
|
+
setSubString(subName: string, value: string | null): void;
|
|
178
|
+
getSubDouble(subName: string, defaultValue?: number): number;
|
|
179
|
+
setSubDouble(subName: string, value: number): void;
|
|
180
|
+
getLongHashCode(): bigint;
|
|
181
|
+
toList(): ISub[];
|
|
182
|
+
toString(sb?: string[]): string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
declare class LPS implements ILpsDocument {
|
|
186
|
+
assemblage: ILine[];
|
|
187
|
+
constructor();
|
|
188
|
+
constructor(lps: string);
|
|
189
|
+
constructor(line: ILine, ...lines: ILine[]);
|
|
190
|
+
constructor(lines: ILine[]);
|
|
191
|
+
load(lps: string): void;
|
|
192
|
+
load(lines: ILine[]): void;
|
|
193
|
+
addLine(newLine: ILine): void;
|
|
194
|
+
addorReplaceLine(newLine: ILine): void;
|
|
195
|
+
addRange(newLines: ILine[]): void;
|
|
196
|
+
insertLine(index: number, newLine: ILine): void;
|
|
197
|
+
insertRange(index: number, newLines: ILine[]): void;
|
|
198
|
+
remove(target: ILine | string): boolean;
|
|
199
|
+
removeAll(target: ILine | string): void;
|
|
200
|
+
removeAt(index: number): void;
|
|
201
|
+
contains(target: ILine | ISub): boolean;
|
|
202
|
+
containsLine(value: string): boolean;
|
|
203
|
+
containsSub(value: string): boolean;
|
|
204
|
+
findLine(lineName: string): ILine | null;
|
|
205
|
+
findLine(lineName: string, lineinfo: string): ILine | null;
|
|
206
|
+
findLineInfo(lineinfo: string): ILine | null;
|
|
207
|
+
findorAddLine(lineName: string): ILine;
|
|
208
|
+
findAllLine(lineName: string): ILine[];
|
|
209
|
+
findAllLine(lineName: string, lineinfo: string): ILine[];
|
|
210
|
+
findAllLineInfo(lineinfo: string): ILine[];
|
|
211
|
+
findSub(subName: string): ISub | null;
|
|
212
|
+
findSub(subName: string, subinfo: string): ISub | null;
|
|
213
|
+
findSubInfo(subinfo: string): ISub | null;
|
|
214
|
+
findAllSub(subName: string): ISub[];
|
|
215
|
+
findAllSub(subName: string, subinfo: string): ISub[];
|
|
216
|
+
findAllSubInfo(subinfo: string): ISub[];
|
|
217
|
+
searchAllLine(value: string): ILine[];
|
|
218
|
+
searchLine(value: string): ILine | null;
|
|
219
|
+
searchAllSub(value: string): ISub[];
|
|
220
|
+
searchSub(value: string): ISub | null;
|
|
221
|
+
indexOf(lineName: string): number;
|
|
222
|
+
indexsOf(lineName: string): number[];
|
|
223
|
+
first(): ILine | null;
|
|
224
|
+
last(): ILine | null;
|
|
225
|
+
getLongHashCode(): bigint;
|
|
226
|
+
getLineBool(lineName: string): boolean;
|
|
227
|
+
setLineBool(lineName: string, value: boolean): void;
|
|
228
|
+
getLineInt(lineName: string, defaultValue?: number): number;
|
|
229
|
+
setLineInt(lineName: string, value: number): void;
|
|
230
|
+
getLineInt64(lineName: string, defaultValue?: bigint): bigint;
|
|
231
|
+
setLineInt64(lineName: string, value: bigint): void;
|
|
232
|
+
getLineString(lineName: string, defaultValue?: string | null): string | null;
|
|
233
|
+
setLineString(lineName: string, value: string | null): void;
|
|
234
|
+
getLineDouble(lineName: string, defaultValue?: number): number;
|
|
235
|
+
setLineDouble(lineName: string, value: number): void;
|
|
236
|
+
getLineFloat(lineName: string, defaultValue?: FInt64): FInt64;
|
|
237
|
+
setLineFloat(lineName: string, value: FInt64): void;
|
|
238
|
+
getLineDateTime(lineName: string, defaultValue?: Date): Date | null;
|
|
239
|
+
setLineDateTime(lineName: string, value: Date): void;
|
|
240
|
+
get length(): number;
|
|
241
|
+
get count(): number;
|
|
242
|
+
toString(): string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare class LpsDocument extends LPS {
|
|
246
|
+
private _lineNode;
|
|
247
|
+
constructor();
|
|
248
|
+
constructor(lps: string);
|
|
249
|
+
constructor(line: ILine, ...lines: ILine[]);
|
|
250
|
+
constructor(lines: ILine[]);
|
|
251
|
+
get lineNode(): number;
|
|
252
|
+
set lineNode(value: number);
|
|
253
|
+
readNext(): ILine | null;
|
|
254
|
+
read(): ILine | null;
|
|
255
|
+
append(newLine: ILine): void;
|
|
256
|
+
append(newlineName: string, info?: string, text?: string, ...subs: ISub[]): void;
|
|
257
|
+
appendSub(...newSubs: ISub[]): void;
|
|
258
|
+
appendSubByName(newSubName: string, subInfo?: string): void;
|
|
259
|
+
readReset(): void;
|
|
260
|
+
readEnd(): void;
|
|
261
|
+
readCanNext(): boolean;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export { LPS, Line, LineDict, LpsDocument, Sub };
|