summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region_factory.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-02-08 19:39:17 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-02-08 19:39:17 +0000
commite2baff4f7d00c97dc4192c5ac573aeee8950b2ae (patch)
treed099f62d821f86980b062d2fc93aa6e8c9203ba2 /libs/ardour/ardour/region_factory.h
parent1afb1cfea4f2ea66962faef01d729014bdc9eb56 (diff)
new RegionCommand object; remove unused string argument from Region::thaw(); add map<ID,Region> in RegionFactory so that we can look up regions by ID
git-svn-id: svn://localhost/ardour2/branches/3.0@6652 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/region_factory.h')
-rw-r--r--libs/ardour/ardour/region_factory.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h
index b53e9490de..64d3417287 100644
--- a/libs/ardour/ardour/region_factory.h
+++ b/libs/ardour/ardour/region_factory.h
@@ -20,6 +20,10 @@
#ifndef __ardour_region_factory_h__
#define __ardour_region_factory_h__
+#include <map>
+
+#include "pbd/id.h"
+
#include "ardour/types.h"
#include "ardour/region.h"
@@ -33,6 +37,10 @@ class AudioRegion;
class RegionFactory {
public:
+
+ static boost::shared_ptr<Region> region_by_id (const PBD::ID&);
+ static void clear_map ();
+
/** This is emitted only when a new id is assigned. Therefore,
in a pure Region copy, it will not be emitted.
@@ -59,6 +67,10 @@ class RegionFactory {
static boost::shared_ptr<Region> create (const SourceList &, nframes_t start, nframes_t length, const std::string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
static boost::shared_ptr<Region> create (SourceList &, const XMLNode&);
+
+ private:
+ static std::map<PBD::ID,boost::weak_ptr<Region> > region_map;
+ static void map_add (boost::shared_ptr<Region>);
};
}