summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-09-23 19:06:25 +0200
committerDavid Robillard <d@drobilla.net>2018-09-23 19:06:25 +0200
commit04b4d70f38402b1e4e4751157f42eb558bd60f9c (patch)
tree7046ce56d1fb498f5e8720c5fb59ae9895fecb39 /ingen
parent394b01da8e26dbe1b6a0520944d954ca0b16b1b5 (diff)
downloadingen-04b4d70f38402b1e4e4751157f42eb558bd60f9c.tar.gz
ingen-04b4d70f38402b1e4e4751157f42eb558bd60f9c.tar.bz2
ingen-04b4d70f38402b1e4e4751157f42eb558bd60f9c.zip
Use override specifiers
Diffstat (limited to 'ingen')
-rw-r--r--ingen/client/ArcModel.hpp4
-rw-r--r--ingen/client/BlockModel.hpp22
-rw-r--r--ingen/client/GraphModel.hpp8
-rw-r--r--ingen/client/ObjectModel.hpp19
-rw-r--r--ingen/client/PluginModel.hpp2
-rw-r--r--ingen/client/PortModel.hpp10
6 files changed, 33 insertions, 32 deletions
diff --git a/ingen/client/ArcModel.hpp b/ingen/client/ArcModel.hpp
index 84b989a0..3016266e 100644
--- a/ingen/client/ArcModel.hpp
+++ b/ingen/client/ArcModel.hpp
@@ -41,8 +41,8 @@ public:
SPtr<PortModel> tail() const { return _tail; }
SPtr<PortModel> head() const { return _head; }
- const Raul::Path& tail_path() const { return _tail->path(); }
- const Raul::Path& head_path() const { return _head->path(); }
+ const Raul::Path& tail_path() const override { return _tail->path(); }
+ const Raul::Path& head_path() const override { return _head->path(); }
private:
friend class ClientStore;
diff --git a/ingen/client/BlockModel.hpp b/ingen/client/BlockModel.hpp
index da1da734..4dfd35d7 100644
--- a/ingen/client/BlockModel.hpp
+++ b/ingen/client/BlockModel.hpp
@@ -49,21 +49,21 @@ public:
BlockModel(const BlockModel& copy);
virtual ~BlockModel();
- GraphType graph_type() const { return Node::GraphType::BLOCK; }
+ GraphType graph_type() const override { return Node::GraphType::BLOCK; }
typedef std::vector< SPtr<const PortModel> > Ports;
SPtr<const PortModel> get_port(const Raul::Symbol& symbol) const;
SPtr<const PortModel> get_port(uint32_t index) const;
- Node* port(uint32_t index) const;
+ Node* port(uint32_t index) const override;
- const URI& plugin_uri() const { return _plugin_uri; }
- const Resource* plugin() const { return _plugin.get(); }
- Resource* plugin() { return _plugin.get(); }
- SPtr<PluginModel> plugin_model() const { return _plugin; }
- uint32_t num_ports() const { return _ports.size(); }
- const Ports& ports() const { return _ports; }
+ const URI& plugin_uri() const { return _plugin_uri; }
+ const Resource* plugin() const override { return _plugin.get(); }
+ Resource* plugin() { return _plugin.get(); }
+ SPtr<PluginModel> plugin_model() const { return _plugin; }
+ uint32_t num_ports() const override { return _ports.size(); }
+ const Ports& ports() const { return _ports; }
void default_port_value_range(SPtr<const PortModel> port,
float& min,
@@ -93,12 +93,12 @@ protected:
const Raul::Path& path);
explicit BlockModel(const Raul::Path& path);
- void add_child(SPtr<ObjectModel> c);
- bool remove_child(SPtr<ObjectModel> c);
+ void add_child(SPtr<ObjectModel> c) override;
+ bool remove_child(SPtr<ObjectModel> c) override;
void add_port(SPtr<PortModel> pm);
void remove_port(SPtr<PortModel> port);
void remove_port(const Raul::Path& port_path);
- void set(SPtr<ObjectModel> model);
+ void set(SPtr<ObjectModel> model) override;
virtual void clear();
diff --git a/ingen/client/GraphModel.hpp b/ingen/client/GraphModel.hpp
index d5f4904a..659ded9e 100644
--- a/ingen/client/GraphModel.hpp
+++ b/ingen/client/GraphModel.hpp
@@ -36,7 +36,7 @@ class INGEN_API GraphModel : public BlockModel
public:
/* WARNING: Copy constructor creates a shallow copy WRT connections */
- GraphType graph_type() const { return Node::GraphType::GRAPH; }
+ GraphType graph_type() const override { return Node::GraphType::GRAPH; }
SPtr<ArcModel> get_arc(const ingen::Node* tail,
const ingen::Node* head);
@@ -58,9 +58,9 @@ private:
: BlockModel(uris, uris.ingen_Graph, graph_path)
{}
- void clear();
- void add_child(SPtr<ObjectModel> c);
- bool remove_child(SPtr<ObjectModel> o);
+ void clear() override;
+ void add_child(SPtr<ObjectModel> c) override;
+ bool remove_child(SPtr<ObjectModel> o) override;
void remove_arcs_on(SPtr<PortModel> p);
void add_arc(SPtr<ArcModel> arc);
diff --git a/ingen/client/ObjectModel.hpp b/ingen/client/ObjectModel.hpp
index 62b115e3..0c517ccf 100644
--- a/ingen/client/ObjectModel.hpp
+++ b/ingen/client/ObjectModel.hpp
@@ -57,17 +57,18 @@ class INGEN_API ObjectModel : public Node
public:
bool is_a(const URIs::Quark& type) const;
- const Atom& get_property(const URI& key) const;
+ const Atom& get_property(const URI& key) const override;
- void on_property(const URI& uri, const Atom& value);
- void on_property_removed(const URI& uri, const Atom& value);
+ void on_property(const URI& uri, const Atom& value) override;
+ void on_property_removed(const URI& uri, const Atom& value) override;
- const Raul::Path& path() const { return _path; }
- const Raul::Symbol& symbol() const { return _symbol; }
- SPtr<ObjectModel> parent() const { return _parent; }
- bool polyphonic() const;
+ const Raul::Path& path() const override { return _path; }
+ const Raul::Symbol& symbol() const override { return _symbol; }
- Node* graph_parent() const { return _parent.get(); }
+ SPtr<ObjectModel> parent() const { return _parent; }
+ bool polyphonic() const;
+
+ Node* graph_parent() const override { return _parent.get(); }
// Signals
INGEN_SIGNAL(new_child, void, SPtr<ObjectModel>);
@@ -83,7 +84,7 @@ protected:
ObjectModel(URIs& uris, const Raul::Path& path);
ObjectModel(const ObjectModel& copy);
- virtual void set_path(const Raul::Path& p);
+ void set_path(const Raul::Path& p) override;
virtual void set_parent(SPtr<ObjectModel> p);
virtual void add_child(SPtr<ObjectModel> c) {}
virtual bool remove_child(SPtr<ObjectModel> c) { return true; }
diff --git a/ingen/client/PluginModel.hpp b/ingen/client/PluginModel.hpp
index 381d289b..97fbd2a0 100644
--- a/ingen/client/PluginModel.hpp
+++ b/ingen/client/PluginModel.hpp
@@ -62,7 +62,7 @@ public:
: "http://www.w3.org/2002/07/owl#Nothing");
}
- virtual const Atom& get_property(const URI& key) const;
+ const Atom& get_property(const URI& key) const override;
Raul::Symbol default_block_symbol() const;
std::string human_name() const;
diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp
index a544b00b..fcb46c4f 100644
--- a/ingen/client/PortModel.hpp
+++ b/ingen/client/PortModel.hpp
@@ -40,7 +40,7 @@ class INGEN_API PortModel : public ObjectModel
public:
enum class Direction { INPUT, OUTPUT };
- GraphType graph_type() const { return Node::GraphType::PORT; }
+ GraphType graph_type() const override { return Node::GraphType::PORT; }
bool supports(const URIs::Quark& value_type) const;
@@ -63,7 +63,7 @@ public:
inline bool operator==(const PortModel& pm) const { return (path() == pm.path()); }
- void on_property(const URI& uri, const Atom& value);
+ void on_property(const URI& uri, const Atom& value) override;
// Signals
INGEN_SIGNAL(value_changed, void, const Atom&);
@@ -82,10 +82,10 @@ private:
, _direction(dir)
{}
- void add_child(SPtr<ObjectModel> c) { throw; }
- bool remove_child(SPtr<ObjectModel> c) { throw; }
+ void add_child(SPtr<ObjectModel> c) override { throw; }
+ bool remove_child(SPtr<ObjectModel> c) override { throw; }
- void set(SPtr<ObjectModel> model);
+ void set(SPtr<ObjectModel> model) override;
uint32_t _index;
Direction _direction;