Commit 3c0f73ba authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Final step in removing generics in EventHandler.

Fixes #1017
parent deb1a30c
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="12.0" date="TBD" description="TBD">
<action dev="luc" type="update" issue="1017">
Removed generics in EventHandler.
</action>
<action dev="luc" type="update" issue="1013">
Use SI units (i.e. seconds) in GNSSDate.
</action>
......
......@@ -39,10 +39,10 @@
package handlers #CBDBC8 {
interface "EventHandler<T extends EventDetector>" as EventHandler_T_ {
+init(SpacecraftState s0, AbsoluteDate target, T detector)
+Action eventOccurred(SpacecraftState s, T detector, boolean increasing)
+SpacecraftState resetState(T detector, SpacecraftState oldState)
interface EventHandler {
+init(SpacecraftState s0, AbsoluteDate target, EventDetector detector)
+Action eventOccurred(SpacecraftState s, EventDetector detector, boolean increasing)
+SpacecraftState resetState(EventDetector detector, SpacecraftState oldState)
}
enum Action {
......@@ -52,10 +52,10 @@
+CONTINUE
}
ContinueOnEvent --|> EventHandler_T_
StopOnEvent --|> EventHandler_T_
StopOnDecreasingEvent --|> EventHandler_T_
StopOnIncreasingEvent --|> EventHandler_T_
ContinueOnEvent --|> EventHandler
StopOnEvent --|> EventHandler
StopOnDecreasingEvent --|> EventHandler
StopOnIncreasingEvent --|> EventHandler
}
......@@ -77,12 +77,12 @@
}
EventDetector <--* "1" EventShifter
class "AbstractDetector<T extends EventDetector>" as AbstractDetector_T_ {
class "AbstractDetector<T extends AbstractDetector<T>>" as AbstractDetector_T_ {
+T withMaxCheck(double maxCheck)
+T withThreshold(double threshold)
+T withMaxIter(int maxIter)
+T withHandler(EventHandler<T> handler)
+EventHandler<T> getHandler()
+T withHandler(EventHandler handler)
+EventHandler getHandler()
}
enum FilterType {
......@@ -107,7 +107,7 @@
AbstractDetector_T_ <|-- EventSlopeFilter
AbstractDetector_T_ <|-- EventEnablingPredicateFilter
Action <-left- EventHandler_T_
Action <-left- EventHandler
EventDetector <|.. AbstractDetector_T_
AbstractDetector_T_ <|-- EclipseDetector
AbstractDetector_T_ <|-- ElevationDetector
......@@ -119,7 +119,7 @@
sake of diagram clarity
end note
EventHandler_T_ "1" <--o AbstractDetector_T_ : handler
EventHandler "1" <--o AbstractDetector_T_ : handler
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment