Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::RegionFactory Class Reference

#include <region_factory.h>

Public Types

typedef std::map< PBD::ID, std::shared_ptr< Region > > RegionMap
 
typedef std::map< std::shared_ptr< Region >, std::shared_ptr< Region > > CompoundAssociations
 

Static Public Member Functions

static std::shared_ptr< Regionwholefile_region_by_name (const std::string &name)
 
static std::shared_ptr< Regionregion_by_id (const PBD::ID &)
 
static std::shared_ptr< Regionregion_by_name (const std::string &name)
 
static void clear_map ()
 
static const RegionMap all_regions ()
 
static std::shared_ptr< Regioncreate (std::shared_ptr< const Region > other, bool announce, bool fork=false, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (std::shared_ptr< Region > other, bool announce, bool fork)
 
static std::shared_ptr< Regioncreate (std::shared_ptr< Source >, const PBD::PropertyList &, bool announce=true, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (const SourceList &, const PBD::PropertyList &, bool announce=true, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (std::shared_ptr< Region > other, const PBD::PropertyList &, bool announce=true, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (std::shared_ptr< Region > other, timecnt_t const &offset, const PBD::PropertyList &, bool announce=true, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (std::shared_ptr< Region > other, const SourceList &srcs, const PBD::PropertyList &, bool announce=true, ThawList *tl=0)
 
static std::shared_ptr< Regioncreate (Session &, XMLNode &, bool)
 
static std::shared_ptr< Regioncreate (SourceList &srcs, const XMLNode &)
 
static std::shared_ptr< Regionget_whole_region_for_source (std::shared_ptr< ARDOUR::Source >)
 
static void get_regions_using_source (std::shared_ptr< Source >, std::set< std::shared_ptr< Region > > &)
 
static void remove_regions_using_source (std::shared_ptr< Source >)
 
static void map_remove (std::weak_ptr< Region >)
 
static void delete_all_regions ()
 
static const RegionMapregions ()
 
static uint32_t nregions ()
 
static void foreach_region (std::function< void(std::shared_ptr< Region >)> f)
 
static int region_name (std::string &, std::string, bool new_level=false)
 
static std::string new_region_name (std::string)
 
static std::string compound_region_name (const std::string &playlist, uint32_t compound_ops, uint32_t depth, bool whole_source)
 
static CompoundAssociationscompound_associations ()
 
static void add_compound_association (std::shared_ptr< Region >, std::shared_ptr< Region >)
 
static void map_add (std::shared_ptr< Region >)
 

Static Public Attributes

static PBD::Signal< void(std::shared_ptr< Region >)> CheckNewRegion
 

Static Private Member Functions

static void region_changed (PBD::PropertyChange const &, std::weak_ptr< Region >)
 
static void add_to_region_name_maps (std::shared_ptr< Region >)
 
static void rename_in_region_name_maps (std::shared_ptr< Region >)
 
static void update_region_name_number_map (std::shared_ptr< Region >)
 
static void remove_from_region_name_map (std::string)
 

Static Private Attributes

static Glib::Threads::Mutex region_map_lock
 
static RegionMap region_map
 
static Glib::Threads::Mutex region_name_maps_mutex
 
static std::map< std::string, uint32_t > region_name_number_map
 
static std::map< std::string, PBD::IDregion_name_map
 
static PBD::ScopedConnectionListregion_list_connections
 
static CompoundAssociations _compound_associations
 

Friends

class ::RegionNamingTest
 

Detailed Description

Definition at line 46 of file region_factory.h.

Member Typedef Documentation

◆ CompoundAssociations

typedef std::map<std::shared_ptr<Region>, std::shared_ptr<Region> > ARDOUR::RegionFactory::CompoundAssociations

Definition at line 134 of file region_factory.h.

◆ RegionMap

typedef std::map<PBD::ID, std::shared_ptr<Region> > ARDOUR::RegionFactory::RegionMap

Definition at line 49 of file region_factory.h.

Member Function Documentation

◆ add_compound_association()

static void ARDOUR::RegionFactory::add_compound_association ( std::shared_ptr< Region ,
std::shared_ptr< Region  
)
static

◆ add_to_region_name_maps()

static void ARDOUR::RegionFactory::add_to_region_name_maps ( std::shared_ptr< Region )
staticprivate

◆ all_regions()

static const RegionMap ARDOUR::RegionFactory::all_regions ( )
inlinestatic

Definition at line 55 of file region_factory.h.

◆ clear_map()

static void ARDOUR::RegionFactory::clear_map ( )
static

◆ compound_associations()

static CompoundAssociations& ARDOUR::RegionFactory::compound_associations ( )
inlinestatic

Definition at line 136 of file region_factory.h.

◆ compound_region_name()

static std::string ARDOUR::RegionFactory::compound_region_name ( const std::string &  playlist,
uint32_t  compound_ops,
uint32_t  depth,
bool  whole_source 
)
static

◆ create() [1/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( const SourceList ,
const PBD::PropertyList ,
bool  announce = true,
ThawList tl = 0 
)
static

create a region from a multiple sources

◆ create() [2/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( Session ,
XMLNode ,
bool   
)
static

create a region with no sources, using XML state

◆ create() [3/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( SourceList srcs,
const XMLNode  
)
static

create a region with specified sources srcs and XML state

◆ create() [4/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< const Region other,
bool  announce,
bool  fork = false,
ThawList tl = 0 
)
static

create a "pure copy" of Region other

◆ create() [5/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< Region other,
bool  announce,
bool  fork 
)
inlinestatic

Lua binding to create a "pure copy" of Region other

Definition at line 73 of file region_factory.h.

◆ create() [6/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< Region other,
const PBD::PropertyList ,
bool  announce = true,
ThawList tl = 0 
)
static

create a copy of other starting at zero within other's sources

◆ create() [7/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< Region other,
const SourceList srcs,
const PBD::PropertyList ,
bool  announce = true,
ThawList tl = 0 
)
static

create a "copy" of other but using a different set of sources srcs

◆ create() [8/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< Region other,
timecnt_t const &  offset,
const PBD::PropertyList ,
bool  announce = true,
ThawList tl = 0 
)
static

create a copy of other starting at offset within other

◆ create() [9/9]

static std::shared_ptr<Region> ARDOUR::RegionFactory::create ( std::shared_ptr< Source ,
const PBD::PropertyList ,
bool  announce = true,
ThawList tl = 0 
)
static

create a region from a single Source

◆ delete_all_regions()

static void ARDOUR::RegionFactory::delete_all_regions ( )
static

◆ foreach_region()

static void ARDOUR::RegionFactory::foreach_region ( std::function< void(std::shared_ptr< Region >)>  f)
inlinestatic

Definition at line 109 of file region_factory.h.

◆ get_regions_using_source()

static void ARDOUR::RegionFactory::get_regions_using_source ( std::shared_ptr< Source ,
std::set< std::shared_ptr< Region > > &   
)
static

◆ get_whole_region_for_source()

static std::shared_ptr<Region> ARDOUR::RegionFactory::get_whole_region_for_source ( std::shared_ptr< ARDOUR::Source )
static

◆ map_add()

static void ARDOUR::RegionFactory::map_add ( std::shared_ptr< Region )
static

◆ map_remove()

static void ARDOUR::RegionFactory::map_remove ( std::weak_ptr< Region )
static

◆ new_region_name()

static std::string ARDOUR::RegionFactory::new_region_name ( std::string  )
static

◆ nregions()

static uint32_t ARDOUR::RegionFactory::nregions ( )
static

◆ region_by_id()

static std::shared_ptr<Region> ARDOUR::RegionFactory::region_by_id ( const PBD::ID )
static

◆ region_by_name()

static std::shared_ptr<Region> ARDOUR::RegionFactory::region_by_name ( const std::string &  name)
static

◆ region_changed()

static void ARDOUR::RegionFactory::region_changed ( PBD::PropertyChange const &  ,
std::weak_ptr< Region  
)
staticprivate

◆ region_name()

static int ARDOUR::RegionFactory::region_name ( std::string &  ,
std::string  ,
bool  new_level = false 
)
static

◆ regions()

static const RegionMap& ARDOUR::RegionFactory::regions ( )
inlinestatic

Definition at line 102 of file region_factory.h.

◆ remove_from_region_name_map()

static void ARDOUR::RegionFactory::remove_from_region_name_map ( std::string  )
staticprivate

◆ remove_regions_using_source()

static void ARDOUR::RegionFactory::remove_regions_using_source ( std::shared_ptr< Source )
static

◆ rename_in_region_name_maps()

static void ARDOUR::RegionFactory::rename_in_region_name_maps ( std::shared_ptr< Region )
staticprivate

◆ update_region_name_number_map()

static void ARDOUR::RegionFactory::update_region_name_number_map ( std::shared_ptr< Region )
staticprivate

◆ wholefile_region_by_name()

static std::shared_ptr<Region> ARDOUR::RegionFactory::wholefile_region_by_name ( const std::string &  name)
static

Friends And Related Function Documentation

◆ ::RegionNamingTest

friend class ::RegionNamingTest
friend

Definition at line 151 of file region_factory.h.

Member Data Documentation

◆ _compound_associations

CompoundAssociations ARDOUR::RegionFactory::_compound_associations
staticprivate

Definition at line 169 of file region_factory.h.

◆ CheckNewRegion

PBD::Signal<void(std::shared_ptr<Region> )> ARDOUR::RegionFactory::CheckNewRegion
static

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 using a derived instance of Region, not Region itself, to permit dynamic_cast<> to be used to infer the type of Region.

Definition at line 67 of file region_factory.h.

◆ region_list_connections

PBD::ScopedConnectionList* ARDOUR::RegionFactory::region_list_connections
staticprivate

Definition at line 168 of file region_factory.h.

◆ region_map

RegionMap ARDOUR::RegionFactory::region_map
staticprivate

Definition at line 160 of file region_factory.h.

◆ region_map_lock

Glib::Threads::Mutex ARDOUR::RegionFactory::region_map_lock
staticprivate

Definition at line 159 of file region_factory.h.

◆ region_name_map

std::map<std::string, PBD::ID> ARDOUR::RegionFactory::region_name_map
staticprivate

map of complete region names with their region ID

Definition at line 166 of file region_factory.h.

◆ region_name_maps_mutex

Glib::Threads::Mutex ARDOUR::RegionFactory::region_name_maps_mutex
staticprivate

Definition at line 162 of file region_factory.h.

◆ region_name_number_map

std::map<std::string, uint32_t> ARDOUR::RegionFactory::region_name_number_map
staticprivate

map of partial region names and suffix numbers

Definition at line 164 of file region_factory.h.


The documentation for this class was generated from the following file: