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

Unified Diff: pkg/barback/lib/src/transform.dart

Issue 18650004: Make Assets know their ID. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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/transform.dart
diff --git a/pkg/barback/lib/src/transform.dart b/pkg/barback/lib/src/transform.dart
index 8023d0edb65818296f6200a214ea9f163af3bf0d..751973ec621ca5c74b4365f0961ae206bf97789c 100644
--- a/pkg/barback/lib/src/transform.dart
+++ b/pkg/barback/lib/src/transform.dart
@@ -18,7 +18,7 @@ import 'transform_node.dart';
/// itself a public constructor, which would be visible to external users.
/// Unlike the [Transform] class, this function is not exported by barback.dart.
Transform createTransform(TransformNode node, Set<AssetNode> inputs,
- Map<AssetId, Asset> outputs) =>
+ Set<Asset> outputs) =>
new Transform._(node, inputs, outputs);
/// While a [Transformer] represents a *kind* of transformation, this defines
@@ -32,7 +32,7 @@ class Transform {
final TransformNode _node;
final Set<AssetNode> _inputs;
- final Map<AssetId, Asset> _outputs;
+ final Set<Asset> _outputs;
/// Gets the ID of the primary input for this transformation.
///
@@ -71,9 +71,10 @@ class Transform {
});
}
- /// Stores [output] as the output created by this transformation for asset
- /// [id]. A transformation can output as many assets as it wants.
- void addOutput(AssetId id, Asset output) {
- _outputs[id] = output;
+ /// Stores [output] as the output created by this transformation.
+ ///
+ /// A transformation can output as many assets as it wants.
+ void addOutput(Asset output) {
nweiz 2013/07/03 20:08:25 This should throw an error if the transformer outp
Bob Nystrom 2013/07/03 22:32:11 Done.
+ _outputs.add(output);
}
}

Powered by Google App Engine
This is Rietveld 408576698