summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/BridgeNode.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-19 00:32:15 +0000
committerDavid Robillard <d@drobilla.net>2006-06-19 00:32:15 +0000
commit3bb7c1a7eef744d17e436522a3dc0ed8527a427e (patch)
tree62f9e596c21d5ad294f3c95e0c29e074db89567f /src/libs/engine/BridgeNode.cpp
parentd2042e04de9ba3ab962890d228ad2adf84a0d728 (diff)
downloadingen-3bb7c1a7eef744d17e436522a3dc0ed8527a427e.tar.gz
ingen-3bb7c1a7eef744d17e436522a3dc0ed8527a427e.tar.bz2
ingen-3bb7c1a7eef744d17e436522a3dc0ed8527a427e.zip
Ditched ghetto homebrew RTTI in favour of the real deal;
removed BridgeNode crap git-svn-id: http://svn.drobilla.net/lad/grauph@58 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/BridgeNode.cpp')
-rw-r--r--src/libs/engine/BridgeNode.cpp159
1 files changed, 0 insertions, 159 deletions
diff --git a/src/libs/engine/BridgeNode.cpp b/src/libs/engine/BridgeNode.cpp
deleted file mode 100644
index 776bcc92..00000000
--- a/src/libs/engine/BridgeNode.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/* This file is part of Om. Copyright (C) 2006 Dave Robillard.
- *
- * Om 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.
- *
- * Om 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.,
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "BridgeNode.h"
-//#include "ClientBroadcaster.h"
-#include "Plugin.h"
-#include "Patch.h"
-#include "Om.h"
-#include "OmApp.h"
-#include "Maid.h"
-#include "Driver.h"
-#include "PortInfo.h"
-#include <cassert>
-
-namespace Om {
-
-template <typename T>
-BridgeNode<T>::BridgeNode(const string& path, size_t poly, Patch* parent, samplerate srate, size_t buffer_size)
-: InternalNode(path,
- (parent->parent_patch() == NULL || poly != parent->parent_patch()->poly()) ? 1 : poly,
- //poly,
- parent, srate, buffer_size),
- m_driver_port(NULL),
- m_listnode(NULL),
- m_external_port(NULL)
-{
- //cerr << "Creating bridge node " << path << " - polyphony: " << m_poly << endl;
- m_listnode = new ListNode<InternalNode*>(this);
-}
-template
-BridgeNode<sample>::BridgeNode(const string& path, size_t poly, Patch* parent, samplerate srate, size_t buffer_size);
-template
-BridgeNode<MidiMessage>::BridgeNode(const string& path, size_t poly, Patch* parent, samplerate srate, size_t buffer_size);
-
-
-template <typename T>
-BridgeNode<T>::~BridgeNode()
-{
- delete m_driver_port;
-}
-template BridgeNode<sample>::~BridgeNode();
-template BridgeNode<MidiMessage>::~BridgeNode();
-
-
-template <typename T>
-void
-BridgeNode<T>::activate()
-{
- assert(om->template driver<T>() != NULL);
- assert(m_external_port != NULL); // Derived classes must create this
- assert(parent_patch() != NULL);
-
- if (parent_patch()->parent() == NULL && om != NULL)
- m_driver_port = om->template driver<T>()->create_port(m_external_port);
-
- InternalNode::activate();
-}
-
-
-template <typename T>
-void
-BridgeNode<T>::deactivate()
-{
- if (m_is_added)
- remove_from_patch();
-
- InternalNode::deactivate();
-
- if (m_driver_port != NULL) {
- delete m_driver_port;
- m_driver_port = NULL;
- }
-}
-
-
-template <typename T>
-void
-BridgeNode<T>::add_to_patch()
-{
- assert(parent_patch() != NULL);
-
- parent_patch()->add_bridge_node(m_listnode);
-
- InternalNode::add_to_patch();
-
- // Activate driver port now in the audio thread (not before when created, to avoid race issues)
- if (m_driver_port != NULL)
- m_driver_port->add_to_driver();
-}
-
-
-template <typename T>
-void
-BridgeNode<T>::remove_from_patch()
-{
- assert(parent_patch() != NULL);
-
- if (m_is_added) {
- if (m_driver_port != NULL)
- m_driver_port->remove_from_driver();
- ListNode<InternalNode*>* ln = NULL;
- ln = parent_patch()->remove_bridge_node(this);
-
- om->maid()->push(ln);
- m_listnode = NULL;
-
- }
- InternalNode::remove_from_patch();
-}
-
-
-template <typename T>
-void
-BridgeNode<T>::set_path(const Path& new_path)
-{
- InternalNode::set_path(new_path);
-
- m_external_port->set_path(new_path);
-
- if (m_driver_port != NULL)
- m_driver_port->set_name(path().c_str());
-}
-
-
-#if 0
-template <typename T>
-void
-BridgeNode<T>::send_creation_messages(ClientInterface* client) const
-{
- InternalNode::send_creation_messages(client);
- om->client_broadcaster()->send_new_port_to(client, m_external_port);
-
- // Send metadata
- for (map<string, string>::const_iterator i = metadata().begin(); i != metadata().end(); ++i)
- om->client_broadcaster()->send_metadata_update_to(client, path(), (*i).first, (*i).second);
-
- // Send control value (if necessary)
- //if (m_external_port->port_info()->is_control())
- // om->client_broadcaster()->send_control_change_to(client, path(),
- // ((PortBase<sample>*)m_external_port)->buffer(0)->value_at(0));
-}
-#endif
-
-
-} // namespace Om
-