Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library barback.transformer_cluster; | |
| 6 | |
| 7 import 'dart:async'; | |
| 8 | |
| 9 import 'operator.dart'; | |
| 10 | |
| 11 /// A [TransformerCluster] encapsulates a phased collection of transformers. | |
| 12 /// | |
| 13 /// A transformer cluster is defined like a collection of phases, such as you | |
| 14 /// might pass to [Barback.updateOperators]. Input assets are transformed by the | |
| 15 /// first phase, whose results are passed to the second phase, and so on. | |
| 16 /// | |
| 17 /// However, from the perspective of someone using a [TransformerCluster], it | |
| 18 /// works just like a [Transformer]. It can be included in phases, and will run | |
| 19 /// in parallel to other transformers or clusters in those phases. Other | |
| 20 /// transformers and clusters will be unable to see any intermediate assets that | |
| 21 /// are generated by one phase of the cluster and consumed by another. Phases | |
| 22 /// following that containing the cluster will be able to see its outputs, | |
|
Bob Nystrom
2013/10/04 21:47:50
"Phases following that" -> "Phases after the one".
nweiz
2013/10/07 23:21:31
Done.
| |
| 23 /// though. | |
| 24 class TransformerCluster implements Operator { | |
|
Bob Nystrom
2013/10/04 21:47:50
As per our discussion: "TransformerGroup".
nweiz
2013/10/07 23:21:31
Done.
| |
| 25 /// The phases that comprise this cluster. | |
| 26 final Iterable<Iterable<Operator>> phases; | |
| 27 | |
| 28 TransformerCluster(Iterable<Iterable<Operator>> phases) | |
| 29 : this.phases = phases.map((phase) => phase.toList()).toList(); | |
| 30 } | |
| OLD | NEW |