From 3dd4b42f3054f819c865e9415c4b86ba78d43aec Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 11 May 2012 03:56:54 +0000 Subject: "Connection" => "Edge" git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4345 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/Connection.hpp | 39 -------------------------------------- ingen/Edge.hpp | 39 ++++++++++++++++++++++++++++++++++++++ ingen/Patch.hpp | 10 +++++----- ingen/client/EdgeModel.hpp | 4 ++-- ingen/client/PatchModel.hpp | 18 +++++++++--------- ingen/serialisation/Serialiser.hpp | 6 +++--- 6 files changed, 58 insertions(+), 58 deletions(-) delete mode 100644 ingen/Connection.hpp create mode 100644 ingen/Edge.hpp (limited to 'ingen') diff --git a/ingen/Connection.hpp b/ingen/Connection.hpp deleted file mode 100644 index 7ff34847..00000000 --- a/ingen/Connection.hpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - This file is part of Ingen. - Copyright 2007-2012 David Robillard - - Ingen is free software: you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free - Software Foundation, either version 3 of the License, or 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 Affero General Public License for details. - - You should have received a copy of the GNU Affero General Public License - along with Ingen. If not, see . -*/ - -#ifndef INGEN_INTERFACE_CONNECTION_HPP -#define INGEN_INTERFACE_CONNECTION_HPP - -namespace Raul { class Path; } - -namespace Ingen { - -/** A connection between two ports. - * - * \ingroup interface - */ -class Connection -{ -public: - virtual ~Connection() {} - - virtual const Raul::Path& tail_path() const = 0; - virtual const Raul::Path& head_path() const = 0; -}; - -} // namespace Ingen - -#endif // INGEN_INTERFACE_CONNECTION_HPP diff --git a/ingen/Edge.hpp b/ingen/Edge.hpp new file mode 100644 index 00000000..66e9c21b --- /dev/null +++ b/ingen/Edge.hpp @@ -0,0 +1,39 @@ +/* + This file is part of Ingen. + Copyright 2007-2012 David Robillard + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or 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 Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see . +*/ + +#ifndef INGEN_INTERFACE_EDGE_HPP +#define INGEN_INTERFACE_EDGE_HPP + +namespace Raul { class Path; } + +namespace Ingen { + +/** A connection between two ports. + * + * \ingroup interface + */ +class Edge +{ +public: + virtual ~Edge() {} + + virtual const Raul::Path& tail_path() const = 0; + virtual const Raul::Path& head_path() const = 0; +}; + +} // namespace Ingen + +#endif // INGEN_INTERFACE_EDGE_HPP diff --git a/ingen/Patch.hpp b/ingen/Patch.hpp index 807b843a..c0056f44 100644 --- a/ingen/Patch.hpp +++ b/ingen/Patch.hpp @@ -26,19 +26,19 @@ namespace Ingen { -class Connection; +class Edge; -/** A Path (graph of Nodes/Connections) +/** A Path (graph of Nodes/Edges) * * \ingroup interface */ class Patch : virtual public Node { public: - typedef std::pair ConnectionsKey; - typedef std::map< ConnectionsKey, SharedPtr > Connections; + typedef std::pair EdgesKey; + typedef std::map< EdgesKey, SharedPtr > Edges; - virtual const Connections& connections() const = 0; + virtual const Edges& edges() const = 0; virtual bool enabled() const = 0; virtual uint32_t internal_poly() const = 0; diff --git a/ingen/client/EdgeModel.hpp b/ingen/client/EdgeModel.hpp index 9b409e92..83faa25f 100644 --- a/ingen/client/EdgeModel.hpp +++ b/ingen/client/EdgeModel.hpp @@ -22,7 +22,7 @@ #include "raul/Path.hpp" #include "raul/SharedPtr.hpp" -#include "ingen/Connection.hpp" +#include "ingen/Edge.hpp" #include "ingen/client/PortModel.hpp" namespace Ingen { @@ -34,7 +34,7 @@ class ClientStore; * * \ingroup IngenClient */ -class EdgeModel : public Connection +class EdgeModel : public Edge { public: SharedPtr tail() const { return _tail; } diff --git a/ingen/client/PatchModel.hpp b/ingen/client/PatchModel.hpp index 1ea822bb..af5ecb2f 100644 --- a/ingen/client/PatchModel.hpp +++ b/ingen/client/PatchModel.hpp @@ -40,10 +40,10 @@ class PatchModel : public NodeModel, public Ingen::Patch public: /* WARNING: Copy constructor creates a shallow copy WRT connections */ - const Connections& connections() const { return *_connections.get(); } + const Edges& edges() const { return *_edges.get(); } - SharedPtr get_connection(const Ingen::Port* tail, - const Ingen::Port* head); + SharedPtr get_edge(const Ingen::Port* tail, + const Ingen::Port* head); bool enabled() const; bool polyphonic() const; @@ -52,15 +52,15 @@ public: // Signals INGEN_SIGNAL(new_node, void, SharedPtr); INGEN_SIGNAL(removed_node, void, SharedPtr); - INGEN_SIGNAL(new_connection, void, SharedPtr); - INGEN_SIGNAL(removed_connection, void, SharedPtr); + INGEN_SIGNAL(new_edge, void, SharedPtr); + INGEN_SIGNAL(removed_edge, void, SharedPtr); private: friend class ClientStore; PatchModel(Shared::URIs& uris, const Raul::Path& patch_path) : NodeModel(uris, "http://drobilla.net/ns/ingen#Patch", patch_path) - , _connections(new Connections()) + , _edges(new Edges()) { } @@ -68,11 +68,11 @@ private: void add_child(SharedPtr c); bool remove_child(SharedPtr c); - void add_connection(SharedPtr cm); - void remove_connection(const Ingen::Port* tail, + void add_edge(SharedPtr cm); + void remove_edge(const Ingen::Port* tail, const Ingen::Port* head); - SharedPtr _connections; + SharedPtr _edges; }; } // namespace Client diff --git a/ingen/serialisation/Serialiser.hpp b/ingen/serialisation/Serialiser.hpp index cfc11c02..b09c194a 100644 --- a/ingen/serialisation/Serialiser.hpp +++ b/ingen/serialisation/Serialiser.hpp @@ -34,7 +34,7 @@ class GraphObject; class Patch; class Node; class Port; -class Connection; +class Edge; namespace Shared { class World; @@ -69,8 +69,8 @@ public: virtual void serialise(SharedPtr object) throw (std::logic_error); - virtual void serialise_connection(const Sord::Node& parent, - SharedPtr c) throw (std::logic_error); + virtual void serialise_edge(const Sord::Node& parent, + SharedPtr c) throw (std::logic_error); virtual std::string finish(); -- cgit v1.2.1