From 82232f06ba3eea4a2b4342ad91fab552f4044402 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 29 Aug 2006 21:21:48 +0000 Subject: 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 --- libs/ardour/ardour/region_factory.h | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'libs/ardour/ardour/region_factory.h') 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 > CheckNewRegion; + + static boost::shared_ptr create (boost::shared_ptr, 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 create (boost::shared_ptr, 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 create (boost::shared_ptr, 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 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 create (boost::shared_ptr); + static boost::shared_ptr create (Session&, XMLNode&, bool); + static boost::shared_ptr create (SourceList &, const XMLNode&); +}; } -- cgit v1.2.3