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

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

Issue 261823008: Reorganize barback's source files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: re-add barback/lib/src/internal_asset.dart Created 6 years, 8 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
« no previous file with comments | « pkg/barback/lib/src/cancelable_future.dart ('k') | pkg/barback/lib/src/declaring_transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/declaring_transform.dart
diff --git a/pkg/barback/lib/src/declaring_transform.dart b/pkg/barback/lib/src/declaring_transform.dart
deleted file mode 100644
index 2f8a8bfda3db4093114b9deaa984fc7886ece9a6..0000000000000000000000000000000000000000
--- a/pkg/barback/lib/src/declaring_transform.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library barback.declaring_transform;
-
-import 'asset_id.dart';
-import 'base_transform.dart';
-import 'transform_node.dart';
-
-/// A transform for [DeclaringTransform]ers that allows them to declare the ids
-/// of the outputs they'll generate without generating the concrete bodies of
-/// those outputs.
-class DeclaringTransform extends BaseTransform {
- final _outputIds = new Set<AssetId>();
-
- final AssetId primaryId;
-
- DeclaringTransform._(TransformNode node)
- : primaryId = node.primary.id,
- super(node);
-
- /// Stores [id] as the id of an output that will be created by this
- /// transformation when it's run.
- ///
- /// A transformation can declare as many assets as it wants. If
- /// [DeclaringTransformer.declareOutputs] declareds a given asset id for a
- /// given input, [Transformer.apply] should emit the corresponding asset as
- /// well.
- void declareOutput(AssetId id) {
- // TODO(nweiz): This should immediately throw if an output with that ID
- // has already been declared by this transformer.
- _outputIds.add(id);
- }
-}
-
-/// The controller for [DeclaringTransform].
-class DeclaringTransformController extends BaseTransformController {
- DeclaringTransform get transform => super.transform;
-
- /// The set of ids that the transformer declares it will emit for the given
- /// primary input.
- Set<AssetId> get outputIds => transform._outputIds;
-
- DeclaringTransformController(TransformNode node)
- : super(new DeclaringTransform._(node));
-}
« no previous file with comments | « pkg/barback/lib/src/cancelable_future.dart ('k') | pkg/barback/lib/src/declaring_transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698