Scenario::IntervalResizer Class Referenceabstract
Inheritance diagram for Scenario::IntervalResizer:
score::InterfaceBase Scenario::BaseScenarioIntervalResizer Scenario::ScenarioIntervalResizer

Detailed Description

So, I know what you are thinking right now: "okay, it's the command to resize intervals, it must not be too hard, just add / remove the date to the current interval date and live happily forever after"

Followed by the reading of the following file, and the inevitable:

"WTF why do they need friggin interfaces and abstract factories to resize a goddamn interval what kind of madness is this i don't even

...

...

o sh*t the implementation for Scenario calls to MoveBaseEvent which calls to another abstract factory pls send help who the hell designed this even the windows API is better "

Here are the problems with resizing intervals : 1/ it may move other parts of the scenario depending on the flexible-ness policy, which is a complicated research problem involving constraint satisfiaction, implemented in an external CSP addon because it's so damn unstable. This is why there is an abstraction of the behaviour in MoveBaseEvent: multiple displacement algorithms are possible.

2/ it may behave differently in different cases :

  • if the interval is in a scenario
  • or in a loop
  • or if it's the base interval of the score

these three cases have different requirements - and multiple additional processes leveraging intervals are being developed, each with their specific resizing rules. Hence, it has to be abstract in some way.

Public Member Functions

virtual bool matches (const IntervalModel &m) const noexcept=0
 
virtual score::Commandmake (const IntervalModel &itv, TimeVal new_duration=TimeVal{1000}, ExpandMode=ExpandMode::GrowShrink, LockMode=LockMode::Free) const noexcept=0
 
virtual void update (score::Command &cmd, const IntervalModel &interval, TimeVal new_duration, ExpandMode=ExpandMode::GrowShrink, LockMode=LockMode::Free) const noexcept=0
 
- Public Member Functions inherited from score::InterfaceBase
virtual InterfaceKey interfaceKey () const noexcept=0
 Identifies an interface uniquely.
 

The documentation for this class was generated from the following file: