| 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 dependency_graph; | 5 library dependency_graph; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 |
| 8 import 'utils.dart'; | 9 import 'utils.dart'; |
| 9 | 10 |
| 10 | |
| 11 /* | 11 /* |
| 12 * [Graph] represents a datastructure for representing an DAG (directed acyclic | 12 * [Graph] represents a datastructure for representing an DAG (directed acyclic |
| 13 * graph). Each node in the graph is in a given [NodeState] and can have data | 13 * graph). Each node in the graph is in a given [NodeState] and can have data |
| 14 * attachted to it with [Node.userData]. | 14 * attachted to it with [Node.userData]. |
| 15 * | 15 * |
| 16 * It's interface consists basically of these methods: | 16 * It's interface consists basically of these methods: |
| 17 * - newNode: Adds a new node to the graph with the given dependencies and | 17 * - newNode: Adds a new node to the graph with the given dependencies and |
| 18 * the given user data. The node is in the [NodeState.Initialized] | 18 * the given user data. The node is in the [NodeState.Initialized] |
| 19 * state. | 19 * state. |
| 20 * - changeState: Changes the state of a node. | 20 * - changeState: Changes the state of a node. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 NodeAddedEvent(this.node); | 138 NodeAddedEvent(this.node); |
| 139 } | 139 } |
| 140 | 140 |
| 141 class StateChangedEvent extends GraphEvent { | 141 class StateChangedEvent extends GraphEvent { |
| 142 final Node node; | 142 final Node node; |
| 143 final NodeState from; | 143 final NodeState from; |
| 144 final NodeState to; | 144 final NodeState to; |
| 145 | 145 |
| 146 StateChangedEvent(this.node, this.from, this.to); | 146 StateChangedEvent(this.node, this.from, this.to); |
| 147 } | 147 } |
| OLD | NEW |