summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-11-07 20:33:41 +0000
committerCarl Hetherington <carl@carlh.net>2009-11-07 20:33:41 +0000
commit660fd702af13ace2d0399e47d5e9a644a6e3a8d7 (patch)
tree3b3204fa23c82b246485e70d3e77001427edb6e7 /libs/ardour
parent040869db5c5681ee1b89fb1893fbb076d5216d42 (diff)
Various tweaks to the bundle manager.
git-svn-id: svn://localhost/ardour2/branches/3.0@6030 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/ardour/bundle.h21
-rw-r--r--libs/ardour/bundle.cc34
2 files changed, 41 insertions, 14 deletions
diff --git a/libs/ardour/ardour/bundle.h b/libs/ardour/ardour/bundle.h
index 0e80c5433d..0c7d6a5978 100644
--- a/libs/ardour/ardour/bundle.h
+++ b/libs/ardour/ardour/bundle.h
@@ -90,27 +90,18 @@ class Bundle : public sigc::trackable
void disconnect (boost::shared_ptr<Bundle>, AudioEngine &);
bool connected_to (boost::shared_ptr<Bundle>, AudioEngine &);
- /** Set the name.
- * @param n New name.
- */
- void set_name (std::string const & n) {
- _name = n;
- Changed (NameChanged);
- }
+ void set_name (std::string const &);
/** @return Bundle name */
std::string name () const { return _name; }
- /** Set the type of the ports in this Bundle.
- * @param t New type.
- */
- void set_type (DataType t) { _type = t; }
+ void set_type (DataType);
/** @return Type of the ports in this Bundle. */
DataType type () const { return _type; }
- void set_ports_are_inputs () { _ports_are_inputs = true; }
- void set_ports_are_outputs () { _ports_are_inputs = false; }
+ void set_ports_are_inputs ();
+ void set_ports_are_outputs ();
bool ports_are_inputs () const { return _ports_are_inputs; }
bool ports_are_outputs () const { return !_ports_are_inputs; }
@@ -121,7 +112,9 @@ class Bundle : public sigc::trackable
enum Change {
NameChanged = 0x1, ///< the bundle name or a channel name has changed
ConfigurationChanged = 0x2, ///< the number of channels has changed
- PortsChanged = 0x4 ///< the port list associated with one of our channels has changed
+ PortsChanged = 0x4, ///< the port list associated with one of our channels has changed
+ TypeChanged = 0x8, ///< the data type has changed
+ DirectionChanged = 0x10 ///< the direction (whether ports are inputs or outputs) has changed
};
sigc::signal<void, Change> Changed;
diff --git a/libs/ardour/bundle.cc b/libs/ardour/bundle.cc
index cd416c6a67..4f2198fd41 100644
--- a/libs/ardour/bundle.cc
+++ b/libs/ardour/bundle.cc
@@ -432,3 +432,37 @@ Bundle::connected_to (boost::shared_ptr<Bundle> other, AudioEngine & engine)
return true;
}
+
+/** Set the type of the ports in this Bundle.
+ * @param t New type.
+ */
+void
+Bundle::set_type (DataType t)
+{
+ _type = t;
+ emit_changed (TypeChanged);
+}
+
+void
+Bundle::set_ports_are_inputs ()
+{
+ _ports_are_inputs = true;
+ emit_changed (DirectionChanged);
+}
+
+void
+Bundle::set_ports_are_outputs ()
+{
+ _ports_are_inputs = false;
+ emit_changed (DirectionChanged);
+}
+
+/** Set the name.
+ * @param n New name.
+ */
+void
+Bundle::set_name (string const & n)
+{
+ _name = n;
+ emit_changed (NameChanged);
+}