42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
# Feature: CallbackSet
|
|
|
|
## Overview
|
|
|
|
CallbackSet allows composing multiple callbacks (both continuous and discrete) with controlled ordering and execution priority. Essential for complex simulations with multiple events.
|
|
|
|
## Why This Feature Matters
|
|
|
|
- Manage multiple callbacks cleanly
|
|
- Control execution order
|
|
- Enable/disable callbacks dynamically
|
|
- Foundation for advanced callback patterns
|
|
|
|
## Dependencies
|
|
|
|
- Discrete callbacks (feature #5)
|
|
- Continuous callbacks (already implemented)
|
|
|
|
## Implementation Approach
|
|
|
|
```rust
|
|
pub struct CallbackSet<'a, const D: usize, P> {
|
|
continuous_callbacks: Vec<ContinuousCallback<'a, D, P>>,
|
|
discrete_callbacks: Vec<DiscreteCallback<'a, D, P>>,
|
|
// Optional: priority/ordering information
|
|
}
|
|
```
|
|
|
|
## Implementation Tasks
|
|
|
|
- [ ] Define CallbackSet struct
|
|
- [ ] Builder pattern for adding callbacks
|
|
- [ ] Execution order management
|
|
- [ ] Integration with Problem solve loop
|
|
- [ ] Testing with multiple callbacks
|
|
- [ ] Documentation
|
|
|
|
## Complexity Estimate
|
|
|
|
**Effort**: Small (3-4 hours)
|
|
**Risk**: Low
|