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

Side by Side Diff: lib/src/transformer/base_transform.dart

Issue 1947773002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Code review changes Created 4 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 unified diff | Download patch
OLDNEW
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.base_transform; 5 library barback.transformer.base_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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 _consumedPrimaries.add(id); 69 _consumedPrimaries.add(id);
70 } 70 }
71 } 71 }
72 72
73 /// The base class for controllers of subclasses of [BaseTransform]. 73 /// The base class for controllers of subclasses of [BaseTransform].
74 /// 74 ///
75 /// Controllers are used so that [TransformNode]s can get values from a 75 /// Controllers are used so that [TransformNode]s can get values from a
76 /// [BaseTransform] without exposing getters in the public API. 76 /// [BaseTransform] without exposing getters in the public API.
77 abstract class BaseTransformController { 77 abstract class BaseTransformController {
78 /// The [BaseTransform] controlled by this controller. 78 /// The [BaseTransform] controlled by this controller.
79 final BaseTransform transform; 79 BaseTransform get transform;
80 80
81 /// The ids of primary inputs that should be consumed. 81 /// The ids of primary inputs that should be consumed.
82 Set<AssetId> get consumedPrimaries => transform._consumedPrimaries; 82 Set<AssetId> get consumedPrimaries => transform._consumedPrimaries;
83 83
84 /// Whether the transform logged an error. 84 /// Whether the transform logged an error.
85 bool get loggedError => transform._loggedError; 85 bool get loggedError => transform._loggedError;
86 86
87 /// The stream of log entries emitted by the transformer during a run. 87 /// The stream of log entries emitted by the transformer during a run.
88 Stream<LogEntry> get onLog => transform._onLogController.stream; 88 Stream<LogEntry> get onLog => transform._onLogController.stream;
89 89
90 /// Whether the transform's input or id stream has been closed. 90 /// Whether the transform's input or id stream has been closed.
91 /// 91 ///
92 /// See also [done]. 92 /// See also [done].
93 bool get isDone; 93 bool get isDone;
94 94
95 BaseTransformController(this.transform);
96
97 /// Mark this transform as finished emitting new inputs or input ids. 95 /// Mark this transform as finished emitting new inputs or input ids.
98 /// 96 ///
99 /// This is distinct from [cancel] in that it *doesn't* indicate that the 97 /// This is distinct from [cancel] in that it *doesn't* indicate that the
100 /// transform is finished being used entirely. The transformer may still log 98 /// transform is finished being used entirely. The transformer may still log
101 /// messages and load secondary inputs. This just indicates that all the 99 /// messages and load secondary inputs. This just indicates that all the
102 /// primary inputs are accounted for. 100 /// primary inputs are accounted for.
103 void done(); 101 void done();
104 102
105 /// Mark this transform as canceled. 103 /// Mark this transform as canceled.
106 /// 104 ///
107 /// This will close any streams and release any resources that were allocated 105 /// This will close any streams and release any resources that were allocated
108 /// for the duration of the transformation. Unlike [done], this indicates that 106 /// for the duration of the transformation. Unlike [done], this indicates that
109 /// the transformation is no longer relevant; either it has returned, or 107 /// the transformation is no longer relevant; either it has returned, or
110 /// something external has preemptively invalidated its results. 108 /// something external has preemptively invalidated its results.
111 void cancel() { 109 void cancel() {
112 done(); 110 done();
113 transform._onLogController.close(); 111 transform._onLogController.close();
114 } 112 }
115 } 113 }
OLDNEW
« no previous file with comments | « lib/src/transformer/aggregate_transform.dart ('k') | lib/src/transformer/declaring_aggregate_transform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698