From bb1c49dfa484db080938cff6f8f70167c9026a1c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 Jul 2007 19:26:47 +0000 Subject: Consistently rename all C++ files .cpp/.hpp. Fix (some) inclusion guard names to not clash with other libs. git-svn-id: http://svn.drobilla.net/lad/ingen@613 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/events/AddNodeEvent.cpp | 30 +++--- src/libs/engine/events/AddNodeEvent.h | 81 -------------- src/libs/engine/events/AddNodeEvent.hpp | 81 ++++++++++++++ src/libs/engine/events/AddPortEvent.cpp | 38 +++---- src/libs/engine/events/AddPortEvent.h | 66 ------------ src/libs/engine/events/AddPortEvent.hpp | 66 ++++++++++++ src/libs/engine/events/AllNotesOffEvent.cpp | 8 +- src/libs/engine/events/AllNotesOffEvent.h | 51 --------- src/libs/engine/events/AllNotesOffEvent.hpp | 51 +++++++++ src/libs/engine/events/ClearPatchEvent.cpp | 24 ++--- src/libs/engine/events/ClearPatchEvent.h | 55 ---------- src/libs/engine/events/ClearPatchEvent.hpp | 55 ++++++++++ src/libs/engine/events/ConnectionEvent.cpp | 26 ++--- src/libs/engine/events/ConnectionEvent.h | 90 ---------------- src/libs/engine/events/ConnectionEvent.hpp | 90 ++++++++++++++++ src/libs/engine/events/CreatePatchEvent.cpp | 24 ++--- src/libs/engine/events/CreatePatchEvent.h | 66 ------------ src/libs/engine/events/CreatePatchEvent.hpp | 66 ++++++++++++ src/libs/engine/events/DSSIConfigureEvent.cpp | 12 +-- src/libs/engine/events/DSSIConfigureEvent.h | 50 --------- src/libs/engine/events/DSSIConfigureEvent.hpp | 50 +++++++++ src/libs/engine/events/DSSIControlEvent.cpp | 10 +- src/libs/engine/events/DSSIControlEvent.h | 52 --------- src/libs/engine/events/DSSIControlEvent.hpp | 52 +++++++++ src/libs/engine/events/DSSIProgramEvent.cpp | 12 +-- src/libs/engine/events/DSSIProgramEvent.h | 50 --------- src/libs/engine/events/DSSIProgramEvent.hpp | 50 +++++++++ src/libs/engine/events/DSSIUpdateEvent.cpp | 12 +-- src/libs/engine/events/DSSIUpdateEvent.h | 55 ---------- src/libs/engine/events/DSSIUpdateEvent.hpp | 55 ++++++++++ src/libs/engine/events/DeactivateEvent.cpp | 6 +- src/libs/engine/events/DeactivateEvent.h | 43 -------- src/libs/engine/events/DeactivateEvent.hpp | 43 ++++++++ src/libs/engine/events/DestroyEvent.cpp | 36 +++---- src/libs/engine/events/DestroyEvent.h | 79 -------------- src/libs/engine/events/DestroyEvent.hpp | 79 ++++++++++++++ src/libs/engine/events/DisablePatchEvent.cpp | 16 +-- src/libs/engine/events/DisablePatchEvent.h | 53 ---------- src/libs/engine/events/DisablePatchEvent.hpp | 53 ++++++++++ src/libs/engine/events/DisconnectNodeEvent.cpp | 34 +++--- src/libs/engine/events/DisconnectNodeEvent.h | 69 ------------ src/libs/engine/events/DisconnectNodeEvent.hpp | 69 ++++++++++++ src/libs/engine/events/DisconnectPortEvent.cpp | 34 +++--- src/libs/engine/events/DisconnectPortEvent.h | 71 ------------- src/libs/engine/events/DisconnectPortEvent.hpp | 71 +++++++++++++ src/libs/engine/events/DisconnectionEvent.cpp | 24 ++--- src/libs/engine/events/DisconnectionEvent.h | 89 ---------------- src/libs/engine/events/DisconnectionEvent.hpp | 89 ++++++++++++++++ src/libs/engine/events/EnablePatchEvent.cpp | 14 +-- src/libs/engine/events/EnablePatchEvent.h | 57 ---------- src/libs/engine/events/EnablePatchEvent.hpp | 57 ++++++++++ src/libs/engine/events/LoadPluginsEvent.cpp | 12 +-- src/libs/engine/events/LoadPluginsEvent.h | 48 --------- src/libs/engine/events/LoadPluginsEvent.hpp | 48 +++++++++ src/libs/engine/events/Makefile.am | 116 ++++++++++----------- src/libs/engine/events/MidiLearnEvent.cpp | 14 +-- src/libs/engine/events/MidiLearnEvent.h | 85 --------------- src/libs/engine/events/MidiLearnEvent.hpp | 85 +++++++++++++++ src/libs/engine/events/NoteOffEvent.cpp | 14 +-- src/libs/engine/events/NoteOffEvent.h | 53 ---------- src/libs/engine/events/NoteOffEvent.hpp | 53 ++++++++++ src/libs/engine/events/NoteOnEvent.cpp | 16 +-- src/libs/engine/events/NoteOnEvent.h | 55 ---------- src/libs/engine/events/NoteOnEvent.hpp | 55 ++++++++++ src/libs/engine/events/PingQueuedEvent.h | 48 --------- src/libs/engine/events/PingQueuedEvent.hpp | 48 +++++++++ src/libs/engine/events/RegisterClientEvent.cpp | 8 +- src/libs/engine/events/RegisterClientEvent.h | 57 ---------- src/libs/engine/events/RegisterClientEvent.hpp | 57 ++++++++++ src/libs/engine/events/RenameEvent.cpp | 18 ++-- src/libs/engine/events/RenameEvent.h | 68 ------------ src/libs/engine/events/RenameEvent.hpp | 68 ++++++++++++ src/libs/engine/events/RequestAllObjectsEvent.cpp | 12 +-- src/libs/engine/events/RequestAllObjectsEvent.h | 51 --------- src/libs/engine/events/RequestAllObjectsEvent.hpp | 51 +++++++++ src/libs/engine/events/RequestMetadataEvent.cpp | 14 +-- src/libs/engine/events/RequestMetadataEvent.h | 57 ---------- src/libs/engine/events/RequestMetadataEvent.hpp | 57 ++++++++++ src/libs/engine/events/RequestObjectEvent.cpp | 20 ++-- src/libs/engine/events/RequestObjectEvent.h | 56 ---------- src/libs/engine/events/RequestObjectEvent.hpp | 56 ++++++++++ src/libs/engine/events/RequestPluginEvent.cpp | 18 ++-- src/libs/engine/events/RequestPluginEvent.h | 56 ---------- src/libs/engine/events/RequestPluginEvent.hpp | 56 ++++++++++ src/libs/engine/events/RequestPluginsEvent.cpp | 10 +- src/libs/engine/events/RequestPluginsEvent.h | 55 ---------- src/libs/engine/events/RequestPluginsEvent.hpp | 55 ++++++++++ src/libs/engine/events/RequestPortValueEvent.cpp | 16 +-- src/libs/engine/events/RequestPortValueEvent.h | 57 ---------- src/libs/engine/events/RequestPortValueEvent.hpp | 57 ++++++++++ src/libs/engine/events/SetMetadataEvent.cpp | 12 +-- src/libs/engine/events/SetMetadataEvent.h | 55 ---------- src/libs/engine/events/SetMetadataEvent.hpp | 55 ++++++++++ src/libs/engine/events/SetPortValueEvent.cpp | 16 +-- src/libs/engine/events/SetPortValueEvent.h | 57 ---------- src/libs/engine/events/SetPortValueEvent.hpp | 57 ++++++++++ src/libs/engine/events/SetPortValueQueuedEvent.cpp | 18 ++-- src/libs/engine/events/SetPortValueQueuedEvent.h | 58 ----------- src/libs/engine/events/SetPortValueQueuedEvent.hpp | 58 +++++++++++ src/libs/engine/events/UnregisterClientEvent.cpp | 10 +- src/libs/engine/events/UnregisterClientEvent.h | 57 ---------- src/libs/engine/events/UnregisterClientEvent.hpp | 57 ++++++++++ 102 files changed, 2402 insertions(+), 2402 deletions(-) delete mode 100644 src/libs/engine/events/AddNodeEvent.h create mode 100644 src/libs/engine/events/AddNodeEvent.hpp delete mode 100644 src/libs/engine/events/AddPortEvent.h create mode 100644 src/libs/engine/events/AddPortEvent.hpp delete mode 100644 src/libs/engine/events/AllNotesOffEvent.h create mode 100644 src/libs/engine/events/AllNotesOffEvent.hpp delete mode 100644 src/libs/engine/events/ClearPatchEvent.h create mode 100644 src/libs/engine/events/ClearPatchEvent.hpp delete mode 100644 src/libs/engine/events/ConnectionEvent.h create mode 100644 src/libs/engine/events/ConnectionEvent.hpp delete mode 100644 src/libs/engine/events/CreatePatchEvent.h create mode 100644 src/libs/engine/events/CreatePatchEvent.hpp delete mode 100644 src/libs/engine/events/DSSIConfigureEvent.h create mode 100644 src/libs/engine/events/DSSIConfigureEvent.hpp delete mode 100644 src/libs/engine/events/DSSIControlEvent.h create mode 100644 src/libs/engine/events/DSSIControlEvent.hpp delete mode 100644 src/libs/engine/events/DSSIProgramEvent.h create mode 100644 src/libs/engine/events/DSSIProgramEvent.hpp delete mode 100644 src/libs/engine/events/DSSIUpdateEvent.h create mode 100644 src/libs/engine/events/DSSIUpdateEvent.hpp delete mode 100644 src/libs/engine/events/DeactivateEvent.h create mode 100644 src/libs/engine/events/DeactivateEvent.hpp delete mode 100644 src/libs/engine/events/DestroyEvent.h create mode 100644 src/libs/engine/events/DestroyEvent.hpp delete mode 100644 src/libs/engine/events/DisablePatchEvent.h create mode 100644 src/libs/engine/events/DisablePatchEvent.hpp delete mode 100644 src/libs/engine/events/DisconnectNodeEvent.h create mode 100644 src/libs/engine/events/DisconnectNodeEvent.hpp delete mode 100644 src/libs/engine/events/DisconnectPortEvent.h create mode 100644 src/libs/engine/events/DisconnectPortEvent.hpp delete mode 100644 src/libs/engine/events/DisconnectionEvent.h create mode 100644 src/libs/engine/events/DisconnectionEvent.hpp delete mode 100644 src/libs/engine/events/EnablePatchEvent.h create mode 100644 src/libs/engine/events/EnablePatchEvent.hpp delete mode 100644 src/libs/engine/events/LoadPluginsEvent.h create mode 100644 src/libs/engine/events/LoadPluginsEvent.hpp delete mode 100644 src/libs/engine/events/MidiLearnEvent.h create mode 100644 src/libs/engine/events/MidiLearnEvent.hpp delete mode 100644 src/libs/engine/events/NoteOffEvent.h create mode 100644 src/libs/engine/events/NoteOffEvent.hpp delete mode 100644 src/libs/engine/events/NoteOnEvent.h create mode 100644 src/libs/engine/events/NoteOnEvent.hpp delete mode 100644 src/libs/engine/events/PingQueuedEvent.h create mode 100644 src/libs/engine/events/PingQueuedEvent.hpp delete mode 100644 src/libs/engine/events/RegisterClientEvent.h create mode 100644 src/libs/engine/events/RegisterClientEvent.hpp delete mode 100644 src/libs/engine/events/RenameEvent.h create mode 100644 src/libs/engine/events/RenameEvent.hpp delete mode 100644 src/libs/engine/events/RequestAllObjectsEvent.h create mode 100644 src/libs/engine/events/RequestAllObjectsEvent.hpp delete mode 100644 src/libs/engine/events/RequestMetadataEvent.h create mode 100644 src/libs/engine/events/RequestMetadataEvent.hpp delete mode 100644 src/libs/engine/events/RequestObjectEvent.h create mode 100644 src/libs/engine/events/RequestObjectEvent.hpp delete mode 100644 src/libs/engine/events/RequestPluginEvent.h create mode 100644 src/libs/engine/events/RequestPluginEvent.hpp delete mode 100644 src/libs/engine/events/RequestPluginsEvent.h create mode 100644 src/libs/engine/events/RequestPluginsEvent.hpp delete mode 100644 src/libs/engine/events/RequestPortValueEvent.h create mode 100644 src/libs/engine/events/RequestPortValueEvent.hpp delete mode 100644 src/libs/engine/events/SetMetadataEvent.h create mode 100644 src/libs/engine/events/SetMetadataEvent.hpp delete mode 100644 src/libs/engine/events/SetPortValueEvent.h create mode 100644 src/libs/engine/events/SetPortValueEvent.hpp delete mode 100644 src/libs/engine/events/SetPortValueQueuedEvent.h create mode 100644 src/libs/engine/events/SetPortValueQueuedEvent.hpp delete mode 100644 src/libs/engine/events/UnregisterClientEvent.h create mode 100644 src/libs/engine/events/UnregisterClientEvent.hpp (limited to 'src/libs/engine/events') diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp index 1ea2b596..fd95e838 100644 --- a/src/libs/engine/events/AddNodeEvent.cpp +++ b/src/libs/engine/events/AddNodeEvent.cpp @@ -15,21 +15,21 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "AddNodeEvent.h" -#include "interface/Responder.h" -#include "Patch.h" -#include "Node.h" -#include "Tree.h" -#include "Plugin.h" -#include "Engine.h" -#include "Patch.h" -#include "NodeFactory.h" -#include "ClientBroadcaster.h" -#include -#include -#include "ObjectStore.h" -#include -#include "Port.h" +#include "AddNodeEvent.hpp" +#include "interface/Responder.hpp" +#include "Patch.hpp" +#include "Node.hpp" +#include "Tree.hpp" +#include "Plugin.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "NodeFactory.hpp" +#include "ClientBroadcaster.hpp" +#include +#include +#include "ObjectStore.hpp" +#include +#include "Port.hpp" namespace Ingen { diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h deleted file mode 100644 index 68d518ae..00000000 --- a/src/libs/engine/events/AddNodeEvent.h +++ /dev/null @@ -1,81 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef ADDNODEEVENT_H -#define ADDNODEEVENT_H - -#include "QueuedEvent.h" -#include -#include -using std::string; - -namespace Raul { template class Array; } -template class TreeNode; - -namespace Ingen { - -class Patch; -class Node; -class Plugin; - - -/** An event to load a Node and insert it into a Patch. - * - * \ingroup engine - */ -class AddNodeEvent : public QueuedEvent -{ -public: - AddNodeEvent(Engine& engine, - SharedPtr responder, - SampleCount timestamp, - const string& node_path, - const string& plugin_uri, - bool poly); - - // DEPRECATED - AddNodeEvent(Engine& engine, - SharedPtr responder, - SampleCount timestamp, - const string& node_path, - const string& plugin_type, - const string& lib_name, - const string& plugin_label, - bool poly); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _patch_name; - Path _path; - string _plugin_uri; ///< If nonempty then type, library, label, are ignored - string _plugin_type; - string _plugin_lib; - string _plugin_label; - bool _poly; - Patch* _patch; - Node* _node; - Raul::Array* _process_order; ///< Patch's new process order - bool _node_already_exists; -}; - - -} // namespace Ingen - -#endif // ADDNODEEVENT_H diff --git a/src/libs/engine/events/AddNodeEvent.hpp b/src/libs/engine/events/AddNodeEvent.hpp new file mode 100644 index 00000000..0a64c93a --- /dev/null +++ b/src/libs/engine/events/AddNodeEvent.hpp @@ -0,0 +1,81 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef ADDNODEEVENT_H +#define ADDNODEEVENT_H + +#include "QueuedEvent.hpp" +#include +#include +using std::string; + +namespace Raul { template class Array; } +template class TreeNode; + +namespace Ingen { + +class Patch; +class Node; +class Plugin; + + +/** An event to load a Node and insert it into a Patch. + * + * \ingroup engine + */ +class AddNodeEvent : public QueuedEvent +{ +public: + AddNodeEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + const string& node_path, + const string& plugin_uri, + bool poly); + + // DEPRECATED + AddNodeEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + const string& node_path, + const string& plugin_type, + const string& lib_name, + const string& plugin_label, + bool poly); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _patch_name; + Path _path; + string _plugin_uri; ///< If nonempty then type, library, label, are ignored + string _plugin_type; + string _plugin_lib; + string _plugin_label; + bool _poly; + Patch* _patch; + Node* _node; + Raul::Array* _process_order; ///< Patch's new process order + bool _node_already_exists; +}; + + +} // namespace Ingen + +#endif // ADDNODEEVENT_H diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp index c2ec9326..c4e7a26c 100644 --- a/src/libs/engine/events/AddPortEvent.cpp +++ b/src/libs/engine/events/AddPortEvent.cpp @@ -15,25 +15,25 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include -#include -#include "interface/Responder.h" -#include "AddPortEvent.h" -#include "Patch.h" -#include "Tree.h" -#include "Plugin.h" -#include "Engine.h" -#include "Patch.h" -#include "QueuedEventSource.h" -#include "ObjectStore.h" -#include "ClientBroadcaster.h" -#include "Port.h" -#include "AudioDriver.h" -#include "MidiDriver.h" -#include "OSCDriver.h" -#include "DuplexPort.h" +#include +#include +#include +#include +#include "interface/Responder.hpp" +#include "AddPortEvent.hpp" +#include "Patch.hpp" +#include "Tree.hpp" +#include "Plugin.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "QueuedEventSource.hpp" +#include "ObjectStore.hpp" +#include "ClientBroadcaster.hpp" +#include "Port.hpp" +#include "AudioDriver.hpp" +#include "MidiDriver.hpp" +#include "OSCDriver.hpp" +#include "DuplexPort.hpp" namespace Ingen { diff --git a/src/libs/engine/events/AddPortEvent.h b/src/libs/engine/events/AddPortEvent.h deleted file mode 100644 index ed382286..00000000 --- a/src/libs/engine/events/AddPortEvent.h +++ /dev/null @@ -1,66 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef ADDPORTEVENT_H -#define ADDPORTEVENT_H - -#include "QueuedEvent.h" -#include -#include -#include "DataType.h" -#include -using std::string; - -template class Array; - -namespace Ingen { - -class Patch; -class Port; -class Plugin; -class DriverPort; - - -/** An event to add a Port to a Patch. - * - * \ingroup engine - */ -class AddPortEvent : public QueuedEvent -{ -public: - AddPortEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Path _path; - string _type; - bool _is_output; - DataType _data_type; - Patch* _patch; - Port* _patch_port; - Raul::Array* _ports_array; ///< New (external) ports array for Patch - DriverPort* _driver_port; ///< Driver (eg Jack) port if this is a toplevel port - bool _succeeded; -}; - - -} // namespace Ingen - -#endif // ADDPORTEVENT_H diff --git a/src/libs/engine/events/AddPortEvent.hpp b/src/libs/engine/events/AddPortEvent.hpp new file mode 100644 index 00000000..803e0910 --- /dev/null +++ b/src/libs/engine/events/AddPortEvent.hpp @@ -0,0 +1,66 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef ADDPORTEVENT_H +#define ADDPORTEVENT_H + +#include "QueuedEvent.hpp" +#include +#include +#include "DataType.hpp" +#include +using std::string; + +template class Array; + +namespace Ingen { + +class Patch; +class Port; +class Plugin; +class DriverPort; + + +/** An event to add a Port to a Patch. + * + * \ingroup engine + */ +class AddPortEvent : public QueuedEvent +{ +public: + AddPortEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Path _path; + string _type; + bool _is_output; + DataType _data_type; + Patch* _patch; + Port* _patch_port; + Raul::Array* _ports_array; ///< New (external) ports array for Patch + DriverPort* _driver_port; ///< Driver (eg Jack) port if this is a toplevel port + bool _succeeded; +}; + + +} // namespace Ingen + +#endif // ADDPORTEVENT_H diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp index 1b7a40e1..6be698c6 100644 --- a/src/libs/engine/events/AllNotesOffEvent.cpp +++ b/src/libs/engine/events/AllNotesOffEvent.cpp @@ -15,10 +15,10 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "AllNotesOffEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectStore.h" +#include "AllNotesOffEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h deleted file mode 100644 index 299e9760..00000000 --- a/src/libs/engine/events/AllNotesOffEvent.h +++ /dev/null @@ -1,51 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef ALLNOTESOFFEVENT_H -#define ALLNOTESOFFEVENT_H - -#include "Event.h" -#include -using std::string; - -namespace Ingen { - -class Patch; - - -/** A note off event for all active voices. - * - * \ingroup engine - */ -class AllNotesOffEvent : public Event -{ -public: - AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Patch* patch); - AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); - - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Patch* _patch; - string _patch_path; -}; - - -} // namespace Ingen - -#endif // ALLNOTESOFFEVENT_H diff --git a/src/libs/engine/events/AllNotesOffEvent.hpp b/src/libs/engine/events/AllNotesOffEvent.hpp new file mode 100644 index 00000000..5e29f780 --- /dev/null +++ b/src/libs/engine/events/AllNotesOffEvent.hpp @@ -0,0 +1,51 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef ALLNOTESOFFEVENT_H +#define ALLNOTESOFFEVENT_H + +#include "Event.hpp" +#include +using std::string; + +namespace Ingen { + +class Patch; + + +/** A note off event for all active voices. + * + * \ingroup engine + */ +class AllNotesOffEvent : public Event +{ +public: + AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Patch* patch); + AllNotesOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); + + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Patch* _patch; + string _patch_path; +}; + + +} // namespace Ingen + +#endif // ALLNOTESOFFEVENT_H diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index 44a23267..8ac8c23d 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -15,18 +15,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ClearPatchEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "util.h" -#include "ObjectStore.h" -#include "Port.h" -#include -#include "Node.h" -#include "Connection.h" -#include "QueuedEventSource.h" +#include "ClearPatchEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "util.hpp" +#include "ObjectStore.hpp" +#include "Port.hpp" +#include +#include "Node.hpp" +#include "Connection.hpp" +#include "QueuedEventSource.hpp" namespace Ingen { diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h deleted file mode 100644 index 21b227ca..00000000 --- a/src/libs/engine/events/ClearPatchEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef CLEARPATCHEVENT_H -#define CLEARPATCHEVENT_H - -#include -#include -#include "QueuedEvent.h" - -using std::string; - -namespace Ingen { - -class Patch; - - -/** Delete all nodes from a patch. - * - * \ingroup engine - */ -class ClearPatchEvent : public QueuedEvent -{ -public: - ClearPatchEvent(Engine& engine, SharedPtr responder, FrameTime time, QueuedEventSource* source, const string& patch_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _patch_path; - Patch* _patch; - bool _process; -}; - - -} // namespace Ingen - - -#endif // CLEARPATCHEVENT_H diff --git a/src/libs/engine/events/ClearPatchEvent.hpp b/src/libs/engine/events/ClearPatchEvent.hpp new file mode 100644 index 00000000..4d631f07 --- /dev/null +++ b/src/libs/engine/events/ClearPatchEvent.hpp @@ -0,0 +1,55 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef CLEARPATCHEVENT_H +#define CLEARPATCHEVENT_H + +#include +#include +#include "QueuedEvent.hpp" + +using std::string; + +namespace Ingen { + +class Patch; + + +/** Delete all nodes from a patch. + * + * \ingroup engine + */ +class ClearPatchEvent : public QueuedEvent +{ +public: + ClearPatchEvent(Engine& engine, SharedPtr responder, FrameTime time, QueuedEventSource* source, const string& patch_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _patch_path; + Patch* _patch; + bool _process; +}; + + +} // namespace Ingen + + +#endif // CLEARPATCHEVENT_H diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index 8952e281..c1fd3180 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -15,20 +15,20 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "ConnectionEvent.h" +#include "ConnectionEvent.hpp" #include -#include -#include -#include "interface/Responder.h" -#include "types.h" -#include "Engine.h" -#include "Connection.h" -#include "InputPort.h" -#include "OutputPort.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "Port.h" -#include "ObjectStore.h" +#include +#include +#include "interface/Responder.hpp" +#include "types.hpp" +#include "Engine.hpp" +#include "Connection.hpp" +#include "InputPort.hpp" +#include "OutputPort.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "Port.hpp" +#include "ObjectStore.hpp" using std::string; namespace Ingen { diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h deleted file mode 100644 index d294657b..00000000 --- a/src/libs/engine/events/ConnectionEvent.h +++ /dev/null @@ -1,90 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef CONNECTIONEVENT_H -#define CONNECTIONEVENT_H - -#include -#include "QueuedEvent.h" -#include -#include "types.h" -using std::string; - -namespace Raul { - template class ListNode; - template class Array; -} - -namespace Ingen { - -class Patch; -class Node; -class Connection; -class MidiMessage; -class Port; -class Connection; -class InputPort; -class OutputPort; - - -/** Make a Connection between two Ports. - * - * \ingroup engine - */ -class ConnectionEvent : public QueuedEvent -{ -public: - ConnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - - enum ErrorType { - NO_ERROR, - PARENT_PATCH_DIFFERENT, - PORT_NOT_FOUND, - TYPE_MISMATCH, - DIRECTION_MISMATCH, - ALREADY_CONNECTED, - PARENTS_NOT_FOUND - }; - - Raul::Path _src_port_path; - Raul::Path _dst_port_path; - - Patch* _patch; - Port* _src_port; - Port* _dst_port; - OutputPort* _src_output_port; - InputPort* _dst_input_port; - - Raul::Array* _process_order; ///< New process order for Patch - - Connection* _connection; - Raul::ListNode* _patch_listnode; - Raul::ListNode* _port_listnode; - - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // CONNECTIONEVENT_H diff --git a/src/libs/engine/events/ConnectionEvent.hpp b/src/libs/engine/events/ConnectionEvent.hpp new file mode 100644 index 00000000..f2903b94 --- /dev/null +++ b/src/libs/engine/events/ConnectionEvent.hpp @@ -0,0 +1,90 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef CONNECTIONEVENT_H +#define CONNECTIONEVENT_H + +#include +#include "QueuedEvent.hpp" +#include +#include "types.hpp" +using std::string; + +namespace Raul { + template class ListNode; + template class Array; +} + +namespace Ingen { + +class Patch; +class Node; +class Connection; +class MidiMessage; +class Port; +class Connection; +class InputPort; +class OutputPort; + + +/** Make a Connection between two Ports. + * + * \ingroup engine + */ +class ConnectionEvent : public QueuedEvent +{ +public: + ConnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + + enum ErrorType { + NO_ERROR, + PARENT_PATCH_DIFFERENT, + PORT_NOT_FOUND, + TYPE_MISMATCH, + DIRECTION_MISMATCH, + ALREADY_CONNECTED, + PARENTS_NOT_FOUND + }; + + Raul::Path _src_port_path; + Raul::Path _dst_port_path; + + Patch* _patch; + Port* _src_port; + Port* _dst_port; + OutputPort* _src_output_port; + InputPort* _dst_input_port; + + Raul::Array* _process_order; ///< New process order for Patch + + Connection* _connection; + Raul::ListNode* _patch_listnode; + Raul::ListNode* _port_listnode; + + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // CONNECTIONEVENT_H diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp index f42b895e..866420d7 100644 --- a/src/libs/engine/events/CreatePatchEvent.cpp +++ b/src/libs/engine/events/CreatePatchEvent.cpp @@ -15,18 +15,18 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "CreatePatchEvent.h" -#include "interface/Responder.h" -#include "Patch.h" -#include "Node.h" -#include "Tree.h" -#include "Plugin.h" -#include "Engine.h" -#include -#include "ClientBroadcaster.h" -#include "AudioDriver.h" -#include -#include "ObjectStore.h" +#include "CreatePatchEvent.hpp" +#include "interface/Responder.hpp" +#include "Patch.hpp" +#include "Node.hpp" +#include "Tree.hpp" +#include "Plugin.hpp" +#include "Engine.hpp" +#include +#include "ClientBroadcaster.hpp" +#include "AudioDriver.hpp" +#include +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h deleted file mode 100644 index c63fd566..00000000 --- a/src/libs/engine/events/CreatePatchEvent.h +++ /dev/null @@ -1,66 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef CREATEPATCHEVENT_H -#define CREATEPATCHEVENT_H - -#include -#include -#include "QueuedEvent.h" - -using std::string; - -namespace Raul { template class Array; } -template class TreeNode; - -namespace Ingen { - -class Patch; -class Node; -class Plugin; - - -/** Creates a new Patch. - * - * \ingroup engine - */ -class CreatePatchEvent : public QueuedEvent -{ -public: - CreatePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, int poly); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - enum ErrorType { NO_ERROR, OBJECT_EXISTS, PARENT_NOT_FOUND, INVALID_POLY }; - - Path _path; - Patch* _patch; - Patch* _parent; - Raul::Array* _process_order; - TreeNode* _patch_treenode; - int _poly; - ErrorType _error; -}; - - -} // namespace Ingen - - -#endif // CREATEPATCHEVENT_H diff --git a/src/libs/engine/events/CreatePatchEvent.hpp b/src/libs/engine/events/CreatePatchEvent.hpp new file mode 100644 index 00000000..977abbaa --- /dev/null +++ b/src/libs/engine/events/CreatePatchEvent.hpp @@ -0,0 +1,66 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef CREATEPATCHEVENT_H +#define CREATEPATCHEVENT_H + +#include +#include +#include "QueuedEvent.hpp" + +using std::string; + +namespace Raul { template class Array; } +template class TreeNode; + +namespace Ingen { + +class Patch; +class Node; +class Plugin; + + +/** Creates a new Patch. + * + * \ingroup engine + */ +class CreatePatchEvent : public QueuedEvent +{ +public: + CreatePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, int poly); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + enum ErrorType { NO_ERROR, OBJECT_EXISTS, PARENT_NOT_FOUND, INVALID_POLY }; + + Path _path; + Patch* _patch; + Patch* _parent; + Raul::Array* _process_order; + TreeNode* _patch_treenode; + int _poly; + ErrorType _error; +}; + + +} // namespace Ingen + + +#endif // CREATEPATCHEVENT_H diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp index 4f388558..9a0142c8 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.cpp +++ b/src/libs/engine/events/DSSIConfigureEvent.cpp @@ -15,12 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DSSIConfigureEvent.h" -#include "Engine.h" -#include "Node.h" -#include "ClientBroadcaster.h" -#include "Plugin.h" -#include "ObjectStore.h" +#include "DSSIConfigureEvent.hpp" +#include "Engine.hpp" +#include "Node.hpp" +#include "ClientBroadcaster.hpp" +#include "Plugin.hpp" +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h deleted file mode 100644 index 944f6239..00000000 --- a/src/libs/engine/events/DSSIConfigureEvent.h +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DSSICONFIGUREEVENT_H -#define DSSICONFIGUREEVENT_H - -#include "QueuedEvent.h" -#include "DSSINode.h" - -namespace Ingen { - - -/** Change of a 'configure' key/value pair for a DSSI plugin. - * - * \ingroup engine - */ -class DSSIConfigureEvent : public QueuedEvent -{ -public: - DSSIConfigureEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, const string& key, const string& val); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _node_path; - string _key; - string _val; - DSSINode* _node; -}; - - -} // namespace Ingen - -#endif // DSSICONFIGUREEVENT_H diff --git a/src/libs/engine/events/DSSIConfigureEvent.hpp b/src/libs/engine/events/DSSIConfigureEvent.hpp new file mode 100644 index 00000000..ef37c5cd --- /dev/null +++ b/src/libs/engine/events/DSSIConfigureEvent.hpp @@ -0,0 +1,50 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DSSICONFIGUREEVENT_H +#define DSSICONFIGUREEVENT_H + +#include "QueuedEvent.hpp" +#include "DSSINode.hpp" + +namespace Ingen { + + +/** Change of a 'configure' key/value pair for a DSSI plugin. + * + * \ingroup engine + */ +class DSSIConfigureEvent : public QueuedEvent +{ +public: + DSSIConfigureEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, const string& key, const string& val); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _node_path; + string _key; + string _val; + DSSINode* _node; +}; + + +} // namespace Ingen + +#endif // DSSICONFIGUREEVENT_H diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp index 94f504a7..eef5054b 100644 --- a/src/libs/engine/events/DSSIControlEvent.cpp +++ b/src/libs/engine/events/DSSIControlEvent.cpp @@ -15,11 +15,11 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DSSIControlEvent.h" -#include "Engine.h" -#include "Node.h" -#include "Plugin.h" -#include "ObjectStore.h" +#include "DSSIControlEvent.hpp" +#include "Engine.hpp" +#include "Node.hpp" +#include "Plugin.hpp" +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h deleted file mode 100644 index e6800bb2..00000000 --- a/src/libs/engine/events/DSSIControlEvent.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DSSICONTROLEVENT_H -#define DSSICONTROLEVENT_H - -#include "QueuedEvent.h" -#include "DSSINode.h" - -namespace Ingen { - - -/** A control change event for a DSSI plugin. - * - * This does essentially the same thing as a SetPortValueEvent. - * - * \ingroup engine - */ -class DSSIControlEvent : public QueuedEvent -{ -public: - DSSIControlEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, int port_num, Sample val); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _node_path; - int _port_num; - float _val; - DSSINode* _node; -}; - - -} // namespace Ingen - -#endif // DSSICONTROLEVENT_H diff --git a/src/libs/engine/events/DSSIControlEvent.hpp b/src/libs/engine/events/DSSIControlEvent.hpp new file mode 100644 index 00000000..ab48607a --- /dev/null +++ b/src/libs/engine/events/DSSIControlEvent.hpp @@ -0,0 +1,52 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DSSICONTROLEVENT_H +#define DSSICONTROLEVENT_H + +#include "QueuedEvent.hpp" +#include "DSSINode.hpp" + +namespace Ingen { + + +/** A control change event for a DSSI plugin. + * + * This does essentially the same thing as a SetPortValueEvent. + * + * \ingroup engine + */ +class DSSIControlEvent : public QueuedEvent +{ +public: + DSSIControlEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, int port_num, Sample val); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _node_path; + int _port_num; + float _val; + DSSINode* _node; +}; + + +} // namespace Ingen + +#endif // DSSICONTROLEVENT_H diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp index 436ab2c6..66ad9c1f 100644 --- a/src/libs/engine/events/DSSIProgramEvent.cpp +++ b/src/libs/engine/events/DSSIProgramEvent.cpp @@ -15,14 +15,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DSSIProgramEvent.h" +#include "DSSIProgramEvent.hpp" #include #include -#include "Engine.h" -#include "Node.h" -#include "ClientBroadcaster.h" -#include "Plugin.h" -#include "ObjectStore.h" +#include "Engine.hpp" +#include "Node.hpp" +#include "ClientBroadcaster.hpp" +#include "Plugin.hpp" +#include "ObjectStore.hpp" using std::cout; using std::cerr; using std::endl; diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h deleted file mode 100644 index 8acdea81..00000000 --- a/src/libs/engine/events/DSSIProgramEvent.h +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DSSIPROGRAMEVENT_H -#define DSSIPROGRAMEVENT_H - -#include "QueuedEvent.h" -#include "DSSINode.h" - -namespace Ingen { - - -/** A program change for a DSSI plugin. - * - * \ingroup engine - */ -class DSSIProgramEvent : public QueuedEvent -{ -public: - DSSIProgramEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, int bank, int program); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _node_path; - int _bank; - int _program; - DSSINode* _node; -}; - - -} // namespace Ingen - -#endif // DSSIPROGRAMEVENT_H diff --git a/src/libs/engine/events/DSSIProgramEvent.hpp b/src/libs/engine/events/DSSIProgramEvent.hpp new file mode 100644 index 00000000..2f853961 --- /dev/null +++ b/src/libs/engine/events/DSSIProgramEvent.hpp @@ -0,0 +1,50 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DSSIPROGRAMEVENT_H +#define DSSIPROGRAMEVENT_H + +#include "QueuedEvent.hpp" +#include "DSSINode.hpp" + +namespace Ingen { + + +/** A program change for a DSSI plugin. + * + * \ingroup engine + */ +class DSSIProgramEvent : public QueuedEvent +{ +public: + DSSIProgramEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, int bank, int program); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _node_path; + int _bank; + int _program; + DSSINode* _node; +}; + + +} // namespace Ingen + +#endif // DSSIPROGRAMEVENT_H diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp index 5851e065..055be90c 100644 --- a/src/libs/engine/events/DSSIUpdateEvent.cpp +++ b/src/libs/engine/events/DSSIUpdateEvent.cpp @@ -15,13 +15,13 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DSSIUpdateEvent.h" +#include "DSSIUpdateEvent.hpp" #include -#include "Node.h" -#include "ObjectStore.h" -#include "Engine.h" -#include "DSSINode.h" -#include "Plugin.h" +#include "Node.hpp" +#include "ObjectStore.hpp" +#include "Engine.hpp" +#include "DSSINode.hpp" +#include "Plugin.hpp" using std::cerr; using std::endl; diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h deleted file mode 100644 index 8274bb71..00000000 --- a/src/libs/engine/events/DSSIUpdateEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DSSIUPDATEEVENT_H -#define DSSIUPDATEEVENT_H - -#include "QueuedEvent.h" -#include - -using std::string; - -namespace Ingen { - -class DSSINode; - - -/** A DSSI "update" responder for a DSSI plugin/node. - * - * This sends all information about the plugin to the UI (over OSC). - * - * \ingroup engine - */ -class DSSIUpdateEvent : public QueuedEvent -{ -public: - DSSIUpdateEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& url); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _path; - string _url; - DSSINode* _node; -}; - - -} // namespace Ingen - -#endif // DSSIUPDATEEVENT_H diff --git a/src/libs/engine/events/DSSIUpdateEvent.hpp b/src/libs/engine/events/DSSIUpdateEvent.hpp new file mode 100644 index 00000000..699df4c2 --- /dev/null +++ b/src/libs/engine/events/DSSIUpdateEvent.hpp @@ -0,0 +1,55 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DSSIUPDATEEVENT_H +#define DSSIUPDATEEVENT_H + +#include "QueuedEvent.hpp" +#include + +using std::string; + +namespace Ingen { + +class DSSINode; + + +/** A DSSI "update" responder for a DSSI plugin/node. + * + * This sends all information about the plugin to the UI (over OSC). + * + * \ingroup engine + */ +class DSSIUpdateEvent : public QueuedEvent +{ +public: + DSSIUpdateEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& url); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _path; + string _url; + DSSINode* _node; +}; + + +} // namespace Ingen + +#endif // DSSIUPDATEEVENT_H diff --git a/src/libs/engine/events/DeactivateEvent.cpp b/src/libs/engine/events/DeactivateEvent.cpp index e6440570..311cf287 100644 --- a/src/libs/engine/events/DeactivateEvent.cpp +++ b/src/libs/engine/events/DeactivateEvent.cpp @@ -15,9 +15,9 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DeactivateEvent.h" -#include "interface/Responder.h" -#include "Engine.h" +#include "DeactivateEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" namespace Ingen { diff --git a/src/libs/engine/events/DeactivateEvent.h b/src/libs/engine/events/DeactivateEvent.h deleted file mode 100644 index 92276918..00000000 --- a/src/libs/engine/events/DeactivateEvent.h +++ /dev/null @@ -1,43 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DEACTIVATEEVENT_H -#define DEACTIVATEEVENT_H - -#include "QueuedEvent.h" - -namespace Ingen { - - -/** Deactivates the engine. - * - * \ingroup engine - */ -class DeactivateEvent : public QueuedEvent -{ -public: - DeactivateEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); -}; - - -} // namespace Ingen - -#endif // DEACTIVATEEVENT_H diff --git a/src/libs/engine/events/DeactivateEvent.hpp b/src/libs/engine/events/DeactivateEvent.hpp new file mode 100644 index 00000000..1f87e271 --- /dev/null +++ b/src/libs/engine/events/DeactivateEvent.hpp @@ -0,0 +1,43 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DEACTIVATEEVENT_H +#define DEACTIVATEEVENT_H + +#include "QueuedEvent.hpp" + +namespace Ingen { + + +/** Deactivates the engine. + * + * \ingroup engine + */ +class DeactivateEvent : public QueuedEvent +{ +public: + DeactivateEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); +}; + + +} // namespace Ingen + +#endif // DEACTIVATEEVENT_H diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index ecccaa8a..dde2e86b 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -15,24 +15,24 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DestroyEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Patch.h" -#include "Tree.h" -#include "Node.h" -#include "Plugin.h" -#include "AudioDriver.h" -#include "MidiDriver.h" -#include "InternalNode.h" -#include "DisconnectNodeEvent.h" -#include "DisconnectPortEvent.h" -#include "ClientBroadcaster.h" -#include -#include "ObjectStore.h" -#include -#include "QueuedEventSource.h" -#include "Port.h" +#include "DestroyEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "Tree.hpp" +#include "Node.hpp" +#include "Plugin.hpp" +#include "AudioDriver.hpp" +#include "MidiDriver.hpp" +#include "InternalNode.hpp" +#include "DisconnectNodeEvent.hpp" +#include "DisconnectPortEvent.hpp" +#include "ClientBroadcaster.hpp" +#include +#include "ObjectStore.hpp" +#include +#include "QueuedEventSource.hpp" +#include "Port.hpp" namespace Ingen { diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h deleted file mode 100644 index 421a2dcd..00000000 --- a/src/libs/engine/events/DestroyEvent.h +++ /dev/null @@ -1,79 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DESTROYEVENT_H -#define DESTROYEVENT_H - -#include -#include -#include "QueuedEvent.h" - - -using std::string; - -namespace Raul { - template class Array; - template class ListNode; -} -template class TreeNode; - -namespace Ingen { - -class GraphObject; -class Patch; -class Node; -class Port; -class DriverPort; -class Plugin; -class DisconnectNodeEvent; -class DisconnectPortEvent; - - -/** An event to remove and delete a Node. - * - * \ingroup engine - */ -class DestroyEvent : public QueuedEvent -{ -public: - DestroyEvent(Engine& engine, SharedPtr responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true); - DestroyEvent(Engine& engine, SharedPtr responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true); - ~DestroyEvent(); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Path _path; - GraphObject* _object; - Node* _node; ///< Same as _object if it is a Node, otherwise NULL - Port* _port; ///< Same as _object if it is a Port, otherwise NULL - DriverPort* _driver_port; - Raul::ListNode* _patch_node_listnode; - Raul::ListNode* _patch_port_listnode; - TreeNode* _store_treenode; - Raul::Array* _ports_array; ///< New (external) ports array for Patch - Raul::Array* _process_order; ///< Patch's new process order - DisconnectNodeEvent* _disconnect_node_event; - DisconnectPortEvent* _disconnect_port_event; -}; - - -} // namespace Ingen - -#endif // DESTROYEVENT_H diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp new file mode 100644 index 00000000..6495258e --- /dev/null +++ b/src/libs/engine/events/DestroyEvent.hpp @@ -0,0 +1,79 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DESTROYEVENT_H +#define DESTROYEVENT_H + +#include +#include +#include "QueuedEvent.hpp" + + +using std::string; + +namespace Raul { + template class Array; + template class ListNode; +} +template class TreeNode; + +namespace Ingen { + +class GraphObject; +class Patch; +class Node; +class Port; +class DriverPort; +class Plugin; +class DisconnectNodeEvent; +class DisconnectPortEvent; + + +/** An event to remove and delete a Node. + * + * \ingroup engine + */ +class DestroyEvent : public QueuedEvent +{ +public: + DestroyEvent(Engine& engine, SharedPtr responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true); + DestroyEvent(Engine& engine, SharedPtr responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true); + ~DestroyEvent(); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Path _path; + GraphObject* _object; + Node* _node; ///< Same as _object if it is a Node, otherwise NULL + Port* _port; ///< Same as _object if it is a Port, otherwise NULL + DriverPort* _driver_port; + Raul::ListNode* _patch_node_listnode; + Raul::ListNode* _patch_port_listnode; + TreeNode* _store_treenode; + Raul::Array* _ports_array; ///< New (external) ports array for Patch + Raul::Array* _process_order; ///< Patch's new process order + DisconnectNodeEvent* _disconnect_node_event; + DisconnectPortEvent* _disconnect_port_event; +}; + + +} // namespace Ingen + +#endif // DESTROYEVENT_H diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp index ce78cf7e..80ea96fa 100644 --- a/src/libs/engine/events/DisablePatchEvent.cpp +++ b/src/libs/engine/events/DisablePatchEvent.cpp @@ -15,14 +15,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DisablePatchEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "util.h" -#include "ObjectStore.h" -#include "Port.h" +#include "DisablePatchEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "util.hpp" +#include "ObjectStore.hpp" +#include "Port.hpp" namespace Ingen { diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h deleted file mode 100644 index 1999ece0..00000000 --- a/src/libs/engine/events/DisablePatchEvent.h +++ /dev/null @@ -1,53 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DISABLEPATCHEVENT_H -#define DISABLEPATCHEVENT_H - -#include -#include "QueuedEvent.h" - -using std::string; - -namespace Ingen { - -class Patch; - - -/** Disables a Patch's DSP processing. - * - * \ingroup engine - */ -class DisablePatchEvent : public QueuedEvent -{ -public: - DisablePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _patch_path; - Patch* _patch; -}; - - -} // namespace Ingen - - -#endif // DISABLEPATCHEVENT_H diff --git a/src/libs/engine/events/DisablePatchEvent.hpp b/src/libs/engine/events/DisablePatchEvent.hpp new file mode 100644 index 00000000..1552fffe --- /dev/null +++ b/src/libs/engine/events/DisablePatchEvent.hpp @@ -0,0 +1,53 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DISABLEPATCHEVENT_H +#define DISABLEPATCHEVENT_H + +#include +#include "QueuedEvent.hpp" + +using std::string; + +namespace Ingen { + +class Patch; + + +/** Disables a Patch's DSP processing. + * + * \ingroup engine + */ +class DisablePatchEvent : public QueuedEvent +{ +public: + DisablePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _patch_path; + Patch* _patch; +}; + + +} // namespace Ingen + + +#endif // DISABLEPATCHEVENT_H diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp index bc97dff4..abdad386 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.cpp +++ b/src/libs/engine/events/DisconnectNodeEvent.cpp @@ -15,24 +15,24 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DisconnectNodeEvent.h" +#include "DisconnectNodeEvent.hpp" #include -#include -#include -#include -#include "interface/Responder.h" -#include "Engine.h" -#include "Node.h" -#include "Connection.h" -#include "DisconnectionEvent.h" -#include "Port.h" -#include "InputPort.h" -#include "OutputPort.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "util.h" -#include "ObjectStore.h" -#include +#include +#include +#include +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Node.hpp" +#include "Connection.hpp" +#include "DisconnectionEvent.hpp" +#include "Port.hpp" +#include "InputPort.hpp" +#include "OutputPort.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "util.hpp" +#include "ObjectStore.hpp" +#include using std::cerr; using std::endl; diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h deleted file mode 100644 index a70f9e8c..00000000 --- a/src/libs/engine/events/DisconnectNodeEvent.h +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DISCONNECTNODEEVENT_H -#define DISCONNECTNODEEVENT_H - -#include -#include -#include -#include "QueuedEvent.h" - -using std::string; - -namespace Ingen { - -class DisconnectionEvent; -class Patch; -class Node; -class Connection; -class Port; -class InputPort; -class OutputPort; - - -/** An event to disconnect all connections to a Node. - * - * \ingroup engine - */ -class DisconnectNodeEvent : public QueuedEvent -{ -public: - DisconnectNodeEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path); - DisconnectNodeEvent(Engine& engine, Node* node); - ~DisconnectNodeEvent(); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Path _node_path; - Patch* _patch; - Node* _node; - Raul::List _disconnection_events; - - bool _succeeded; - bool _lookup; - bool _disconnect_parent; -}; - - -} // namespace Ingen - - -#endif // DISCONNECTNODEEVENT_H diff --git a/src/libs/engine/events/DisconnectNodeEvent.hpp b/src/libs/engine/events/DisconnectNodeEvent.hpp new file mode 100644 index 00000000..e14f87fa --- /dev/null +++ b/src/libs/engine/events/DisconnectNodeEvent.hpp @@ -0,0 +1,69 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DISCONNECTNODEEVENT_H +#define DISCONNECTNODEEVENT_H + +#include +#include +#include +#include "QueuedEvent.hpp" + +using std::string; + +namespace Ingen { + +class DisconnectionEvent; +class Patch; +class Node; +class Connection; +class Port; +class InputPort; +class OutputPort; + + +/** An event to disconnect all connections to a Node. + * + * \ingroup engine + */ +class DisconnectNodeEvent : public QueuedEvent +{ +public: + DisconnectNodeEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path); + DisconnectNodeEvent(Engine& engine, Node* node); + ~DisconnectNodeEvent(); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Path _node_path; + Patch* _patch; + Node* _node; + Raul::List _disconnection_events; + + bool _succeeded; + bool _lookup; + bool _disconnect_parent; +}; + + +} // namespace Ingen + + +#endif // DISCONNECTNODEEVENT_H diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp index 1373d9b8..0956ca8f 100644 --- a/src/libs/engine/events/DisconnectPortEvent.cpp +++ b/src/libs/engine/events/DisconnectPortEvent.cpp @@ -16,23 +16,23 @@ */ #include -#include -#include -#include -#include -#include "interface/Responder.h" -#include "Engine.h" -#include "Node.h" -#include "Connection.h" -#include "DisconnectionEvent.h" -#include "Port.h" -#include "InputPort.h" -#include "OutputPort.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "util.h" -#include "ObjectStore.h" -#include "DisconnectPortEvent.h" +#include +#include +#include +#include +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Node.hpp" +#include "Connection.hpp" +#include "DisconnectionEvent.hpp" +#include "Port.hpp" +#include "InputPort.hpp" +#include "OutputPort.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "util.hpp" +#include "ObjectStore.hpp" +#include "DisconnectPortEvent.hpp" using std::cerr; using std::endl; diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h deleted file mode 100644 index 647ee1da..00000000 --- a/src/libs/engine/events/DisconnectPortEvent.h +++ /dev/null @@ -1,71 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DISCONNECTPORTEVENT_H -#define DISCONNECTPORTEVENT_H - -#include -#include -#include "QueuedEvent.h" -#include - -namespace Raul { template class Array; } - -namespace Ingen { - - -class Patch; -class Node; -class Connection; -class Port; -class DisconnectionEvent; - -using std::string; - - -/** An event to disconnect all connections to a Port. - * - * \ingroup engine - */ -class DisconnectPortEvent : public QueuedEvent -{ -public: - DisconnectPortEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); - DisconnectPortEvent(Engine& engine, Port* port); - ~DisconnectPortEvent(); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Path _port_path; - Patch* _patch; - Port* _port; - Raul::List _disconnection_events; - - Raul::Array* _process_order; // Patch's new process order - - bool _succeeded; - bool _lookup; -}; - - -} // namespace Ingen - - -#endif // DISCONNECTPORTEVENT_H diff --git a/src/libs/engine/events/DisconnectPortEvent.hpp b/src/libs/engine/events/DisconnectPortEvent.hpp new file mode 100644 index 00000000..95644098 --- /dev/null +++ b/src/libs/engine/events/DisconnectPortEvent.hpp @@ -0,0 +1,71 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DISCONNECTPORTEVENT_H +#define DISCONNECTPORTEVENT_H + +#include +#include +#include "QueuedEvent.hpp" +#include + +namespace Raul { template class Array; } + +namespace Ingen { + + +class Patch; +class Node; +class Connection; +class Port; +class DisconnectionEvent; + +using std::string; + + +/** An event to disconnect all connections to a Port. + * + * \ingroup engine + */ +class DisconnectPortEvent : public QueuedEvent +{ +public: + DisconnectPortEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); + DisconnectPortEvent(Engine& engine, Port* port); + ~DisconnectPortEvent(); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Path _port_path; + Patch* _patch; + Port* _port; + Raul::List _disconnection_events; + + Raul::Array* _process_order; // Patch's new process order + + bool _succeeded; + bool _lookup; +}; + + +} // namespace Ingen + + +#endif // DISCONNECTPORTEVENT_H diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp index 2fafb98e..ba35f84e 100644 --- a/src/libs/engine/events/DisconnectionEvent.cpp +++ b/src/libs/engine/events/DisconnectionEvent.cpp @@ -15,19 +15,19 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "DisconnectionEvent.h" +#include "DisconnectionEvent.hpp" #include -#include -#include -#include "interface/Responder.h" -#include "Engine.h" -#include "Connection.h" -#include "InputPort.h" -#include "OutputPort.h" -#include "Patch.h" -#include "ClientBroadcaster.h" -#include "Port.h" -#include "ObjectStore.h" +#include +#include +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Connection.hpp" +#include "InputPort.hpp" +#include "OutputPort.hpp" +#include "Patch.hpp" +#include "ClientBroadcaster.hpp" +#include "Port.hpp" +#include "ObjectStore.hpp" using std::string; namespace Ingen { diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h deleted file mode 100644 index 23f1526e..00000000 --- a/src/libs/engine/events/DisconnectionEvent.h +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef DISCONNECTIONEVENT_H -#define DISCONNECTIONEVENT_H - -#include -#include -#include "QueuedEvent.h" -#include "types.h" -using std::string; - -namespace Raul { - template class ListNode; - template class Array; -} - -namespace Ingen { - -class Patch; -class Node; -class Connection; -class MidiMessage; -class Port; -class Connection; -class InputPort; -class OutputPort; - - -/** Make a Connection between two Ports. - * - * \ingroup engine - */ -class DisconnectionEvent : public QueuedEvent -{ -public: - DisconnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); - DisconnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Port* const src_port, Port* const dst_port); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - - enum ErrorType { - NO_ERROR, - PARENT_PATCH_DIFFERENT, - PORT_NOT_FOUND, - TYPE_MISMATCH, - NOT_CONNECTED, - PARENTS_NOT_FOUND, - CONNECTION_NOT_FOUND - }; - - Path _src_port_path; - Path _dst_port_path; - - Patch* _patch; - Port* _src_port; - Port* _dst_port; - OutputPort* _src_output_port; - InputPort* _dst_input_port; - - bool _lookup; - - Raul::Array* _process_order; ///< New process order for Patch - - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // DISCONNECTIONEVENT_H diff --git a/src/libs/engine/events/DisconnectionEvent.hpp b/src/libs/engine/events/DisconnectionEvent.hpp new file mode 100644 index 00000000..9c5b7490 --- /dev/null +++ b/src/libs/engine/events/DisconnectionEvent.hpp @@ -0,0 +1,89 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef DISCONNECTIONEVENT_H +#define DISCONNECTIONEVENT_H + +#include +#include +#include "QueuedEvent.hpp" +#include "types.hpp" +using std::string; + +namespace Raul { + template class ListNode; + template class Array; +} + +namespace Ingen { + +class Patch; +class Node; +class Connection; +class MidiMessage; +class Port; +class Connection; +class InputPort; +class OutputPort; + + +/** Make a Connection between two Ports. + * + * \ingroup engine + */ +class DisconnectionEvent : public QueuedEvent +{ +public: + DisconnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path); + DisconnectionEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Port* const src_port, Port* const dst_port); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + + enum ErrorType { + NO_ERROR, + PARENT_PATCH_DIFFERENT, + PORT_NOT_FOUND, + TYPE_MISMATCH, + NOT_CONNECTED, + PARENTS_NOT_FOUND, + CONNECTION_NOT_FOUND + }; + + Path _src_port_path; + Path _dst_port_path; + + Patch* _patch; + Port* _src_port; + Port* _dst_port; + OutputPort* _src_output_port; + InputPort* _dst_input_port; + + bool _lookup; + + Raul::Array* _process_order; ///< New process order for Patch + + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // DISCONNECTIONEVENT_H diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp index 74d4a52b..1921b301 100644 --- a/src/libs/engine/events/EnablePatchEvent.cpp +++ b/src/libs/engine/events/EnablePatchEvent.cpp @@ -15,13 +15,13 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "EnablePatchEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Patch.h" -#include "util.h" -#include "ClientBroadcaster.h" -#include "ObjectStore.h" +#include "EnablePatchEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Patch.hpp" +#include "util.hpp" +#include "ClientBroadcaster.hpp" +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h deleted file mode 100644 index c63c9db3..00000000 --- a/src/libs/engine/events/EnablePatchEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef ENABLEPATCHEVENT_H -#define ENABLEPATCHEVENT_H - -#include -#include "QueuedEvent.h" - -using std::string; - -namespace Raul { template class Array; } - -namespace Ingen { - -class Patch; -class Node; - - -/** Enables a patch's DSP processing. - * - * \ingroup engine - */ -class EnablePatchEvent : public QueuedEvent -{ -public: - EnablePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _patch_path; - Patch* _patch; - Raul::Array* _process_order; // Patch's new process order -}; - - -} // namespace Ingen - - -#endif // ENABLEPATCHEVENT_H diff --git a/src/libs/engine/events/EnablePatchEvent.hpp b/src/libs/engine/events/EnablePatchEvent.hpp new file mode 100644 index 00000000..0a74c082 --- /dev/null +++ b/src/libs/engine/events/EnablePatchEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef ENABLEPATCHEVENT_H +#define ENABLEPATCHEVENT_H + +#include +#include "QueuedEvent.hpp" + +using std::string; + +namespace Raul { template class Array; } + +namespace Ingen { + +class Patch; +class Node; + + +/** Enables a patch's DSP processing. + * + * \ingroup engine + */ +class EnablePatchEvent : public QueuedEvent +{ +public: + EnablePatchEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& patch_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _patch_path; + Patch* _patch; + Raul::Array* _process_order; // Patch's new process order +}; + + +} // namespace Ingen + + +#endif // ENABLEPATCHEVENT_H diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp index b06d1817..04db153c 100644 --- a/src/libs/engine/events/LoadPluginsEvent.cpp +++ b/src/libs/engine/events/LoadPluginsEvent.cpp @@ -15,12 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "LoadPluginsEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "NodeFactory.h" -#include "ClientBroadcaster.h" -#include "QueuedEventSource.h" +#include "LoadPluginsEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "NodeFactory.hpp" +#include "ClientBroadcaster.hpp" +#include "QueuedEventSource.hpp" #include using std::cerr; diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h deleted file mode 100644 index e56de796..00000000 --- a/src/libs/engine/events/LoadPluginsEvent.h +++ /dev/null @@ -1,48 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef LOADPLUGINSEVENT_H -#define LOADPLUGINSEVENT_H - -#include -#include "QueuedEvent.h" - -namespace Ingen { - -class Plugin; - - -/** Loads all plugins into the internal plugin database (in NodeFactory). - * - * \ingroup engine - */ -class LoadPluginsEvent : public QueuedEvent -{ -public: - LoadPluginsEvent(Engine& engine, - SharedPtr responder, - SampleCount timestamp, - QueuedEventSource* source); - - void pre_process(); - void post_process(); -}; - - -} // namespace Ingen - -#endif // LOADPLUGINSEVENT_H diff --git a/src/libs/engine/events/LoadPluginsEvent.hpp b/src/libs/engine/events/LoadPluginsEvent.hpp new file mode 100644 index 00000000..c6f886f7 --- /dev/null +++ b/src/libs/engine/events/LoadPluginsEvent.hpp @@ -0,0 +1,48 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef LOADPLUGINSEVENT_H +#define LOADPLUGINSEVENT_H + +#include +#include "QueuedEvent.hpp" + +namespace Ingen { + +class Plugin; + + +/** Loads all plugins into the internal plugin database (in NodeFactory). + * + * \ingroup engine + */ +class LoadPluginsEvent : public QueuedEvent +{ +public: + LoadPluginsEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + QueuedEventSource* source); + + void pre_process(); + void post_process(); +}; + + +} // namespace Ingen + +#endif // LOADPLUGINSEVENT_H diff --git a/src/libs/engine/events/Makefile.am b/src/libs/engine/events/Makefile.am index e54c527a..bc698678 100644 --- a/src/libs/engine/events/Makefile.am +++ b/src/libs/engine/events/Makefile.am @@ -1,69 +1,69 @@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = \ - RegisterClientEvent.h \ - RegisterClientEvent.cpp \ - UnregisterClientEvent.h \ - UnregisterClientEvent.cpp \ - PingQueuedEvent.h \ - DeactivateEvent.h \ - DeactivateEvent.cpp \ - SetPortValueEvent.h \ - SetPortValueEvent.cpp \ - SetPortValueQueuedEvent.h \ - SetPortValueQueuedEvent.cpp \ - NoteOnEvent.h \ - NoteOnEvent.cpp \ - NoteOffEvent.h \ - NoteOffEvent.cpp \ - AllNotesOffEvent.h \ + AddNodeEvent.cpp \ + AddNodeEvent.hpp \ AllNotesOffEvent.cpp \ - ConnectionEvent.h \ + AllNotesOffEvent.hpp \ + ClearPatchEvent.cpp \ + ClearPatchEvent.hpp \ ConnectionEvent.cpp \ - DisconnectionEvent.h \ - DisconnectionEvent.cpp \ - DisconnectNodeEvent.h \ - DisconnectNodeEvent.cpp \ - DisconnectPortEvent.h \ - DisconnectPortEvent.cpp \ - DestroyEvent.h \ - DestroyEvent.cpp \ - AddNodeEvent.h \ - AddNodeEvent.cpp \ - SetMetadataEvent.h \ - SetMetadataEvent.cpp \ - RequestMetadataEvent.h \ - RequestMetadataEvent.cpp \ - RequestPluginEvent.h \ - RequestPluginEvent.cpp \ - RequestObjectEvent.h \ - RequestObjectEvent.cpp \ - RequestPortValueEvent.h \ - RequestPortValueEvent.cpp \ - RequestAllObjectsEvent.h \ - RequestAllObjectsEvent.cpp \ - RequestPluginsEvent.h \ - RequestPluginsEvent.cpp \ - CreatePatchEvent.h \ + ConnectionEvent.hpp \ CreatePatchEvent.cpp \ - LoadPluginsEvent.h \ - LoadPluginsEvent.cpp \ - EnablePatchEvent.h \ - EnablePatchEvent.cpp \ - DisablePatchEvent.h \ - DisablePatchEvent.cpp \ - ClearPatchEvent.h \ - ClearPatchEvent.cpp \ - RenameEvent.h \ - RenameEvent.cpp \ - MidiLearnEvent.h \ - MidiLearnEvent.cpp \ + CreatePatchEvent.hpp \ DSSIConfigureEvent.cpp \ - DSSIConfigureEvent.h \ + DSSIConfigureEvent.hpp \ DSSIControlEvent.cpp \ - DSSIControlEvent.h \ + DSSIControlEvent.hpp \ DSSIProgramEvent.cpp \ - DSSIProgramEvent.h \ + DSSIProgramEvent.hpp \ DSSIUpdateEvent.cpp \ - DSSIUpdateEvent.h + DSSIUpdateEvent.hpp \ + DeactivateEvent.cpp \ + DeactivateEvent.hpp \ + DestroyEvent.cpp \ + DestroyEvent.hpp \ + DisablePatchEvent.cpp \ + DisablePatchEvent.hpp \ + DisconnectNodeEvent.cpp \ + DisconnectNodeEvent.hpp \ + DisconnectPortEvent.cpp \ + DisconnectPortEvent.hpp \ + DisconnectionEvent.cpp \ + DisconnectionEvent.hpp \ + EnablePatchEvent.cpp \ + EnablePatchEvent.hpp \ + LoadPluginsEvent.cpp \ + LoadPluginsEvent.hpp \ + MidiLearnEvent.cpp \ + MidiLearnEvent.hpp \ + NoteOffEvent.cpp \ + NoteOffEvent.hpp \ + NoteOnEvent.cpp \ + NoteOnEvent.hpp \ + PingQueuedEvent.hpp \ + RegisterClientEvent.cpp \ + RegisterClientEvent.hpp \ + RenameEvent.cpp \ + RenameEvent.hpp \ + RequestAllObjectsEvent.cpp \ + RequestAllObjectsEvent.hpp \ + RequestMetadataEvent.cpp \ + RequestMetadataEvent.hpp \ + RequestObjectEvent.cpp \ + RequestObjectEvent.hpp \ + RequestPluginEvent.cpp \ + RequestPluginEvent.hpp \ + RequestPluginsEvent.cpp \ + RequestPluginsEvent.hpp \ + RequestPortValueEvent.cpp \ + RequestPortValueEvent.hpp \ + SetMetadataEvent.cpp \ + SetMetadataEvent.hpp \ + SetPortValueEvent.cpp \ + SetPortValueEvent.hpp \ + SetPortValueQueuedEvent.cpp \ + SetPortValueQueuedEvent.hpp \ + UnregisterClientEvent.cpp \ + UnregisterClientEvent.hpp diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp index 6204ed4a..8bc05b4f 100644 --- a/src/libs/engine/events/MidiLearnEvent.cpp +++ b/src/libs/engine/events/MidiLearnEvent.cpp @@ -15,13 +15,13 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "MidiLearnEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectStore.h" -#include "Node.h" -#include "MidiControlNode.h" -#include "ClientBroadcaster.h" +#include "MidiLearnEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectStore.hpp" +#include "Node.hpp" +#include "MidiControlNode.hpp" +#include "ClientBroadcaster.hpp" namespace Ingen { diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h deleted file mode 100644 index d28413c7..00000000 --- a/src/libs/engine/events/MidiLearnEvent.h +++ /dev/null @@ -1,85 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef MIDILEARNEVENT_H -#define MIDILEARNEVENT_H - -#include "QueuedEvent.h" -#include "MidiControlNode.h" -#include "types.h" -#include -using std::string; - -namespace Ingen { - -class Node; -class ControlChangeEvent; - - -/** Response event for a MIDI learn. - * - * This is a trivial event that sends a control change in it's post_process - * method (used by MidiLearnEvent to notify clients when the learn happens) - */ -class MidiLearnResponseEvent : public Event -{ -public: - MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp) - : Event(engine, SharedPtr(), timestamp), - _port_path(port_path), - _value(0.0f) - {} - - void set_value(Sample val) { _value = val; } - void post_process(); - -private: - string _port_path; - Sample _value; -}; - - - -/** A MIDI learn event. - * - * This creates a MidiLearnResponseEvent and passes it to the learning node, which - * will push it to the post-processor once the learn happens in order to reply - * to the client with the new port (learned controller) value. - * - * \ingroup engine - */ -class MidiLearnEvent : public QueuedEvent -{ -public: - MidiLearnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _node_path; - Node* _node; - - /// Event to respond with when learned - MidiLearnResponseEvent* _response_event; -}; - - -} // namespace Ingen - -#endif // MIDILEARNEVENT_H diff --git a/src/libs/engine/events/MidiLearnEvent.hpp b/src/libs/engine/events/MidiLearnEvent.hpp new file mode 100644 index 00000000..c5a0902f --- /dev/null +++ b/src/libs/engine/events/MidiLearnEvent.hpp @@ -0,0 +1,85 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef MIDILEARNEVENT_H +#define MIDILEARNEVENT_H + +#include "QueuedEvent.hpp" +#include "MidiControlNode.hpp" +#include "types.hpp" +#include +using std::string; + +namespace Ingen { + +class Node; +class ControlChangeEvent; + + +/** Response event for a MIDI learn. + * + * This is a trivial event that sends a control change in it's post_process + * method (used by MidiLearnEvent to notify clients when the learn happens) + */ +class MidiLearnResponseEvent : public Event +{ +public: + MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp) + : Event(engine, SharedPtr(), timestamp), + _port_path(port_path), + _value(0.0f) + {} + + void set_value(Sample val) { _value = val; } + void post_process(); + +private: + string _port_path; + Sample _value; +}; + + + +/** A MIDI learn event. + * + * This creates a MidiLearnResponseEvent and passes it to the learning node, which + * will push it to the post-processor once the learn happens in order to reply + * to the client with the new port (learned controller) value. + * + * \ingroup engine + */ +class MidiLearnEvent : public QueuedEvent +{ +public: + MidiLearnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _node_path; + Node* _node; + + /// Event to respond with when learned + MidiLearnResponseEvent* _response_event; +}; + + +} // namespace Ingen + +#endif // MIDILEARNEVENT_H diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp index cb081534..a8da7669 100644 --- a/src/libs/engine/events/NoteOffEvent.cpp +++ b/src/libs/engine/events/NoteOffEvent.cpp @@ -15,13 +15,13 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "NoteOffEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectStore.h" -#include "Node.h" -#include "MidiNoteNode.h" -#include "MidiTriggerNode.h" +#include "NoteOffEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectStore.hpp" +#include "Node.hpp" +#include "MidiNoteNode.hpp" +#include "MidiTriggerNode.hpp" namespace Ingen { diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h deleted file mode 100644 index 423ddcdc..00000000 --- a/src/libs/engine/events/NoteOffEvent.h +++ /dev/null @@ -1,53 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef NOTEOFFEVENT_H -#define NOTEOFFEVENT_H - -#include "Event.h" -#include "types.h" -#include -using std::string; - -namespace Ingen { - -class Node; - - -/** A note off event. - * - * \ingroup engine - */ -class NoteOffEvent : public Event -{ -public: - NoteOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Node* node, uchar note_num); - NoteOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, uchar note_num); - - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Node* _node; - string _node_path; - uchar _note_num; -}; - - -} // namespace Ingen - -#endif // NOTEOFFEVENT_H diff --git a/src/libs/engine/events/NoteOffEvent.hpp b/src/libs/engine/events/NoteOffEvent.hpp new file mode 100644 index 00000000..4186cbed --- /dev/null +++ b/src/libs/engine/events/NoteOffEvent.hpp @@ -0,0 +1,53 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef NOTEOFFEVENT_H +#define NOTEOFFEVENT_H + +#include "Event.hpp" +#include "types.hpp" +#include +using std::string; + +namespace Ingen { + +class Node; + + +/** A note off event. + * + * \ingroup engine + */ +class NoteOffEvent : public Event +{ +public: + NoteOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Node* node, uchar note_num); + NoteOffEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, uchar note_num); + + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Node* _node; + string _node_path; + uchar _note_num; +}; + + +} // namespace Ingen + +#endif // NOTEOFFEVENT_H diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp index 313dbccd..5bd57d93 100644 --- a/src/libs/engine/events/NoteOnEvent.cpp +++ b/src/libs/engine/events/NoteOnEvent.cpp @@ -15,14 +15,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "NoteOnEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectStore.h" -#include "Node.h" -#include "MidiNoteNode.h" -#include "MidiTriggerNode.h" -#include "Plugin.h" +#include "NoteOnEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectStore.hpp" +#include "Node.hpp" +#include "MidiNoteNode.hpp" +#include "MidiTriggerNode.hpp" +#include "Plugin.hpp" namespace Ingen { diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h deleted file mode 100644 index a3ee4210..00000000 --- a/src/libs/engine/events/NoteOnEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef NOTEONEVENT_H -#define NOTEONEVENT_H - -#include "Event.h" -#include "types.h" -#include -using std::string; - -namespace Ingen { - -class Node; - - -/** A note on event. - * - * \ingroup engine - */ -class NoteOnEvent : public Event -{ -public: - NoteOnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity); - NoteOnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity); - - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - Node* _node; - string _node_path; - uchar _note_num; - uchar _velocity; - bool _is_osc_triggered; -}; - - -} // namespace Ingen - -#endif // NOTEONEVENT_H diff --git a/src/libs/engine/events/NoteOnEvent.hpp b/src/libs/engine/events/NoteOnEvent.hpp new file mode 100644 index 00000000..3a641a55 --- /dev/null +++ b/src/libs/engine/events/NoteOnEvent.hpp @@ -0,0 +1,55 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef NOTEONEVENT_H +#define NOTEONEVENT_H + +#include "Event.hpp" +#include "types.hpp" +#include +using std::string; + +namespace Ingen { + +class Node; + + +/** A note on event. + * + * \ingroup engine + */ +class NoteOnEvent : public Event +{ +public: + NoteOnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity); + NoteOnEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity); + + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + Node* _node; + string _node_path; + uchar _note_num; + uchar _velocity; + bool _is_osc_triggered; +}; + + +} // namespace Ingen + +#endif // NOTEONEVENT_H diff --git a/src/libs/engine/events/PingQueuedEvent.h b/src/libs/engine/events/PingQueuedEvent.h deleted file mode 100644 index 3d331ccf..00000000 --- a/src/libs/engine/events/PingQueuedEvent.h +++ /dev/null @@ -1,48 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef PINGQUEUEDEVENT_H -#define PINGQUEUEDEVENT_H - -#include "QueuedEvent.h" -#include "types.h" -#include "interface/Responder.h" - -namespace Ingen { - -class Port; - - -/** A ping that travels through the pre-processed event queue before responding - * (useful for the order guarantee). - * - * \ingroup engine - */ -class PingQueuedEvent : public QueuedEvent -{ -public: - PingQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp) - : QueuedEvent(engine, responder, timestamp) - {} - - void post_process() { _responder->respond_ok(); } -}; - - -} // namespace Ingen - -#endif // PINGQUEUEDEVENT_H diff --git a/src/libs/engine/events/PingQueuedEvent.hpp b/src/libs/engine/events/PingQueuedEvent.hpp new file mode 100644 index 00000000..9712a904 --- /dev/null +++ b/src/libs/engine/events/PingQueuedEvent.hpp @@ -0,0 +1,48 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef PINGQUEUEDEVENT_H +#define PINGQUEUEDEVENT_H + +#include "QueuedEvent.hpp" +#include "types.hpp" +#include "interface/Responder.hpp" + +namespace Ingen { + +class Port; + + +/** A ping that travels through the pre-processed event queue before responding + * (useful for the order guarantee). + * + * \ingroup engine + */ +class PingQueuedEvent : public QueuedEvent +{ +public: + PingQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp) + : QueuedEvent(engine, responder, timestamp) + {} + + void post_process() { _responder->respond_ok(); } +}; + + +} // namespace Ingen + +#endif // PINGQUEUEDEVENT_H diff --git a/src/libs/engine/events/RegisterClientEvent.cpp b/src/libs/engine/events/RegisterClientEvent.cpp index 3ba36cc7..ace2b3e0 100644 --- a/src/libs/engine/events/RegisterClientEvent.cpp +++ b/src/libs/engine/events/RegisterClientEvent.cpp @@ -15,10 +15,10 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "interface/Responder.h" -#include "RegisterClientEvent.h" -#include "Engine.h" -#include "ClientBroadcaster.h" +#include "interface/Responder.hpp" +#include "RegisterClientEvent.hpp" +#include "Engine.hpp" +#include "ClientBroadcaster.hpp" namespace Ingen { diff --git a/src/libs/engine/events/RegisterClientEvent.h b/src/libs/engine/events/RegisterClientEvent.h deleted file mode 100644 index f32093a4..00000000 --- a/src/libs/engine/events/RegisterClientEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REGISTERCLIENTEVENT_H -#define REGISTERCLIENTEVENT_H - -#include "QueuedEvent.h" -#include "interface/ClientKey.h" -#include "interface/ClientInterface.h" -#include -using std::string; -using Ingen::Shared::ClientInterface; -using Ingen::Shared::ClientKey; -using Ingen::Shared::Responder; - -namespace Ingen { - - -/** Registers a new client with the OSC system, so it can receive updates. - * - * \ingroup engine - */ -class RegisterClientEvent : public QueuedEvent -{ -public: - RegisterClientEvent(Engine& engine, - SharedPtr responder, - SampleCount timestamp, - ClientKey key, - SharedPtr client); - - void pre_process(); - void post_process(); - -private: - ClientKey _key; - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REGISTERCLIENTEVENT_H diff --git a/src/libs/engine/events/RegisterClientEvent.hpp b/src/libs/engine/events/RegisterClientEvent.hpp new file mode 100644 index 00000000..be02fd41 --- /dev/null +++ b/src/libs/engine/events/RegisterClientEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REGISTERCLIENTEVENT_H +#define REGISTERCLIENTEVENT_H + +#include "QueuedEvent.hpp" +#include "interface/ClientKey.hpp" +#include "interface/ClientInterface.hpp" +#include +using std::string; +using Ingen::Shared::ClientInterface; +using Ingen::Shared::ClientKey; +using Ingen::Shared::Responder; + +namespace Ingen { + + +/** Registers a new client with the OSC system, so it can receive updates. + * + * \ingroup engine + */ +class RegisterClientEvent : public QueuedEvent +{ +public: + RegisterClientEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + ClientKey key, + SharedPtr client); + + void pre_process(); + void post_process(); + +private: + ClientKey _key; + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REGISTERCLIENTEVENT_H diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp index ac9082e6..035bd005 100644 --- a/src/libs/engine/events/RenameEvent.cpp +++ b/src/libs/engine/events/RenameEvent.cpp @@ -15,15 +15,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RenameEvent.h" -#include "interface/Responder.h" -#include "Patch.h" -#include "Node.h" -#include "Tree.h" -#include "Engine.h" -#include "ClientBroadcaster.h" -#include -#include "ObjectStore.h" +#include "RenameEvent.hpp" +#include "interface/Responder.hpp" +#include "Patch.hpp" +#include "Node.hpp" +#include "Tree.hpp" +#include "Engine.hpp" +#include "ClientBroadcaster.hpp" +#include +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h deleted file mode 100644 index c0d1e538..00000000 --- a/src/libs/engine/events/RenameEvent.h +++ /dev/null @@ -1,68 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef RENAMEEVENT_H -#define RENAMEEVENT_H - -#include -#include "QueuedEvent.h" -#include - -using std::string; - -template class TreeNode; -template class ListNode; - -namespace Ingen { - -class GraphObject; -class Patch; -class Node; -class Plugin; -class DisconnectNodeEvent; -class DisconnectPortEvent; - - -/** An event to change the name of an GraphObject. - * - * \ingroup engine - */ -class RenameEvent : public QueuedEvent -{ -public: - RenameEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& name); - ~RenameEvent(); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - enum ErrorType { NO_ERROR, OBJECT_NOT_FOUND, OBJECT_EXISTS, OBJECT_NOT_RENAMABLE, INVALID_NAME }; - - Path _old_path; - string _name; - Path _new_path; - Patch* _parent_patch; - TreeNode* _store_treenode; - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // RENAMEEVENT_H diff --git a/src/libs/engine/events/RenameEvent.hpp b/src/libs/engine/events/RenameEvent.hpp new file mode 100644 index 00000000..f50efcc7 --- /dev/null +++ b/src/libs/engine/events/RenameEvent.hpp @@ -0,0 +1,68 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef RENAMEEVENT_H +#define RENAMEEVENT_H + +#include +#include "QueuedEvent.hpp" +#include + +using std::string; + +template class TreeNode; +template class ListNode; + +namespace Ingen { + +class GraphObject; +class Patch; +class Node; +class Plugin; +class DisconnectNodeEvent; +class DisconnectPortEvent; + + +/** An event to change the name of an GraphObject. + * + * \ingroup engine + */ +class RenameEvent : public QueuedEvent +{ +public: + RenameEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& name); + ~RenameEvent(); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + enum ErrorType { NO_ERROR, OBJECT_NOT_FOUND, OBJECT_EXISTS, OBJECT_NOT_RENAMABLE, INVALID_NAME }; + + Path _old_path; + string _name; + Path _new_path; + Patch* _parent_patch; + TreeNode* _store_treenode; + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // RENAMEEVENT_H diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp index ccf5a6a1..a6940442 100644 --- a/src/libs/engine/events/RequestAllObjectsEvent.cpp +++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp @@ -15,12 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestAllObjectsEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectSender.h" -#include "ClientBroadcaster.h" -#include "ObjectStore.h" +#include "RequestAllObjectsEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectSender.hpp" +#include "ClientBroadcaster.hpp" +#include "ObjectStore.hpp" namespace Ingen { diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h deleted file mode 100644 index a0d10c49..00000000 --- a/src/libs/engine/events/RequestAllObjectsEvent.h +++ /dev/null @@ -1,51 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTALLOBJECTSEVENT_H -#define REQUESTALLOBJECTSEVENT_H - -#include -#include "QueuedEvent.h" -using std::string; - -namespace Ingen { - -namespace Shared { - class ClientInterface; -} using Shared::ClientInterface; - - -/** A request from a client to send notification of all objects (ie refresh). - * - * \ingroup engine - */ -class RequestAllObjectsEvent : public QueuedEvent -{ -public: - RequestAllObjectsEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); - - void pre_process(); - void post_process(); - -private: - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REQUESTALLOBJECTSEVENT_H diff --git a/src/libs/engine/events/RequestAllObjectsEvent.hpp b/src/libs/engine/events/RequestAllObjectsEvent.hpp new file mode 100644 index 00000000..91dfefc3 --- /dev/null +++ b/src/libs/engine/events/RequestAllObjectsEvent.hpp @@ -0,0 +1,51 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTALLOBJECTSEVENT_H +#define REQUESTALLOBJECTSEVENT_H + +#include +#include "QueuedEvent.hpp" +using std::string; + +namespace Ingen { + +namespace Shared { + class ClientInterface; +} using Shared::ClientInterface; + + +/** A request from a client to send notification of all objects (ie refresh). + * + * \ingroup engine + */ +class RequestAllObjectsEvent : public QueuedEvent +{ +public: + RequestAllObjectsEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); + + void pre_process(); + void post_process(); + +private: + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REQUESTALLOBJECTSEVENT_H diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp index b2f189f6..5000256f 100644 --- a/src/libs/engine/events/RequestMetadataEvent.cpp +++ b/src/libs/engine/events/RequestMetadataEvent.cpp @@ -15,14 +15,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestMetadataEvent.h" +#include "RequestMetadataEvent.hpp" #include -#include "interface/Responder.h" -#include "Engine.h" -#include "GraphObject.h" -#include "ObjectStore.h" -#include "interface/ClientInterface.h" -#include "ClientBroadcaster.h" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "GraphObject.hpp" +#include "ObjectStore.hpp" +#include "interface/ClientInterface.hpp" +#include "ClientBroadcaster.hpp" using std::string; namespace Ingen { diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h deleted file mode 100644 index 45592e88..00000000 --- a/src/libs/engine/events/RequestMetadataEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTMETADATAEVENT_H -#define REQUESTMETADATAEVENT_H - -#include -#include "QueuedEvent.h" -#include -using std::string; - -namespace Ingen { - -class GraphObject; -namespace Shared { - class ClientInterface; -} using Shared::ClientInterface; - - -/** A request from a client for a piece of metadata. - * - * \ingroup engine - */ -class RequestMetadataEvent : public QueuedEvent -{ -public: - RequestMetadataEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& key); - - void pre_process(); - void post_process(); - -private: - string _path; - string _key; - Raul::Atom _value; - GraphObject* _object; - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REQUESTMETADATAEVENT_H diff --git a/src/libs/engine/events/RequestMetadataEvent.hpp b/src/libs/engine/events/RequestMetadataEvent.hpp new file mode 100644 index 00000000..ed33e4af --- /dev/null +++ b/src/libs/engine/events/RequestMetadataEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTMETADATAEVENT_H +#define REQUESTMETADATAEVENT_H + +#include +#include "QueuedEvent.hpp" +#include +using std::string; + +namespace Ingen { + +class GraphObject; +namespace Shared { + class ClientInterface; +} using Shared::ClientInterface; + + +/** A request from a client for a piece of metadata. + * + * \ingroup engine + */ +class RequestMetadataEvent : public QueuedEvent +{ +public: + RequestMetadataEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& key); + + void pre_process(); + void post_process(); + +private: + string _path; + string _key; + Raul::Atom _value; + GraphObject* _object; + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REQUESTMETADATAEVENT_H diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp index 30ef6f85..25f95d00 100644 --- a/src/libs/engine/events/RequestObjectEvent.cpp +++ b/src/libs/engine/events/RequestObjectEvent.cpp @@ -15,17 +15,17 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestObjectEvent.h" +#include "RequestObjectEvent.hpp" #include -#include "interface/ClientInterface.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ObjectStore.h" -#include "ClientBroadcaster.h" -#include "Patch.h" -#include "Node.h" -#include "Port.h" -#include "ObjectSender.h" +#include "interface/ClientInterface.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ObjectStore.hpp" +#include "ClientBroadcaster.hpp" +#include "Patch.hpp" +#include "Node.hpp" +#include "Port.hpp" +#include "ObjectSender.hpp" using std::string; diff --git a/src/libs/engine/events/RequestObjectEvent.h b/src/libs/engine/events/RequestObjectEvent.h deleted file mode 100644 index b769aee3..00000000 --- a/src/libs/engine/events/RequestObjectEvent.h +++ /dev/null @@ -1,56 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTOBJECTEVENT_H -#define REQUESTOBJECTEVENT_H - -#include -#include "QueuedEvent.h" -#include "types.h" - -using std::string; - -namespace Ingen { - -class GraphObject; -namespace Shared { class ClientInterface; } -using Shared::ClientInterface; - - -/** A request from a client to send the value of a port. - * - * \ingroup engine - */ -class RequestObjectEvent : public QueuedEvent -{ -public: - RequestObjectEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _path; - GraphObject* _object; - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REQUESTOBJECTEVENT_H diff --git a/src/libs/engine/events/RequestObjectEvent.hpp b/src/libs/engine/events/RequestObjectEvent.hpp new file mode 100644 index 00000000..6731182a --- /dev/null +++ b/src/libs/engine/events/RequestObjectEvent.hpp @@ -0,0 +1,56 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTOBJECTEVENT_H +#define REQUESTOBJECTEVENT_H + +#include +#include "QueuedEvent.hpp" +#include "types.hpp" + +using std::string; + +namespace Ingen { + +class GraphObject; +namespace Shared { class ClientInterface; } +using Shared::ClientInterface; + + +/** A request from a client to send the value of a port. + * + * \ingroup engine + */ +class RequestObjectEvent : public QueuedEvent +{ +public: + RequestObjectEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _path; + GraphObject* _object; + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REQUESTOBJECTEVENT_H diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp index da70cd8c..4e1a1660 100644 --- a/src/libs/engine/events/RequestPluginEvent.cpp +++ b/src/libs/engine/events/RequestPluginEvent.cpp @@ -15,16 +15,16 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestPluginEvent.h" +#include "RequestPluginEvent.hpp" #include -#include "interface/ClientInterface.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Port.h" -#include "ObjectStore.h" -#include "ClientBroadcaster.h" -#include "NodeFactory.h" -#include "Plugin.h" +#include "interface/ClientInterface.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Port.hpp" +#include "ObjectStore.hpp" +#include "ClientBroadcaster.hpp" +#include "NodeFactory.hpp" +#include "Plugin.hpp" using std::string; diff --git a/src/libs/engine/events/RequestPluginEvent.h b/src/libs/engine/events/RequestPluginEvent.h deleted file mode 100644 index 7047e2fa..00000000 --- a/src/libs/engine/events/RequestPluginEvent.h +++ /dev/null @@ -1,56 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTPLUGINEVENT_H -#define REQUESTPLUGINEVENT_H - -#include -#include "QueuedEvent.h" -#include "types.h" - -using std::string; - -namespace Ingen { - -class Plugin; -namespace Shared { class ClientInterface; } -using Shared::ClientInterface; - - -/** A request from a client to send the value of a port. - * - * \ingroup engine - */ -class RequestPluginEvent : public QueuedEvent -{ -public: - RequestPluginEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& uri); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _uri; - const Plugin* _plugin; - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REQUESTPLUGINEVENT_H diff --git a/src/libs/engine/events/RequestPluginEvent.hpp b/src/libs/engine/events/RequestPluginEvent.hpp new file mode 100644 index 00000000..26e5a8fa --- /dev/null +++ b/src/libs/engine/events/RequestPluginEvent.hpp @@ -0,0 +1,56 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTPLUGINEVENT_H +#define REQUESTPLUGINEVENT_H + +#include +#include "QueuedEvent.hpp" +#include "types.hpp" + +using std::string; + +namespace Ingen { + +class Plugin; +namespace Shared { class ClientInterface; } +using Shared::ClientInterface; + + +/** A request from a client to send the value of a port. + * + * \ingroup engine + */ +class RequestPluginEvent : public QueuedEvent +{ +public: + RequestPluginEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& uri); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _uri; + const Plugin* _plugin; + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REQUESTPLUGINEVENT_H diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp index 1d71b6fa..3976dd08 100644 --- a/src/libs/engine/events/RequestPluginsEvent.cpp +++ b/src/libs/engine/events/RequestPluginsEvent.cpp @@ -15,11 +15,11 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestPluginsEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "ClientBroadcaster.h" -#include "NodeFactory.h" +#include "RequestPluginsEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ClientBroadcaster.hpp" +#include "NodeFactory.hpp" namespace Ingen { diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h deleted file mode 100644 index 3d795081..00000000 --- a/src/libs/engine/events/RequestPluginsEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTPLUGINSEVENT_H -#define REQUESTPLUGINSEVENT_H - -#include -#include -#include "QueuedEvent.h" -using std::string; - -namespace Ingen { - -class Plugin; -class Shared::Responder; -namespace Shared { - class ClientInterface; -} using Shared::ClientInterface; - - -/** A request from a client to send notification of all objects (ie refresh). - * - * \ingroup engine - */ -class RequestPluginsEvent : public QueuedEvent -{ -public: - RequestPluginsEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); - - void pre_process(); - void post_process(); - -private: - SharedPtr _client; - std::list _plugins; -}; - - -} // namespace Ingen - -#endif // REQUESTPLUGINSEVENT_H diff --git a/src/libs/engine/events/RequestPluginsEvent.hpp b/src/libs/engine/events/RequestPluginsEvent.hpp new file mode 100644 index 00000000..fae8bf94 --- /dev/null +++ b/src/libs/engine/events/RequestPluginsEvent.hpp @@ -0,0 +1,55 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTPLUGINSEVENT_H +#define REQUESTPLUGINSEVENT_H + +#include +#include +#include "QueuedEvent.hpp" +using std::string; + +namespace Ingen { + +class Plugin; +class Shared::Responder; +namespace Shared { + class ClientInterface; +} using Shared::ClientInterface; + + +/** A request from a client to send notification of all objects (ie refresh). + * + * \ingroup engine + */ +class RequestPluginsEvent : public QueuedEvent +{ +public: + RequestPluginsEvent(Engine& engine, SharedPtr responder, SampleCount timestamp); + + void pre_process(); + void post_process(); + +private: + SharedPtr _client; + std::list _plugins; +}; + + +} // namespace Ingen + +#endif // REQUESTPLUGINSEVENT_H diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp index 79a7093a..7444068e 100644 --- a/src/libs/engine/events/RequestPortValueEvent.cpp +++ b/src/libs/engine/events/RequestPortValueEvent.cpp @@ -15,15 +15,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "RequestPortValueEvent.h" +#include "RequestPortValueEvent.hpp" #include -#include "interface/ClientInterface.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Port.h" -#include "ObjectStore.h" -#include "ClientBroadcaster.h" -#include "AudioBuffer.h" +#include "interface/ClientInterface.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Port.hpp" +#include "ObjectStore.hpp" +#include "ClientBroadcaster.hpp" +#include "AudioBuffer.hpp" using std::string; diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h deleted file mode 100644 index 87a6373c..00000000 --- a/src/libs/engine/events/RequestPortValueEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef REQUESTPORTVALUEEVENT_H -#define REQUESTPORTVALUEEVENT_H - -#include -#include "QueuedEvent.h" -#include "types.h" - -using std::string; - -namespace Ingen { - -class Port; -namespace Shared { class ClientInterface; } -using Shared::ClientInterface; - - -/** A request from a client to send the value of a port. - * - * \ingroup engine - */ -class RequestPortValueEvent : public QueuedEvent -{ -public: - RequestPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _port_path; - Port* _port; - Sample _value; - SharedPtr _client; -}; - - -} // namespace Ingen - -#endif // REQUESTPORTVALUEEVENT_H diff --git a/src/libs/engine/events/RequestPortValueEvent.hpp b/src/libs/engine/events/RequestPortValueEvent.hpp new file mode 100644 index 00000000..1a20b90f --- /dev/null +++ b/src/libs/engine/events/RequestPortValueEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef REQUESTPORTVALUEEVENT_H +#define REQUESTPORTVALUEEVENT_H + +#include +#include "QueuedEvent.hpp" +#include "types.hpp" + +using std::string; + +namespace Ingen { + +class Port; +namespace Shared { class ClientInterface; } +using Shared::ClientInterface; + + +/** A request from a client to send the value of a port. + * + * \ingroup engine + */ +class RequestPortValueEvent : public QueuedEvent +{ +public: + RequestPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _port_path; + Port* _port; + Sample _value; + SharedPtr _client; +}; + + +} // namespace Ingen + +#endif // REQUESTPORTVALUEEVENT_H diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index 6d303915..caa1b449 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -15,13 +15,13 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "SetMetadataEvent.h" +#include "SetMetadataEvent.hpp" #include -#include "interface/Responder.h" -#include "Engine.h" -#include "ClientBroadcaster.h" -#include "GraphObject.h" -#include "ObjectStore.h" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "ClientBroadcaster.hpp" +#include "GraphObject.hpp" +#include "ObjectStore.hpp" using std::string; diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h deleted file mode 100644 index 63a73a6d..00000000 --- a/src/libs/engine/events/SetMetadataEvent.h +++ /dev/null @@ -1,55 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef SETMETADATAEVENT_H -#define SETMETADATAEVENT_H - -#include -#include "QueuedEvent.h" -#include - -using std::string; - -namespace Ingen { - -class GraphObject; - - -/** An event to set a piece of metadata for an GraphObject. - * - * \ingroup engine - */ -class SetMetadataEvent : public QueuedEvent -{ -public: - SetMetadataEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - string _path; - string _key; - Raul::Atom _value; - GraphObject* _object; -}; - - -} // namespace Ingen - -#endif // SETMETADATAEVENT_H diff --git a/src/libs/engine/events/SetMetadataEvent.hpp b/src/libs/engine/events/SetMetadataEvent.hpp new file mode 100644 index 00000000..c5476eed --- /dev/null +++ b/src/libs/engine/events/SetMetadataEvent.hpp @@ -0,0 +1,55 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SETMETADATAEVENT_H +#define SETMETADATAEVENT_H + +#include +#include "QueuedEvent.hpp" +#include + +using std::string; + +namespace Ingen { + +class GraphObject; + + +/** An event to set a piece of metadata for an GraphObject. + * + * \ingroup engine + */ +class SetMetadataEvent : public QueuedEvent +{ +public: + SetMetadataEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& path, const string& key, const Raul::Atom& value); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + string _path; + string _key; + Raul::Atom _value; + GraphObject* _object; +}; + + +} // namespace Ingen + +#endif // SETMETADATAEVENT_H diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index f78dca7f..5de9dfff 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -15,14 +15,14 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "interface/Responder.h" -#include "SetPortValueEvent.h" -#include "Engine.h" -#include "Port.h" -#include "ClientBroadcaster.h" -#include "Node.h" -#include "ObjectStore.h" -#include "AudioBuffer.h" +#include "interface/Responder.hpp" +#include "SetPortValueEvent.hpp" +#include "Engine.hpp" +#include "Port.hpp" +#include "ClientBroadcaster.hpp" +#include "Node.hpp" +#include "ObjectStore.hpp" +#include "AudioBuffer.hpp" namespace Ingen { diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h deleted file mode 100644 index d5f5735f..00000000 --- a/src/libs/engine/events/SetPortValueEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef SETPORTVALUEEVENT_H -#define SETPORTVALUEEVENT_H - -#include -#include "Event.h" -#include "types.h" -using std::string; - -namespace Ingen { - -class Port; - - -/** An event to change the value of a port. - * - * \ingroup engine - */ -class SetPortValueEvent : public Event -{ -public: - SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path, Sample val); - SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); - - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH }; - - int _voice_num; - string _port_path; - float _val; - Port* _port; - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // SETPORTVALUEEVENT_H diff --git a/src/libs/engine/events/SetPortValueEvent.hpp b/src/libs/engine/events/SetPortValueEvent.hpp new file mode 100644 index 00000000..2f2f35e7 --- /dev/null +++ b/src/libs/engine/events/SetPortValueEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SETPORTVALUEEVENT_H +#define SETPORTVALUEEVENT_H + +#include +#include "Event.hpp" +#include "types.hpp" +using std::string; + +namespace Ingen { + +class Port; + + +/** An event to change the value of a port. + * + * \ingroup engine + */ +class SetPortValueEvent : public Event +{ +public: + SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path, Sample val); + SetPortValueEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); + + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH }; + + int _voice_num; + string _port_path; + float _val; + Port* _port; + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // SETPORTVALUEEVENT_H diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index d713ae8a..33178e55 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -15,15 +15,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "SetPortValueQueuedEvent.h" -#include "interface/Responder.h" -#include "Engine.h" -#include "Port.h" -#include "ClientBroadcaster.h" -#include "Plugin.h" -#include "Node.h" -#include "ObjectStore.h" -#include "AudioBuffer.h" +#include "SetPortValueQueuedEvent.hpp" +#include "interface/Responder.hpp" +#include "Engine.hpp" +#include "Port.hpp" +#include "ClientBroadcaster.hpp" +#include "Plugin.hpp" +#include "Node.hpp" +#include "ObjectStore.hpp" +#include "AudioBuffer.hpp" namespace Ingen { diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h deleted file mode 100644 index 4cbebe0e..00000000 --- a/src/libs/engine/events/SetPortValueQueuedEvent.h +++ /dev/null @@ -1,58 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef SETPORTVALUEQUEUEDEVENT_H -#define SETPORTVALUEQUEUEDEVENT_H - -#include "QueuedEvent.h" -#include "types.h" -#include -using std::string; - -namespace Ingen { - -class Port; - - -/** An event to change the value of a port. - * - * \ingroup engine - */ -class SetPortValueQueuedEvent : public QueuedEvent -{ -public: - SetPortValueQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path, Sample val); - SetPortValueQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); - - void pre_process(); - void execute(SampleCount nframes, FrameTime start, FrameTime end); - void post_process(); - -private: - enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH }; - - int _voice_num; - string _port_path; - float _val; - Port* _port; - ErrorType _error; -}; - - -} // namespace Ingen - -#endif // SETPORTVALUEQUEUEDEVENT_H diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.hpp b/src/libs/engine/events/SetPortValueQueuedEvent.hpp new file mode 100644 index 00000000..a0e01910 --- /dev/null +++ b/src/libs/engine/events/SetPortValueQueuedEvent.hpp @@ -0,0 +1,58 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SETPORTVALUEQUEUEDEVENT_H +#define SETPORTVALUEQUEUEDEVENT_H + +#include "QueuedEvent.hpp" +#include "types.hpp" +#include +using std::string; + +namespace Ingen { + +class Port; + + +/** An event to change the value of a port. + * + * \ingroup engine + */ +class SetPortValueQueuedEvent : public QueuedEvent +{ +public: + SetPortValueQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, const string& port_path, Sample val); + SetPortValueQueuedEvent(Engine& engine, SharedPtr responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val); + + void pre_process(); + void execute(SampleCount nframes, FrameTime start, FrameTime end); + void post_process(); + +private: + enum ErrorType { NO_ERROR, PORT_NOT_FOUND, TYPE_MISMATCH }; + + int _voice_num; + string _port_path; + float _val; + Port* _port; + ErrorType _error; +}; + + +} // namespace Ingen + +#endif // SETPORTVALUEQUEUEDEVENT_H diff --git a/src/libs/engine/events/UnregisterClientEvent.cpp b/src/libs/engine/events/UnregisterClientEvent.cpp index 4248fdcb..be03f151 100644 --- a/src/libs/engine/events/UnregisterClientEvent.cpp +++ b/src/libs/engine/events/UnregisterClientEvent.cpp @@ -15,11 +15,11 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "interface/ClientInterface.h" -#include "interface/Responder.h" -#include "UnregisterClientEvent.h" -#include "Engine.h" -#include "ClientBroadcaster.h" +#include "interface/ClientInterface.hpp" +#include "interface/Responder.hpp" +#include "UnregisterClientEvent.hpp" +#include "Engine.hpp" +#include "ClientBroadcaster.hpp" namespace Ingen { diff --git a/src/libs/engine/events/UnregisterClientEvent.h b/src/libs/engine/events/UnregisterClientEvent.h deleted file mode 100644 index 159bd160..00000000 --- a/src/libs/engine/events/UnregisterClientEvent.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of Ingen. - * Copyright (C) 2007 Dave Robillard - * - * Ingen is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) any later - * version. - * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef UNREGISTERCLIENTEVENT_H -#define UNREGISTERCLIENTEVENT_H - -#include "QueuedEvent.h" -#include "interface/ClientKey.h" -#include -using std::string; - -namespace Ingen { - -namespace Shared { - class ClientInterface; - class ClientKey; -} -using Shared::ClientInterface; -using Shared::ClientKey; - - -/** Unregisters an OSC client so it no longer receives notifications. - * - * \ingroup engine - */ -class UnregisterClientEvent : public QueuedEvent -{ -public: - UnregisterClientEvent(Engine& engine, - SharedPtr responder, - SampleCount timestamp, - ClientKey key); - - void post_process(); - -private: - ClientKey _key; -}; - - -} // namespace Ingen - -#endif // UNREGISTERCLIENTEVENT_H diff --git a/src/libs/engine/events/UnregisterClientEvent.hpp b/src/libs/engine/events/UnregisterClientEvent.hpp new file mode 100644 index 00000000..17d85b93 --- /dev/null +++ b/src/libs/engine/events/UnregisterClientEvent.hpp @@ -0,0 +1,57 @@ +/* This file is part of Ingen. + * Copyright (C) 2007 Dave Robillard + * + * Ingen is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef UNREGISTERCLIENTEVENT_H +#define UNREGISTERCLIENTEVENT_H + +#include "QueuedEvent.hpp" +#include "interface/ClientKey.hpp" +#include +using std::string; + +namespace Ingen { + +namespace Shared { + class ClientInterface; + class ClientKey; +} +using Shared::ClientInterface; +using Shared::ClientKey; + + +/** Unregisters an OSC client so it no longer receives notifications. + * + * \ingroup engine + */ +class UnregisterClientEvent : public QueuedEvent +{ +public: + UnregisterClientEvent(Engine& engine, + SharedPtr responder, + SampleCount timestamp, + ClientKey key); + + void post_process(); + +private: + ClientKey _key; +}; + + +} // namespace Ingen + +#endif // UNREGISTERCLIENTEVENT_H -- cgit v1.2.1