summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-17 20:03:45 +0000
committerDavid Robillard <d@drobilla.net>2011-04-17 20:03:45 +0000
commitad02810bb505e823ed7222c785649f668baaa404 (patch)
treeb692d89c641f09444b0f76c8f56749d1c4294bc4
parentda618852b67d64f5fed686234f5a626c33812c87 (diff)
downloadingen-ad02810bb505e823ed7222c785649f668baaa404.tar.gz
ingen-ad02810bb505e823ed7222c785649f668baaa404.tar.bz2
ingen-ad02810bb505e823ed7222c785649f668baaa404.zip
Remove unused Driver::is_activated.
Consistently sort fields of Engine by name. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3156 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--include/ingen/EngineBase.hpp6
-rw-r--r--src/engine/Driver.hpp3
-rw-r--r--src/engine/Engine.hpp70
-rw-r--r--src/engine/JackDriver.hpp1
4 files changed, 31 insertions, 49 deletions
diff --git a/include/ingen/EngineBase.hpp b/include/ingen/EngineBase.hpp
index cf3a2e97..3e9366f8 100644
--- a/include/ingen/EngineBase.hpp
+++ b/include/ingen/EngineBase.hpp
@@ -36,8 +36,14 @@ class EngineBase
public:
virtual ~EngineBase() {}
+ /**
+ Activate the engine.
+ */
virtual bool activate() = 0;
+ /**
+ Deactivate the engine.
+ */
virtual void deactivate() = 0;
/**
diff --git a/src/engine/Driver.hpp b/src/engine/Driver.hpp
index 1c02972b..3b869046 100644
--- a/src/engine/Driver.hpp
+++ b/src/engine/Driver.hpp
@@ -80,9 +80,6 @@ public:
/** Deactivate driver (stop processing graph and events). */
virtual void deactivate() {}
- /** Return true iff driver is activated (processing graph and events). */
- virtual bool is_activated() const { return true; }
-
/** Create a port ready to be inserted with add_input (non realtime).
* May return NULL if the Driver can not create the port for some reason.
*/
diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp
index c9e9229e..513d82be 100644
--- a/src/engine/Engine.hpp
+++ b/src/engine/Engine.hpp
@@ -60,66 +60,46 @@ public:
virtual ~Engine();
- virtual void set_driver(SharedPtr<Driver> driver);
- virtual void add_event_source(SharedPtr<EventSource> source);
-
virtual bool activate();
- virtual void deactivate();
- /**
- Indicate that a quit is desired
+ virtual void deactivate();
- This function simply sets a flag which affects the return value of
- main_iteration, it does not actually force the engine to stop running or
- block. The code driving the engine is responsible for stopping and
- cleaning up when main_iteration returns false.
- */
virtual void quit();
- /**
- Run a single iteration of the main context.
-
- The main context post-processes events and performs housekeeping duties
- like collecting garbage. This should be called regularly, e.g. a few
- times per second. The return value indicates whether execution should
- continue; i.e. if false is returned, a quit has been requested and the
- caller should cease calling main_iteration() and stop the engine.
- */
virtual bool main_iteration();
- /**
- Process all events for this process cycle.
+ void set_driver(SharedPtr<Driver> driver);
- Must be called (likely by the Driver) from the process thread.
- */
- virtual void process_events(ProcessContext& context);
+ void add_event_source(SharedPtr<EventSource> source);
- virtual ClientBroadcaster* broadcaster() const { return _broadcaster; }
- virtual BufferFactory* buffer_factory() const { return _buffer_factory; }
- virtual ControlBindings* control_bindings() const { return _control_bindings; }
- virtual Driver* driver() const { return _driver.get(); }
- virtual Raul::Maid* maid() const { return _maid; }
- virtual MessageContext* message_context() const { return _message_context; }
- virtual NodeFactory* node_factory() const { return _node_factory; }
- virtual PostProcessor* post_processor() const { return _post_processor; }
- virtual Shared::World* world() const { return _world; }
+ void process_events(ProcessContext& context);
- virtual SharedPtr<EngineStore> engine_store() const;
+ ClientBroadcaster* broadcaster() const { return _broadcaster; }
+ BufferFactory* buffer_factory() const { return _buffer_factory; }
+ ControlBindings* control_bindings() const { return _control_bindings; }
+ Driver* driver() const { return _driver.get(); }
+ Raul::Maid* maid() const { return _maid; }
+ MessageContext* message_context() const { return _message_context; }
+ NodeFactory* node_factory() const { return _node_factory; }
+ PostProcessor* post_processor() const { return _post_processor; }
+ Shared::World* world() const { return _world; }
+
+ SharedPtr<EngineStore> engine_store() const;
private:
+ ClientBroadcaster* _broadcaster;
+ BufferFactory* _buffer_factory;
+ ControlBindings* _control_bindings;
+ SharedPtr<Driver> _driver;
+ Raul::Maid* _maid;
+ MessageContext* _message_context;
+ NodeFactory* _node_factory;
+ PostProcessor* _post_processor;
+ Shared::World* _world;
+
typedef std::set< SharedPtr<EventSource> > EventSources;
EventSources _event_sources;
- ClientBroadcaster* _broadcaster;
- BufferFactory* _buffer_factory;
- ControlBindings* _control_bindings;
- SharedPtr<Driver> _driver;
- Raul::Maid* _maid;
- MessageContext* _message_context;
- NodeFactory* _node_factory;
- PostProcessor* _post_processor;
- Shared::World* _world;
-
bool _quit_flag;
};
diff --git a/src/engine/JackDriver.hpp b/src/engine/JackDriver.hpp
index 193b838c..7e49fb1f 100644
--- a/src/engine/JackDriver.hpp
+++ b/src/engine/JackDriver.hpp
@@ -120,7 +120,6 @@ public:
jack_client_t* jack_client() const { return _client; }
SampleCount block_length() const { return _block_length; }
SampleCount sample_rate() const { return _sample_rate; }
- bool is_activated() const { return _is_activated; }
inline SampleCount frame_time() const { return _client ? jack_frame_time(_client) : 0; }