diff options
author | David Robillard <d@drobilla.net> | 2006-12-12 12:45:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-12-12 12:45:33 +0000 |
commit | 71f632d459471c2e75ed04b808df9671539a182c (patch) | |
tree | 2fe3c25243e7b915656c02dd46bca5a0d317b599 /src/libs/engine/Engine.h | |
parent | 9e2a757e026abf79d0cdcf12a18796fa89973356 (diff) | |
download | ingen-71f632d459471c2e75ed04b808df9671539a182c.tar.gz ingen-71f632d459471c2e75ed04b808df9671539a182c.tar.bz2 ingen-71f632d459471c2e75ed04b808df9671539a182c.zip |
Connection loading.
Command line parameter for server to allow connecting to specific JACK server.
git-svn-id: http://svn.drobilla.net/lad/ingen@217 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Engine.h')
-rw-r--r-- | src/libs/engine/Engine.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/src/libs/engine/Engine.h b/src/libs/engine/Engine.h index f584ee6d..01aaa3a1 100644 --- a/src/libs/engine/Engine.h +++ b/src/libs/engine/Engine.h @@ -19,6 +19,7 @@ #include <cassert> #include <boost/utility.hpp> +#include <raul/SharedPtr.h> template<typename T> class Queue; class Maid; @@ -41,17 +42,15 @@ template <typename T> class Driver; /** The main class for the Engine. * - * With access to this you can find any object that's a part of the engine. - * Access to this should be limited as possible, it basically exists so - * there's something to pass Event constructors so they can access what - * they need to perform their function. + * This is a (GoF) facade for the engine. Pointers to all components are + * available for more advanced control than this facade allows. * * \ingroup engine */ class Engine : boost::noncopyable { public: - Engine(AudioDriver* audio_driver = 0); + Engine(); ~Engine(); int main(); @@ -61,15 +60,13 @@ public: * Note that it will take some time. */ void quit() { m_quit_flag = true; } - void activate(); + bool activate(SharedPtr<AudioDriver> ad, SharedPtr<EventSource> es); void deactivate(); bool activated() { return m_activated; } - void set_event_source(EventSource* es) { m_event_source = es; } - - EventSource* event_source() const { return m_event_source; } - AudioDriver* audio_driver() const { return m_audio_driver; } + EventSource* event_source() const { return m_event_source.get(); } + AudioDriver* audio_driver() const { return m_audio_driver.get(); } MidiDriver* midi_driver() const { return m_midi_driver; } Maid* maid() const { return m_maid; } PostProcessor* post_processor() const { return m_post_processor; } @@ -82,15 +79,15 @@ public: template<typename T> Driver<T>* driver(); private: - EventSource* m_event_source; - AudioDriver* m_audio_driver; - MidiDriver* m_midi_driver; - Maid* m_maid; - PostProcessor* m_post_processor; - ClientBroadcaster* m_broadcaster; - ObjectStore* m_object_store; - NodeFactory* m_node_factory; - LashDriver* m_lash_driver; + SharedPtr<EventSource> m_event_source; + SharedPtr<AudioDriver> m_audio_driver; + MidiDriver* m_midi_driver; + Maid* m_maid; + PostProcessor* m_post_processor; + ClientBroadcaster* m_broadcaster; + ObjectStore* m_object_store; + NodeFactory* m_node_factory; + LashDriver* m_lash_driver; bool m_quit_flag; bool m_activated; |