Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: pkg/barback/lib/src/transformer/aggregate_transform.dart

Issue 267393009: Transition barback's infrastructure to an aggregate-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/barback/lib/src/transformer/aggregate_transform.dart
diff --git a/pkg/barback/lib/src/transformer/aggregate_transform.dart b/pkg/barback/lib/src/transformer/aggregate_transform.dart
index a5244b43b0626a170e0fba86d8a2d75a565aac7a..27491fb36868dddbe23bbd8f31ed348356efc35c 100644
--- a/pkg/barback/lib/src/transformer/aggregate_transform.dart
+++ b/pkg/barback/lib/src/transformer/aggregate_transform.dart
@@ -132,14 +132,21 @@ class AggregateTransformController extends BaseTransformController {
/// The set of assets that the transformer has emitted.
AssetSet get outputs => transform._outputs;
- /// The controller for the [AggregateTransform.primaryInputs] stream.
- StreamController<Asset> get inputController => transform._inputController;
+ bool get isDone => transform._inputController.isClosed;
AggregateTransformController(TransformNode node)
: super(new AggregateTransform._(node));
- void close() {
- super.close();
+ /// Adds a primary input asset to the [AggregateTransform.primaryInputs]
+ /// stream.
+ void addInput(Asset input) => transform._inputController.add(input);
+
+ /// Returns whether an input with the given [id] was added via [addInput].
+ bool addedId(AssetId id) {
+ return transform._emittedPrimaryInputs.ids.contains(id);
+ }
+
+ void done() {
transform._inputController.close();
}
}
« no previous file with comments | « pkg/barback/lib/src/graph/transformer_classifier.dart ('k') | pkg/barback/lib/src/transformer/aggregate_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698