summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region_factory.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-08-29 21:21:48 +0000
committerDavid Robillard <d@drobilla.net>2006-08-29 21:21:48 +0000
commit82232f06ba3eea4a2b4342ad91fab552f4044402 (patch)
treed517cb47c017f51e2ecd9450624b86eb70d9f97b /libs/ardour/ardour/region_factory.h
parent25d1670a61d19e795227b939a98be9cf5a050c67 (diff)
Merged with trunk R861
Possible new bugs - not very thoroughly tested, but at least functional at first glance git-svn-id: svn://localhost/ardour2/branches/midi@870 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/region_factory.h')
-rw-r--r--libs/ardour/ardour/region_factory.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/libs/ardour/ardour/region_factory.h b/libs/ardour/ardour/region_factory.h
index f72c0a52d8..bd5089f512 100644
--- a/libs/ardour/ardour/region_factory.h
+++ b/libs/ardour/ardour/region_factory.h
@@ -10,12 +10,30 @@ namespace ARDOUR {
class Session;
-Region* createRegion (const Region&, jack_nframes_t start,
- jack_nframes_t length, std::string name,
- layer_t = 0, Region::Flag flags = Region::DefaultFlags);
-// Region* createRegion (const Region&, std::string name);
-Region* createRegion (const Region&);
-Region* createRegion (Session&, XMLNode&, bool);
+class RegionFactory {
+
+ public:
+ /** This is emitted only when a new id is assigned. Therefore,
+ in a pure Region copy, it will not be emitted.
+
+ It must be emitted by derived classes, not Region
+ itself, to permit dynamic_cast<> to be used to
+ infer the type of Region.
+ */
+ static sigc::signal<void,boost::shared_ptr<Region> > CheckNewRegion;
+
+ static boost::shared_ptr<Region> create (boost::shared_ptr<Region>, jack_nframes_t start,
+ jack_nframes_t length, std::string name,
+ layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (boost::shared_ptr<AudioRegion>, jack_nframes_t start,
+ jack_nframes_t length, std::string name,
+ layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (boost::shared_ptr<Source>, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (SourceList &, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t = 0, Region::Flag flags = Region::DefaultFlags, bool announce = true);
+ static boost::shared_ptr<Region> create (boost::shared_ptr<Region>);
+ static boost::shared_ptr<Region> create (Session&, XMLNode&, bool);
+ static boost::shared_ptr<Region> create (SourceList &, const XMLNode&);
+};
}