Small cleanup: add constructor to InterThreadInfo.
[ardour.git] / libs / ardour / ardour / region_factory.h
index a01103603a2d5b306953c2a67aab424e117d9f7d..c9f387f1724543bcbc7fc4f2095ecb4cb9a24735 100644 (file)
@@ -24,6 +24,7 @@
 #include <glibmm/thread.h>
 
 #include "pbd/id.h"
+#include "pbd/signals.h"
 
 #include "ardour/types.h"
 #include "ardour/region.h"
@@ -65,8 +66,8 @@ class RegionFactory {
        /** create a copy of @other starting at zero within @param other's sources */
        static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, 
                                                 const PBD::PropertyList&, bool announce = true);
-       /** create a copy of @other starting at @param offset within @param other */
-       static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, frameoffset_t offset, 
+       /** create a copy of @param other starting at @param offset within @param other */
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, frameoffset_t offset, 
                                                 const PBD::PropertyList&, bool announce = true);
        /** create a "copy" of @param other but using a different set of sources @param srcs */
        static boost::shared_ptr<Region> create (boost::shared_ptr<Region> other, const SourceList& srcs, 
@@ -77,11 +78,33 @@ class RegionFactory {
        /** create a region with specified sources @param srcs and XML state */
        static boost::shared_ptr<Region> create (SourceList& srcs, const XMLNode&);
 
+       static void map_remove (boost::shared_ptr<Region>);
+        static void delete_all_regions ();
+        static const RegionMap& regions() { return region_map; }
+        static uint32_t nregions ();
+
+       static int region_name (std::string &, std::string, bool new_level = false);
+       static std::string new_region_name (std::string);
+  
   private:
+
+       static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, frameoffset_t offset,
+                                                bool offset_relative,
+                                                const PBD::PropertyList&, bool announce = true);
+
+       static void region_changed (PBD::PropertyChange const &, boost::weak_ptr<Region>);
+       
         static Glib::StaticMutex region_map_lock;
+       
        static RegionMap region_map;
        static void map_add (boost::shared_ptr<Region>);
-       static void map_remove (boost::shared_ptr<Region>);
+
+       static Glib::StaticMutex region_name_map_lock;
+
+       static std::map<std::string, uint32_t> region_name_map;
+       static void update_region_name_map (boost::shared_ptr<Region>);
+
+        static PBD::ScopedConnectionList region_list_connections;
 };
 
 }