From e0743e9d9b15fb2731e26bf5700413c083a89186 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Aug 2008 06:50:15 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/ingen@1415 a436a847-0d15-0410-975c-d299462d15a1 --- src/common/interface/GraphObject.hpp | 2 ++ src/libs/client/ObjectModel.cpp | 4 ++-- src/libs/client/ObjectModel.hpp | 6 +++--- src/libs/client/PatchModel.cpp | 2 +- src/libs/engine/GraphObjectImpl.hpp | 10 +++++----- src/libs/engine/LADSPANode.cpp | 3 +-- src/libs/engine/PluginImpl.cpp | 4 ++-- src/libs/gui/PatchPortModule.cpp | 2 +- src/libs/gui/PatchView.cpp | 2 +- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/common/interface/GraphObject.hpp b/src/common/interface/GraphObject.hpp index e5a92d48..fa7be25a 100644 --- a/src/common/interface/GraphObject.hpp +++ b/src/common/interface/GraphObject.hpp @@ -43,12 +43,14 @@ class GraphObject : public Raul::Deletable { public: typedef std::map Variables; + typedef std::map Properties; typedef PathTable< SharedPtr >::const_iterator const_iterator; virtual const Raul::Path path() const = 0; virtual const Raul::Symbol symbol() const = 0; virtual const Variables& variables() const = 0; + virtual const Properties& properties() const = 0; virtual bool polyphonic() const = 0; // FIXME: return WeakPtr, and stupid name diff --git a/src/libs/client/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp index c9236c9e..0afb9ad8 100644 --- a/src/libs/client/ObjectModel.cpp +++ b/src/libs/client/ObjectModel.cpp @@ -63,7 +63,7 @@ ObjectModel::get_property(const string& key) const { static const Atom null_atom; - Variables::const_iterator i = _properties.find(key); + Properties::const_iterator i = _properties.find(key); if (i != _properties.end()) return i->second; else @@ -74,7 +74,7 @@ ObjectModel::get_property(const string& key) const bool ObjectModel::polyphonic() const { - Variables::const_iterator i = _properties.find("ingen:polyphonic"); + Properties::const_iterator i = _properties.find("ingen:polyphonic"); return (i != _properties.end() && i->second.type() == Atom::BOOL && i->second.get_bool()); } diff --git a/src/libs/client/ObjectModel.hpp b/src/libs/client/ObjectModel.hpp index b0796275..2b465fe8 100644 --- a/src/libs/client/ObjectModel.hpp +++ b/src/libs/client/ObjectModel.hpp @@ -69,7 +69,7 @@ public: { _properties[key] = value; signal_property.emit(key, value); } const Variables& variables() const { return _variables; } - const Variables& properties() const { return _properties; } + const Properties& properties() const { return _properties; } const Path path() const { return _path; } const Symbol symbol() const { return _path.name(); } SharedPtr parent() const { return _parent; } @@ -100,8 +100,8 @@ protected: Path _path; SharedPtr _parent; - Variables _variables; - Variables _properties; + Variables _variables; + Properties _properties; }; diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp index 4fe0e641..9b109bd6 100644 --- a/src/libs/client/PatchModel.cpp +++ b/src/libs/client/PatchModel.cpp @@ -163,7 +163,7 @@ PatchModel::remove_connection(const string& src_port_path, const string& dst_por bool PatchModel::enabled() const { - Variables::const_iterator i = _properties.find("ingen:enabled"); + Properties::const_iterator i = _properties.find("ingen:enabled"); return (i != _properties.end() && i->second.type() == Atom::BOOL && i->second.get_bool()); } diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp index 628db3db..d1896b1b 100644 --- a/src/libs/engine/GraphObjectImpl.hpp +++ b/src/libs/engine/GraphObjectImpl.hpp @@ -81,12 +81,12 @@ public: const Atom& get_property(const std::string& key) { static Atom null_atom; - Variables::iterator i = _properties.find(key); + Properties::iterator i = _properties.find(key); return (i != _properties.end()) ? (*i).second : null_atom; } - const Variables& variables() const { return _variables; } - const Variables& properties() const { return _properties; } + const Variables& variables() const { return _variables; } + const Properties& properties() const { return _properties; } /** The Patch this object is a child of. */ virtual PatchImpl* parent_patch() const; @@ -117,8 +117,8 @@ protected: bool _polyphonic; private: - Variables _variables; - Variables _properties; + Variables _variables; + Properties _properties; }; diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp index 83c3d6af..22f5bbf3 100644 --- a/src/libs/engine/LADSPANode.cpp +++ b/src/libs/engine/LADSPANode.cpp @@ -112,8 +112,7 @@ nameify_if_invalid(const string& name) const string new_name = Path::nameify(name); assert(Path::is_valid_name(new_name)); if (new_name != name) - cerr << "WARNING: Illegal LADSPA port name '" - << name << "' converted to '" << new_name << "'" << endl; + cerr << "Symbol '" << new_name << "' generated from LADSPA name '" << name << endl; return new_name; } } diff --git a/src/libs/engine/PluginImpl.cpp b/src/libs/engine/PluginImpl.cpp index 709f18bd..215cf4ce 100644 --- a/src/libs/engine/PluginImpl.cpp +++ b/src/libs/engine/PluginImpl.cpp @@ -31,7 +31,7 @@ void PluginImpl::load() { if (!_module) { - cerr << "Loading " << _library_path << " library" << endl; + //cerr << "Loading " << _library_path << " library" << endl; _module = new Glib::Module(_library_path, Glib::MODULE_BIND_LOCAL); if (!(*_module)) delete _module; @@ -43,7 +43,7 @@ void PluginImpl::unload() { if (_module) { - cerr << "Unloading " << _library_path << endl; + //cerr << "Unloading " << _library_path << endl; delete _module; _module = NULL; } diff --git a/src/libs/gui/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp index 75504a91..ec083c1b 100644 --- a/src/libs/gui/PatchPortModule.cpp +++ b/src/libs/gui/PatchPortModule.cpp @@ -79,7 +79,7 @@ PatchPortModule::create(boost::shared_ptr canvas, SharedPtrvariables().begin(); m != port->variables().end(); ++m) ret->set_variable(m->first, m->second); - for (GraphObject::Variables::const_iterator m = port->properties().begin(); m != port->properties().end(); ++m) + for (GraphObject::Properties::const_iterator m = port->properties().begin(); m != port->properties().end(); ++m) ret->set_property(m->first, m->second); ret->resize(); diff --git a/src/libs/gui/PatchView.cpp b/src/libs/gui/PatchView.cpp index 0ffe1191..13689806 100644 --- a/src/libs/gui/PatchView.cpp +++ b/src/libs/gui/PatchView.cpp @@ -80,7 +80,7 @@ PatchView::set_patch(SharedPtr patch) _poly_spin->set_value(patch->poly()); _destroy_but->set_sensitive(patch->path() != "/"); - for (GraphObject::Variables::const_iterator i = patch->properties().begin(); + for (GraphObject::Properties::const_iterator i = patch->properties().begin(); i != patch->properties().end(); ++i) property_changed(i->first, i->second); -- cgit v1.2.1