Timeline: perform track profile with given interpreter object
This commit is contained in:
parent
e85f218045
commit
972ec9851b
1 changed files with 8 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ namespace timeline {
|
|||
struct TrackProfile
|
||||
{
|
||||
using SlopeVerb = lib::VerbToken<ProfileInterpreter, void(uint)>;
|
||||
using SlopeElm = std::tuple<SlopeVerb, uint>;
|
||||
using SlopeElm = std::pair<SlopeVerb, uint>;
|
||||
using Elements = std::vector<SlopeElm>;
|
||||
|
||||
Elements elements;
|
||||
|
|
@ -93,6 +93,13 @@ namespace timeline {
|
|||
return not util::isnil (elements);
|
||||
}
|
||||
|
||||
void
|
||||
performWith (ProfileInterpreter& interpreter)
|
||||
{
|
||||
for (auto& slopeElm : elements)
|
||||
slopeElm.first.applyTo (interpreter, uint(slopeElm.second));
|
||||
}
|
||||
|
||||
private:/* ===== Internals: handling tokens ===== */
|
||||
void
|
||||
append (SlopeVerb::Handler handler, Literal token, uint param)
|
||||
|
|
|
|||
Loading…
Reference in a new issue