summaryrefslogtreecommitdiffstats
path: root/src/server/Event.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Event.hpp')
-rw-r--r--src/server/Event.hpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/server/Event.hpp b/src/server/Event.hpp
index e00aa0d1..de1f2384 100644
--- a/src/server/Event.hpp
+++ b/src/server/Event.hpp
@@ -36,8 +36,7 @@ namespace raul {
class Path;
} // namespace raul
-namespace ingen {
-namespace server {
+namespace ingen::server {
class Engine;
class RunContext;
@@ -63,10 +62,10 @@ public:
/** Execution mode for events that block and unblock preprocessing. */
enum class Execution {
- NORMAL, ///< Normal pipelined execution
- ATOMIC, ///< Block pre-processing until this event is executed
- BLOCK, ///< Begin atomic block of events
- UNBLOCK ///< Finish atomic executed block of events
+ NORMAL, ///< Normal pipelined execution
+ ATOMIC, ///< Block pre-processing until this event is executed
+ BLOCK, ///< Begin atomic block of events
+ UNBLOCK ///< Finish atomic executed block of events
};
/** Claim position in undo stack before pre-processing (non-realtime). */
@@ -85,13 +84,13 @@ public:
virtual void undo(Interface& target) {}
/** Return true iff this event has been pre-processed. */
- inline bool is_prepared() const { return _status != Status::NOT_PREPARED; }
+ bool is_prepared() const { return _status != Status::NOT_PREPARED; }
/** Return the time stamp of this event. */
- inline SampleCount time() const { return _time; }
+ SampleCount time() const { return _time; }
/** Set the time stamp of this event. */
- inline void set_time(SampleCount time) { _time = time; }
+ void set_time(SampleCount time) { _time = time; }
/** Get the next event to be processed after this one. */
Event* next() const { return _next.load(); }
@@ -111,10 +110,13 @@ public:
/** Set the undo mode of this event. */
void set_mode(Mode mode) { _mode = mode; }
- inline Engine& engine() { return _engine; }
+ Engine& engine() { return _engine; }
protected:
- Event(Engine& engine, std::shared_ptr<Interface> client, int32_t id, FrameTime time)
+ Event(Engine& engine,
+ std::shared_ptr<Interface> client,
+ int32_t id,
+ FrameTime time) noexcept
: _engine(engine)
, _next(nullptr)
, _request_client(std::move(client))
@@ -134,22 +136,22 @@ protected:
, _mode(Mode::NORMAL)
{}
- inline bool pre_process_done(Status st) {
+ bool pre_process_done(Status st) {
_status = st;
return st == Status::SUCCESS;
}
- inline bool pre_process_done(Status st, const URI& subject) {
+ bool pre_process_done(Status st, const URI& subject) {
_err_subject = subject;
return pre_process_done(st);
}
- inline bool pre_process_done(Status st, const raul::Path& subject) {
+ bool pre_process_done(Status st, const raul::Path& subject) {
return pre_process_done(st, path_to_uri(subject));
}
/** Respond to the originating client. */
- inline Status respond() {
+ Status respond() {
if (_request_client && _request_id) {
_request_client->response(_request_id, _status, _err_subject);
}
@@ -166,7 +168,6 @@ protected:
Mode _mode;
};
-} // namespace server
-} // namespace ingen
+} // namespace ingen::server
#endif // INGEN_ENGINE_EVENT_HPP