diff options
Diffstat (limited to 'src/server/events/Mark.cpp')
-rw-r--r-- | src/server/events/Mark.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/server/events/Mark.cpp b/src/server/events/Mark.cpp index 32648649..11690487 100644 --- a/src/server/events/Mark.cpp +++ b/src/server/events/Mark.cpp @@ -29,6 +29,7 @@ Mark::Mark(Engine& engine, Type type) : Event(engine, client, id, timestamp) , _type(type) + , _depth(0) {} bool @@ -40,10 +41,10 @@ Mark::pre_process() switch (_type) { case Type::BUNDLE_START: - stack->start_entry(); + _depth = stack->start_entry(); break; case Type::BUNDLE_END: - stack->finish_entry(); + _depth = stack->finish_entry(); break; } @@ -60,6 +61,28 @@ Mark::post_process() respond(); } +Event::Execution +Mark::get_execution() const +{ + if (!_engine.atomic_bundles()) { + return Execution::NORMAL; + } + + switch (_type) { + case Type::BUNDLE_START: + if (_depth == 1) { + return Execution::BLOCK; + } + break; + case Type::BUNDLE_END: + if (_depth == 0) { + return Execution::UNBLOCK; + } + break; + } + return Execution::NORMAL; +} + } // namespace Events } // namespace Server } // namespace Ingen |