TimelineConstraint.h header
#include <ew/core/TimelineConstraint.h>
Namespace ew::core
TimelineConstraint struct
struct ew::core::TimelineConstraint
A single relative constraint held on the constrained event (TL-12): the OTHER event it is measured against, and the TimelineConstraintKind. Held on event B, {.otherId = A, .kind = After} means "B must follow A".
Members
ContentId ew::core::TimelineConstraint::otherId
The event this one is constrained against (A in "B is After A"). A null id is inert.
TimelineConstraintKind ew::core::TimelineConstraint::kind =
The relation to otherId.
bool operator==(const TimelineConstraint &, const TimelineConstraint &)=default
Value equality over both fields, so a constraint set round-trips and de-duplicates cleanly.
Enumerations
enum class TimelineConstraintKind { After, Before, During }
How one timeline event is constrained RELATIVE to another (TL-12): "B must follow A", "C happens during the siege". A constraint is what turns a drawing into a model – when the referenced event moves, the constraint is either honoured (the dependent follows) or flagged (it is now impossible). The kind is read from the constrained event's point of view: a constraint {A, After} on event B reads "B is After A".
Functions
std::optional< TimelineConstraintKind > ew::core::timelineConstraintKindFromToken(QStringView token)
Parses a constraint kind from its serialization token; std::nullopt if unrecognized (so a caller can drop an absent or unknown constraint rather than guess).
QString ew::core::toToken(TimelineConstraintKind kind)
Returns the stable serialization token for kind (e.g. "after").