summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Event.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-07-14 22:24:00 +0000
committerDavid Robillard <d@drobilla.net>2006-07-14 22:24:00 +0000
commit5dc6649496e938b32a5fe9f341de6cce962d3731 (patch)
treec4b1832581c32b867b653afd0a7bd4bb05883b36 /src/libs/engine/Event.h
parent7e013dc6986fa9d6dc8616d494d9de5d192c4c69 (diff)
downloadingen-5dc6649496e938b32a5fe9f341de6cce962d3731.tar.gz
ingen-5dc6649496e938b32a5fe9f341de6cce962d3731.tar.bz2
ingen-5dc6649496e938b32a5fe9f341de6cce962d3731.zip
Enforced OSC path restrictions on Path for spec conformance (since GraphObject
paths will soon be part of OSC paths) git-svn-id: http://svn.drobilla.net/lad/ingen@88 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Event.h')
-rw-r--r--src/libs/engine/Event.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libs/engine/Event.h b/src/libs/engine/Event.h
index 355525cf..604d1e19 100644
--- a/src/libs/engine/Event.h
+++ b/src/libs/engine/Event.h
@@ -43,26 +43,29 @@ class Event : public MaidObject
public:
virtual ~Event() {}
- /** Execute event, MUST be realtime safe */
- virtual void execute(samplecount offset) { assert(!m_executed); m_executed = true; }
+ /** Execute this event in the audio thread (MUST be realtime safe). */
+ virtual void execute(samplecount offset) { assert(!_executed); _executed = true; }
- /** Perform any actions after execution (ie send OSC response to client).
- * No realtime requirement. */
+ /** Perform any actions after execution (ie send replies to commands)
+ * (no realtime requirements). */
virtual void post_process() {}
- inline samplecount time_stamp() { return m_time_stamp; }
+ inline samplecount time_stamp() { return _time_stamp; }
protected:
- Event(CountedPtr<Responder> responder);
- Event();
-
// Prevent copies
Event(const Event&);
Event& operator=(const Event&);
+
+ Event(CountedPtr<Responder> responder, samplecount timestamp)
+ : _responder(responder)
+ , _time_stamp(timestamp)
+ , _executed(false)
+ {}
- CountedPtr<Responder> m_responder;
- samplecount m_time_stamp;
- bool m_executed;
+ CountedPtr<Responder> _responder;
+ samplecount _time_stamp;
+ bool _executed;
};