OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.asset_node; | 5 library barback.asset.asset_node; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
| 9 import '../errors.dart'; |
| 10 import '../graph/transform_node.dart'; |
| 11 import '../utils.dart'; |
9 import 'asset.dart'; | 12 import 'asset.dart'; |
10 import 'asset_id.dart'; | 13 import 'asset_id.dart'; |
11 import 'errors.dart'; | |
12 import 'transform_node.dart'; | |
13 import 'utils.dart'; | |
14 | 14 |
15 /// Describes the current state of an asset as part of a transformation graph. | 15 /// Describes the current state of an asset as part of a transformation graph. |
16 /// | 16 /// |
17 /// An asset node can be in one of three states (see [AssetState]). It provides | 17 /// An asset node can be in one of three states (see [AssetState]). It provides |
18 /// an [onStateChange] stream that emits an event whenever it changes state. | 18 /// an [onStateChange] stream that emits an event whenever it changes state. |
19 /// | 19 /// |
20 /// Asset nodes are controlled using [AssetNodeController]s. | 20 /// Asset nodes are controlled using [AssetNodeController]s. |
21 class AssetNode { | 21 class AssetNode { |
22 /// The id of the asset that this node represents. | 22 /// The id of the asset that this node represents. |
23 final AssetId id; | 23 final AssetId id; |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 /// Whether this state is [AssetState.RUNNING]. | 275 /// Whether this state is [AssetState.RUNNING]. |
276 bool get isDirty => this == AssetState.RUNNING; | 276 bool get isDirty => this == AssetState.RUNNING; |
277 | 277 |
278 final String name; | 278 final String name; |
279 | 279 |
280 const AssetState._(this.name); | 280 const AssetState._(this.name); |
281 | 281 |
282 String toString() => name; | 282 String toString() => name; |
283 } | 283 } |
OLD | NEW |