- bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
- std::set<boost::weak_ptr<Route> > fed_by;
+ /**
+ * return true if this route feeds the first argument via at least one
+ * (arbitrarily long) signal pathway.
+ */
+ bool feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
+
+ /**
+ * return true if this route feeds the first argument directly, via
+ * either its main outs or a send.
+ */
+ bool direct_feeds (boost::shared_ptr<Route>, bool* via_send_only = 0);
+
+ struct FeedRecord {
+ boost::weak_ptr<Route> r;
+ bool sends_only;
+
+ FeedRecord (boost::shared_ptr<Route> rp, bool sendsonly)
+ : r (rp)
+ , sends_only (sendsonly) {}
+ };
+
+ struct FeedRecordCompare {
+ bool operator() (const FeedRecord& a, const FeedRecord& b) const {
+ return a.r < b.r;
+ }
+ };
+
+ typedef std::set<FeedRecord,FeedRecordCompare> FedBy;
+
+ const FedBy& fed_by() const { return _fed_by; }
+ void clear_fed_by ();
+ bool add_fed_by (boost::shared_ptr<Route>, bool sends_only);
+ bool not_fed() const { return _fed_by.empty(); }