+
+ typedef std::pair<boost::shared_ptr<Region>, boost::shared_ptr<Region> > TwoRegions;
+
+ /* this is called before we create a new compound region */
+ virtual void pre_combine (std::vector<boost::shared_ptr<Region> >&) {}
+ /* this is called before we create a new compound region */
+ virtual void post_combine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>) {}
+ /* this is called before we remove a compound region and replace it
+ with its constituent regions
+ */
+ virtual void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>) {}
+
+ private:
+ friend class RegionReadLock;
+ friend class RegionWriteLock;
+ mutable Glib::RWLock region_lock;
+
+ private:
+ void setup_layering_indices (RegionList const &);
+ void coalesce_and_check_crossfades (std::list<Evoral::Range<framepos_t> >);
+ boost::shared_ptr<RegionList> find_regions_at (framepos_t);