New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make a consistent TimelineItem cancellation scheme. #18
Comments
On moving Output, maybe something like: Output( Output &&rhs )
{
_control = rhs._control;
if( _control.valid() ) {
_connection = rhs._connection;
_connection->updatePtr( this );
}
} This seems to skip a bit of the song and dance we have now around the connection rewiring. Does introduce an extra (shared) pointer to the Output, but that's probably not a big deal as it's not a copyable object. |
Once invalidated, forever invalidated Control bit. Connections and Controls will share ptrs to this bit, enabling them to check its status and cancel from either side without knowing about each other. class ControlBit {
public:
bool valid() const { return _active; }
void cancel() { _active = false; }
private:
bool _active = true;
}; |
Lazily instantiating the shared_ptr and inverting the control improves performance. TimelineItem::cancelled() is now a non-virtual member method. |
Implemented in unified_cancel branch |
Fixed by #20 |
Similar to what we have now for Cues. On destruction, associated TimelineItem will be considered invalid/canceled. Could use to make raw pointer animations potentially safe. Auto-wire scope to Output's lifetime when given a ch::Output type.
Any way to bring along the source with an Output on std::move, though? Or do we still need the pointer back to the Connection?
Names:
CancellationControlRef
ConnectionControlRef
TImelineItemControlRef
The text was updated successfully, but these errors were encountered: