| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library barback.transformer.declaring_aggregate_transform; | 5 library barback.transformer.declaring_aggregate_transform; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import '../asset/asset_id.dart'; | 9 import '../asset/asset_id.dart'; |
| 10 import '../graph/transform_node.dart'; | 10 import '../graph/transform_node.dart'; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 /// The controller for [DeclaringAggregateTransform]. | 82 /// The controller for [DeclaringAggregateTransform]. |
| 83 class DeclaringAggregateTransformController extends BaseTransformController { | 83 class DeclaringAggregateTransformController extends BaseTransformController { |
| 84 DeclaringAggregateTransform get transform => super.transform; | 84 DeclaringAggregateTransform get transform => super.transform; |
| 85 | 85 |
| 86 /// The set of ids that the transformer declares it will emit. | 86 /// The set of ids that the transformer declares it will emit. |
| 87 Set<AssetId> get outputIds => transform._outputIds; | 87 Set<AssetId> get outputIds => transform._outputIds; |
| 88 | 88 |
| 89 /// The controller for the [DeclaringAggregateTransform.primaryIds] stream. | 89 bool get isDone => transform._idController.isClosed; |
| 90 StreamController<AssetId> get idController => transform._idController; | |
| 91 | 90 |
| 92 DeclaringAggregateTransformController(TransformNode node) | 91 DeclaringAggregateTransformController(TransformNode node) |
| 93 : super(new DeclaringAggregateTransform._(node)); | 92 : super(new DeclaringAggregateTransform._(node)); |
| 94 | 93 |
| 95 void close() { | 94 /// Adds a primary input id to the [DeclaringAggregateTransform.primaryIds] |
| 96 super.close(); | 95 /// stream. |
| 97 idController.close(); | 96 void addId(AssetId id) => transform._idController.add(id); |
| 97 |
| 98 void done() { |
| 99 transform._idController.close(); |
| 98 } | 100 } |
| 99 } | 101 } |
| OLD | NEW |