diff options
author | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-13 02:57:36 +0000 |
commit | 198560d5fd499ab14eb4e130ee74e21fa86674a4 (patch) | |
tree | eb7bd2ae2d19b6db2c28c79d1c7663fe5b1f49de /src/gui/Port.hpp | |
parent | 981c7950a6f5fc9f22decaee261556d20b641d5c (diff) | |
download | ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.gz ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.tar.bz2 ingen-198560d5fd499ab14eb4e130ee74e21fa86674a4.zip |
Make models const in client code.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3259 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Port.hpp')
-rw-r--r-- | src/gui/Port.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 116f31d4..a84f9e69 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -42,13 +42,13 @@ class Port : public FlowCanvas::Port public: static SharedPtr<Port> create( boost::shared_ptr<FlowCanvas::Module> module, - SharedPtr<PortModel> pm, + SharedPtr<const PortModel> pm, bool human_name, bool flip=false); ~Port(); - SharedPtr<PortModel> model() const { return _port_model.lock(); } + SharedPtr<const PortModel> model() const { return _port_model.lock(); } void create_menu(); void update_metadata(); @@ -63,9 +63,9 @@ public: private: Port(boost::shared_ptr<FlowCanvas::Module> module, - SharedPtr<PortModel> pm, + SharedPtr<const PortModel> pm, const std::string& name, - bool flip=false); + bool flip = false); void property_changed(const Raul::URI& key, const Raul::Atom& value); @@ -74,9 +74,9 @@ private: static ArtVpathDash* _dash; - WeakPtr<PortModel> _port_model; - bool _pressed; - bool _flipped; + WeakPtr<const PortModel> _port_model; + bool _pressed; + bool _flipped; }; } // namespace GUI |