summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeBase.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 19:26:47 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 19:26:47 +0000
commitbb1c49dfa484db080938cff6f8f70167c9026a1c (patch)
tree6f6382fcbfddfead6d5c32d19977aed8020d32e4 /src/libs/engine/NodeBase.h
parentf0f64e4425acfb8b8633a47faa70f87fc32a4399 (diff)
downloadingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.tar.gz
ingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.tar.bz2
ingen-bb1c49dfa484db080938cff6f8f70167c9026a1c.zip
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
Diffstat (limited to 'src/libs/engine/NodeBase.h')
-rw-r--r--src/libs/engine/NodeBase.h108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/libs/engine/NodeBase.h b/src/libs/engine/NodeBase.h
deleted file mode 100644
index a1372f19..00000000
--- a/src/libs/engine/NodeBase.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * 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 NODEBASE_H
-#define NODEBASE_H
-
-#include "types.h"
-#include <string>
-#include <cstdlib>
-#include "Node.h"
-
-using std::string;
-
-namespace Ingen {
-
-class Plugin;
-class Patch;
-class ObjectStore;
-
-namespace Shared {
- class ClientInterface;
-} using Shared::ClientInterface;
-
-
-/** Common implementation stuff for Node.
- *
- * Pretty much just attributes and getters/setters are here.
- *
- * \ingroup engine
- */
-class NodeBase : public Node
-{
-public:
- NodeBase(const Plugin* plugin, const string& name, size_t poly, Patch* parent, SampleRate srate, size_t buffer_size);
-
- virtual ~NodeBase();
-
- virtual void activate();
- virtual void deactivate();
- bool activated() { return _activated; }
-
- virtual void post_process(SampleCount nframes, FrameTime start, FrameTime end);
- virtual void process(SampleCount nframes, FrameTime start, FrameTime end) = 0;
- virtual void pre_process(SampleCount nframes, FrameTime start, FrameTime end);
-
- virtual void set_port_buffer(size_t voice, size_t port_num, Buffer* buf) {}
-
- virtual void set_buffer_size(size_t size);
-
- void add_to_store(ObjectStore* store);
- void remove_from_store();
-
- SampleRate sample_rate() const { return _srate; }
- size_t buffer_size() const { return _buffer_size; }
- size_t num_ports() const { return _ports ? _ports->size() : 0; }
- size_t poly() const { return _poly; }
- bool traversed() const { return _traversed; }
- void traversed(bool b) { _traversed = b; }
-
- const Raul::Array<Port*>& ports() const { return *_ports; }
-
- virtual Raul::List<Node*>* providers() { return _providers; }
- virtual void providers(Raul::List<Node*>* l) { _providers = l; }
-
- virtual Raul::List<Node*>* dependants() { return _dependants; }
- virtual void dependants(Raul::List<Node*>* l) { _dependants = l; }
-
- virtual const Plugin* plugin() const { return _plugin; }
-
- virtual void set_path(const Path& new_path);
-
- /** A node's parent is always a patch, so static cast should be safe */
- Patch* parent_patch() const { return (Patch*)_parent; }
-
-protected:
- const Plugin* _plugin;
-
- size_t _poly;
-
- SampleRate _srate;
- size_t _buffer_size;
- bool _activated;
-
- Raul::Array<Port*>* _ports; ///< Access in audio thread only
-
- bool _traversed; ///< Flag for process order algorithm
- Raul::List<Node*>* _providers; ///< Nodes connected to this one's input ports
- Raul::List<Node*>* _dependants; ///< Nodes this one's output ports are connected to
-};
-
-
-} // namespace Ingen
-
-#endif // NODEBASE_H