From 79275fc579c0dbe1ce4ca109edb95f2c1e0802a5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 29 Dec 2012 20:34:32 +0000 Subject: "edge" => "arc". git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4897 a436a847-0d15-0410-975c-d299462d15a1 --- ingen/Arc.hpp | 39 ++++++++++++++++++++++ ingen/AtomWriter.hpp | 2 +- ingen/Edge.hpp | 39 ---------------------- ingen/Node.hpp | 12 +++---- ingen/URIs.hpp | 4 +-- ingen/client/ArcModel.hpp | 67 ++++++++++++++++++++++++++++++++++++++ ingen/client/EdgeModel.hpp | 67 -------------------------------------- ingen/client/GraphModel.hpp | 16 ++++----- ingen/serialisation/Serialiser.hpp | 6 ++-- 9 files changed, 126 insertions(+), 126 deletions(-) create mode 100644 ingen/Arc.hpp delete mode 100644 ingen/Edge.hpp create mode 100644 ingen/client/ArcModel.hpp delete mode 100644 ingen/client/EdgeModel.hpp (limited to 'ingen') diff --git a/ingen/Arc.hpp b/ingen/Arc.hpp new file mode 100644 index 00000000..69c65586 --- /dev/null +++ b/ingen/Arc.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_ARC_HPP +#define INGEN_ARC_HPP + +#include "raul/Deletable.hpp" + +namespace Raul { class Path; } + +namespace Ingen { + +/** A connection between two ports. + * + * @ingroup Ingen + */ +class Arc : public Raul::Deletable +{ +public: + virtual const Raul::Path& tail_path() const = 0; + virtual const Raul::Path& head_path() const = 0; +}; + +} // namespace Ingen + +#endif // INGEN_ARC_HPP diff --git a/ingen/AtomWriter.hpp b/ingen/AtomWriter.hpp index 00b64b54..4e3e489a 100644 --- a/ingen/AtomWriter.hpp +++ b/ingen/AtomWriter.hpp @@ -81,7 +81,7 @@ public: private: void forge_uri(const Raul::URI& uri); void forge_properties(const Resource::Properties& properties); - void forge_edge(const Raul::Path& tail, const Raul::Path& head); + void forge_arc(const Raul::Path& tail, const Raul::Path& head); void finish_msg(); int32_t next_id(); diff --git a/ingen/Edge.hpp b/ingen/Edge.hpp deleted file mode 100644 index a586783b..00000000 --- a/ingen/Edge.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_EDGE_HPP -#define INGEN_EDGE_HPP - -#include "raul/Deletable.hpp" - -namespace Raul { class Path; } - -namespace Ingen { - -/** A connection between two ports. - * - * @ingroup Ingen - */ -class Edge : public Raul::Deletable -{ -public: - virtual const Raul::Path& tail_path() const = 0; - virtual const Raul::Path& head_path() const = 0; -}; - -} // namespace Ingen - -#endif // INGEN_EDGE_HPP diff --git a/ingen/Node.hpp b/ingen/Node.hpp index db796ef7..42e21ee3 100644 --- a/ingen/Node.hpp +++ b/ingen/Node.hpp @@ -29,7 +29,7 @@ class Symbol; namespace Ingen { -class Edge; +class Arc; class Plugin; class Store; @@ -54,12 +54,12 @@ public: PORT }; - typedef std::pair EdgesKey; - typedef std::map< EdgesKey, SharedPtr > Edges; + typedef std::pair ArcsKey; + typedef std::map< ArcsKey, SharedPtr > Arcs; // Graphs only - Edges& edges() { return _edges; } - const Edges& edges() const { return _edges; } + Arcs& arcs() { return _arcs; } + const Arcs& arcs() const { return _arcs; } // Blocks and graphs only virtual uint32_t num_ports() const { return 0; } @@ -97,7 +97,7 @@ protected: : Resource(uris, path_to_uri(path)) {} - Edges _edges; ///< Graphs only + Arcs _arcs; ///< Graphs only }; } // namespace Ingen diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp index 9cea37a8..3e6427e6 100644 --- a/ingen/URIs.hpp +++ b/ingen/URIs.hpp @@ -73,18 +73,18 @@ public: const Quark bufsz_minBlockLength; const Quark bufsz_sequenceSize; const Quark doap_name; + const Quark ingen_Arc; const Quark ingen_Block; - const Quark ingen_Edge; const Quark ingen_Graph; const Quark ingen_Internal; const Quark ingen_activity; + const Quark ingen_arc; const Quark ingen_block; const Quark ingen_broadcast; const Quark ingen_canvasX; const Quark ingen_canvasY; const Quark ingen_controlBinding; const Quark ingen_document; - const Quark ingen_edge; const Quark ingen_enabled; const Quark ingen_engine; const Quark ingen_head; diff --git a/ingen/client/ArcModel.hpp b/ingen/client/ArcModel.hpp new file mode 100644 index 00000000..99d5afa0 --- /dev/null +++ b/ingen/client/ArcModel.hpp @@ -0,0 +1,67 @@ +/* + 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_CLIENT_ARCMODEL_HPP +#define INGEN_CLIENT_ARCMODEL_HPP + +#include + +#include "raul/Path.hpp" +#include "raul/SharedPtr.hpp" + +#include "ingen/Arc.hpp" +#include "ingen/client/PortModel.hpp" + +namespace Ingen { +namespace Client { + +class ClientStore; + +/** Class to represent a port->port connections in the engine. + * + * @ingroup IngenClient + */ +class ArcModel : public Arc +{ +public: + SharedPtr tail() const { return _tail; } + SharedPtr head() const { return _head; } + + const Raul::Path& tail_path() const { return _tail->path(); } + const Raul::Path& head_path() const { return _head->path(); } + +private: + friend class ClientStore; + + ArcModel(SharedPtr tail, SharedPtr head) + : _tail(tail) + , _head(head) + { + assert(_tail); + assert(_head); + assert(_tail->parent()); + assert(_head->parent()); + assert(_tail->path() != _head->path()); + } + + const SharedPtr _tail; + const SharedPtr _head; +}; + +} // namespace Client +} // namespace Ingen + +#endif // INGEN_CLIENT_ARCMODEL_HPP diff --git a/ingen/client/EdgeModel.hpp b/ingen/client/EdgeModel.hpp deleted file mode 100644 index 9006dd80..00000000 --- a/ingen/client/EdgeModel.hpp +++ /dev/null @@ -1,67 +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_CLIENT_EDGEMODEL_HPP -#define INGEN_CLIENT_EDGEMODEL_HPP - -#include - -#include "raul/Path.hpp" -#include "raul/SharedPtr.hpp" - -#include "ingen/Edge.hpp" -#include "ingen/client/PortModel.hpp" - -namespace Ingen { -namespace Client { - -class ClientStore; - -/** Class to represent a port->port connections in the engine. - * - * @ingroup IngenClient - */ -class EdgeModel : public Edge -{ -public: - SharedPtr tail() const { return _tail; } - SharedPtr head() const { return _head; } - - const Raul::Path& tail_path() const { return _tail->path(); } - const Raul::Path& head_path() const { return _head->path(); } - -private: - friend class ClientStore; - - EdgeModel(SharedPtr tail, SharedPtr head) - : _tail(tail) - , _head(head) - { - assert(_tail); - assert(_head); - assert(_tail->parent()); - assert(_head->parent()); - assert(_tail->path() != _head->path()); - } - - const SharedPtr _tail; - const SharedPtr _head; -}; - -} // namespace Client -} // namespace Ingen - -#endif // INGEN_CLIENT_EDGEMODEL_HPP diff --git a/ingen/client/GraphModel.hpp b/ingen/client/GraphModel.hpp index d527eb82..a721dc37 100644 --- a/ingen/client/GraphModel.hpp +++ b/ingen/client/GraphModel.hpp @@ -23,8 +23,8 @@ namespace Ingen { namespace Client { +class ArcModel; class ClientStore; -class EdgeModel; /** Client's model of a graph. * @@ -37,8 +37,8 @@ public: GraphType graph_type() const { return Node::GRAPH; } - SharedPtr get_edge(const Ingen::Node* tail, - const Ingen::Node* head); + SharedPtr get_arc(const Ingen::Node* tail, + const Ingen::Node* head); bool enabled() const; bool polyphonic() const; @@ -47,8 +47,8 @@ public: // Signals INGEN_SIGNAL(new_block, void, SharedPtr); INGEN_SIGNAL(removed_block, void, SharedPtr); - INGEN_SIGNAL(new_edge, void, SharedPtr); - INGEN_SIGNAL(removed_edge, void, SharedPtr); + INGEN_SIGNAL(new_arc, void, SharedPtr); + INGEN_SIGNAL(removed_arc, void, SharedPtr); private: friend class ClientStore; @@ -61,9 +61,9 @@ private: void add_child(SharedPtr c); bool remove_child(SharedPtr c); - void add_edge(SharedPtr cm); - void remove_edge(const Ingen::Node* tail, - const Ingen::Node* head); + void add_arc(SharedPtr arc); + void remove_arc(const Ingen::Node* tail, + const Ingen::Node* head); }; } // namespace Client diff --git a/ingen/serialisation/Serialiser.hpp b/ingen/serialisation/Serialiser.hpp index a694e800..979fee62 100644 --- a/ingen/serialisation/Serialiser.hpp +++ b/ingen/serialisation/Serialiser.hpp @@ -29,7 +29,7 @@ namespace Ingen { -class Edge; +class Arc; class Node; class Store; class World; @@ -64,8 +64,8 @@ public: virtual void serialise(SharedPtr object) throw (std::logic_error); - virtual void serialise_edge(const Sord::Node& parent, - SharedPtr c) + virtual void serialise_arc(const Sord::Node& parent, + SharedPtr arc) throw (std::logic_error); virtual std::string finish(); -- cgit v1.2.1