ardour
Public Types | Static Public Member Functions | Static Public Attributes | Static Private Member Functions | Static Private Attributes | Friends | List of all members
ARDOUR::RegionFactory Class Reference

#include <region_factory.h>

Public Types

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

Static Public Member Functions

static boost::shared_ptr< Regionwholefile_region_by_name (const std::string &name)
 
static boost::shared_ptr< Regionregion_by_id (const PBD::ID &)
 
static boost::shared_ptr< Regionregion_by_name (const std::string &name)
 
static const RegionMap all_regions ()
 
static void clear_map ()
 
static boost::shared_ptr< Regioncreate (boost::shared_ptr< const Region > other, bool announce=false)
 
static boost::shared_ptr< Regioncreate (boost::shared_ptr< Source >, const PBD::PropertyList &, bool announce=true)
 
static boost::shared_ptr< Regioncreate (const SourceList &, const PBD::PropertyList &, bool announce=true)
 
static boost::shared_ptr< Regioncreate (boost::shared_ptr< Region > other, const PBD::PropertyList &, bool announce=true)
 
static boost::shared_ptr< Regioncreate (boost::shared_ptr< Region > other, frameoffset_t offset, const PBD::PropertyList &, bool announce=true)
 
static boost::shared_ptr< Regioncreate (boost::shared_ptr< Region > other, const SourceList &srcs, const PBD::PropertyList &, bool announce=true)
 
static boost::shared_ptr< Regioncreate (Session &, XMLNode &, bool)
 
static boost::shared_ptr< Regioncreate (SourceList &srcs, const XMLNode &)
 
static void get_regions_using_source (boost::shared_ptr< Source >, std::set< boost::shared_ptr< Region > > &)
 
static void remove_regions_using_source (boost::shared_ptr< Source >)
 
static void map_remove (boost::weak_ptr< Region >)
 
static void delete_all_regions ()
 
static const RegionMapregions ()
 
static uint32_t nregions ()
 
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 (boost::shared_ptr< Region >, boost::shared_ptr< Region >)
 
static void map_add (boost::shared_ptr< Region >)
 

Static Public Attributes

static PBD::Signal1< void,
boost::shared_ptr< Region > > 
CheckNewRegion
 

Static Private Member Functions

static void region_changed (PBD::PropertyChange const &, boost::weak_ptr< Region >)
 
static void add_to_region_name_maps (boost::shared_ptr< Region >)
 
static void rename_in_region_name_maps (boost::shared_ptr< Region >)
 
static void update_region_name_number_map (boost::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::ID
region_name_map
 
static PBD::ScopedConnectionListregion_list_connections = 0
 
static CompoundAssociations _compound_associations
 

Friends

class ::RegionNamingTest
 

Detailed Description

Definition at line 42 of file region_factory.h.

Member Typedef Documentation

Definition at line 111 of file region_factory.h.

Definition at line 44 of file region_factory.h.

Member Function Documentation

void RegionFactory::add_compound_association ( boost::shared_ptr< Region orig,
boost::shared_ptr< Region copy 
)
static

Definition at line 666 of file region_factory.cc.

void RegionFactory::add_to_region_name_maps ( boost::shared_ptr< Region region)
staticprivate

Add a region to the two region name maps

Definition at line 437 of file region_factory.cc.

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

Definition at line 49 of file region_factory.h.

void RegionFactory::clear_map ( )
static

Definition at line 390 of file region_factory.cc.

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

Definition at line 112 of file region_factory.h.

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

Definition at line 562 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( boost::shared_ptr< const Region other,
bool  announce = false 
)
static

create a "pure copy" of Region

Parameters
other

Definition at line 49 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( boost::shared_ptr< Source src,
const PBD::PropertyList plist,
bool  announce = true 
)
static

create a region from a single Source

Definition at line 228 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( const SourceList srcs,
const PBD::PropertyList plist,
bool  announce = true 
)
static

create a region from a multiple sources

Definition at line 236 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( boost::shared_ptr< Region other,
const PBD::PropertyList plist,
bool  announce = true 
)
static

create a copy of starting at zero within

Parameters
other'ssources

Definition at line 105 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( boost::shared_ptr< Region other,
frameoffset_t  offset,
const PBD::PropertyList plist,
bool  announce = true 
)
static

create a copy of

Parameters
otherstarting at
offsetwithin
other

Definition at line 146 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( boost::shared_ptr< Region other,
const SourceList srcs,
const PBD::PropertyList plist,
bool  announce = true 
)
static

create a "copy" of

Parameters
otherbut using a different set of sources
srcs

Definition at line 187 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( Session session,
XMLNode node,
bool  yn 
)
static

create a region with no sources, using XML state

Definition at line 272 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::create ( SourceList srcs,
const XMLNode node 
)
static

create a region with specified sources

Parameters
srcsand XML state

Definition at line 278 of file region_factory.cc.

void RegionFactory::delete_all_regions ( )
static

Definition at line 405 of file region_factory.cc.

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

Definition at line 634 of file region_factory.cc.

void RegionFactory::map_add ( boost::shared_ptr< Region r)
static

Definition at line 317 of file region_factory.cc.

void RegionFactory::map_remove ( boost::weak_ptr< Region w)
static

Definition at line 339 of file region_factory.cc.

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

Definition at line 572 of file region_factory.cc.

uint32_t RegionFactory::nregions ( )
static

Definition at line 429 of file region_factory.cc.

boost::shared_ptr< Region > RegionFactory::region_by_id ( const PBD::ID id)
static

Definition at line 356 of file region_factory.cc.

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

Definition at line 379 of file region_factory.cc.

void RegionFactory::region_changed ( PBD::PropertyChange const &  what_changed,
boost::weak_ptr< Region w 
)
staticprivate

Definition at line 496 of file region_factory.cc.

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

Definition at line 509 of file region_factory.cc.

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

Definition at line 91 of file region_factory.h.

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

Remove a region's details from the region_name_map

Definition at line 467 of file region_factory.cc.

void RegionFactory::remove_regions_using_source ( boost::shared_ptr< Source src)
static

Definition at line 646 of file region_factory.cc.

void RegionFactory::rename_in_region_name_maps ( boost::shared_ptr< Region region)
staticprivate

Account for a region rename in the two region name maps

Definition at line 447 of file region_factory.cc.

void RegionFactory::update_region_name_number_map ( boost::shared_ptr< Region region)
staticprivate

Update a region's entry in the region_name_number_map

Definition at line 477 of file region_factory.cc.

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

Definition at line 368 of file region_factory.cc.

Friends And Related Function Documentation

friend class ::RegionNamingTest
friend

Definition at line 124 of file region_factory.h.

Member Data Documentation

RegionFactory::CompoundAssociations RegionFactory::_compound_associations
staticprivate

Definition at line 143 of file region_factory.h.

PBD::Signal1< void, boost::shared_ptr< Region > > 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 59 of file region_factory.h.

PBD::ScopedConnectionList * RegionFactory::region_list_connections = 0
staticprivate

Definition at line 142 of file region_factory.h.

RegionFactory::RegionMap RegionFactory::region_map
staticprivate

Definition at line 130 of file region_factory.h.

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

Definition at line 128 of file region_factory.h.

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

map of complete region names with their region ID

Definition at line 136 of file region_factory.h.

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

Definition at line 132 of file region_factory.h.

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

map of partial region names and suffix numbers

Definition at line 134 of file region_factory.h.


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