-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
62049ea
commit b97f551
Showing
6 changed files
with
39 additions
and
6 deletions.
There are no files selected for viewing
24 changes: 22 additions & 2 deletions
24
.../src/main/kotlin/gov/nasa/ammos/aerie/procedural/scheduling/plan/DeletedAnchorStrategy.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
package gov.nasa.ammos.aerie.procedural.scheduling.plan | ||
|
||
/** | ||
* How to handle directives anchored to a deleted activity. | ||
* | ||
* If you intend to delete an activity that you believe has nothing anchored to it, | ||
* using [Error] is recommended. This is the default. | ||
*/ | ||
enum class DeletedAnchorStrategy { | ||
Error, | ||
Cascade, | ||
/** Throw an error. */ Error, | ||
/** Recursively delete everything in the anchor chain. */ Cascade, | ||
|
||
/** | ||
* Attempt to delete the activity in-place without changing the start times | ||
* of any activities anchored to it. | ||
* | ||
* Consider the anchor chain `A <- B <- C`, where `A` starts at an absolute time and | ||
* `B` and `C` are anchored. | ||
* - If `A` is deleted with [ReAnchor], `B` will be set to start at the absolute time `A.startTime + B.offset`. | ||
* `C` will be unchanged. | ||
* - If `B` is deleted with [ReAnchor], `C` will be anchored to `A` with a new offset equal to `B.offset + C.offset`. | ||
* | ||
* If an activity is anchored to the end of the deleted activity, the delete activity's duration is assumed to be 0, | ||
* which may change the ultimate start time of the anchored activity. | ||
*/ | ||
ReAnchor, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters