* Represents a set of multiple pulses. Used as input for operators * that accept multiple pulses at a time. Contained pulses are * accessible via the public "pulses" array property. This pulse doe * not carry added, removed or modified tuples directly. However, * the visit method can be used to
(dataflow, stamp, pulses, encode)
| 108330 | * @param {number} stamp - The timestamp. |
| 108331 | * @param {Array<Pulse>} pulses - The sub-pulses for this multi-pulse. |
| 108332 | */ function MultiPulse(dataflow, stamp, pulses, encode) { |
| 108333 | const p = this, n = pulses.length; |
| 108334 | let c = 0; |
| 108335 | this.dataflow = dataflow; |
| 108336 | this.stamp = stamp; |
| 108337 | this.fields = null; |
| 108338 | this.encode = encode || null; |
| 108339 | this.pulses = pulses; |
| 108340 | for(let i = 0; i < n; ++i){ |
| 108341 | const pulse6 = pulses[i]; |
| 108342 | if (pulse6.stamp !== stamp) continue; |
| 108343 | if (pulse6.fields) { |
| 108344 | const hash = p.fields || (p.fields = {}); |
| 108345 | for(const f in pulse6.fields)hash[f] = 1; |
| 108346 | } |
| 108347 | if (pulse6.changed(p.ADD)) c |= p.ADD; |
| 108348 | if (pulse6.changed(p.REM)) c |= p.REM; |
| 108349 | if (pulse6.changed(p.MOD)) c |= p.MOD; |
| 108350 | } |
| 108351 | this.changes = c; |
| 108352 | } |
| 108353 | (0, _vegaUtil.inherits)(MultiPulse, Pulse, { |
| 108354 | /** |
| 108355 | * Creates a new pulse based on the values of this pulse. |
nothing calls this directly
no outgoing calls
no test coverage detected