Ardour  9.0-pre0-349-gc9645723de
ARDOUR::Bundle Class Reference

#include <bundle.h>

Inheritance diagram for ARDOUR::Bundle:
[legend]

Classes

struct  Channel
 

Public Types

enum  Change {
  NameChanged = 0x1 , ConfigurationChanged = 0x2 , PortsChanged = 0x4 , TypeChanged = 0x8 ,
  DirectionChanged = 0x10
}
 
typedef std::vector< std::string > PortList
 

Public Member Functions

 Bundle (bool i=true)
 
 Bundle (std::string const &, bool i=true)
 
 Bundle (std::shared_ptr< Bundle >)
 
virtual ~Bundle ()
 
ChanCount nchannels () const
 
uint32_t n_total () const
 
PortList const & channel_ports (uint32_t c) const
 
void add_channel (std::string const &, DataType)
 
void add_channel (std::string const &, DataType, std::string const &)
 
void add_channel (std::string const &, DataType, PortList)
 
std::string channel_name (uint32_t) const
 
DataType channel_type (uint32_t) const
 
void set_channel_name (uint32_t, std::string const &)
 
void add_port_to_channel (uint32_t, std::string)
 
void set_port (uint32_t, std::string)
 
void remove_port_from_channel (uint32_t, std::string)
 
void remove_ports_from_channel (uint32_t)
 
void remove_ports_from_channels ()
 
bool port_attached_to_channel (uint32_t, std::string)
 
bool offers_port (std::string) const
 
bool offers_port_alone (std::string) const
 
void remove_channel (uint32_t)
 
void remove_channels ()
 
void add_channels_from_bundle (std::shared_ptr< Bundle >)
 
void connect (std::shared_ptr< Bundle >, AudioEngine &, bool allow_partial=false)
 
void disconnect (std::shared_ptr< Bundle >, AudioEngine &)
 
bool connected_to (std::shared_ptr< Bundle >, AudioEngine &, DataType type=DataType::NIL, bool exclusive=false)
 
bool connected_to_anything (AudioEngine &)
 
bool has_same_ports (std::shared_ptr< Bundle >) const
 
uint32_t type_channel_to_overall (DataType, uint32_t) const
 
uint32_t overall_channel_to_type (DataType, uint32_t) const
 
void set_name (std::string const &)
 
std::string name () const
 
void set_ports_are_inputs ()
 
void set_ports_are_outputs ()
 
bool ports_are_inputs () const
 
bool ports_are_outputs () const
 
void suspend_signals ()
 
void resume_signals ()
 
bool operator== (Bundle const &other)
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Public Attributes

PBD::Signal< void(Change)> Changed
 

Protected Attributes

Glib::Threads::Mutex _channel_mutex
 
std::vector< Channel_channel
 

Private Member Functions

int set_channels (std::string const &)
 
int parse_io_string (std::string const &, std::vector< std::string > &)
 
void emit_changed (Change)
 

Private Attributes

std::string _name
 
bool _ports_are_inputs
 
bool _signals_suspended
 
Change _pending_change
 

Detailed Description

A set of ‘channels’, each of which is associated with 0 or more ports. Each channel has a name which can be anything useful, and a data type. Intended for grouping things like, for example, a buss' outputs. ‘Channel’ is a rather overloaded term but I can't think of a better one right now.

Definition at line 45 of file bundle.h.

Member Typedef Documentation

◆ PortList

typedef std::vector<std::string> ARDOUR::Bundle::PortList

List of ports associated with a channel. We can't use a PortSet because we might want to involve non-Ardour ports (ie those without a Port object)

Definition at line 52 of file bundle.h.

Member Enumeration Documentation

◆ Change

Things that might change about this bundle

Enumerator
NameChanged 

the bundle name or a channel name has changed

ConfigurationChanged 

the number of channels has changed

PortsChanged 

the port list associated with one of our channels has changed

TypeChanged 

the data type has changed

DirectionChanged 

the direction (whether ports are inputs or outputs) has changed

Definition at line 132 of file bundle.h.

Constructor & Destructor Documentation

◆ Bundle() [1/3]

ARDOUR::Bundle::Bundle ( bool  i = true)

◆ Bundle() [2/3]

ARDOUR::Bundle::Bundle ( std::string const &  ,
bool  i = true 
)

◆ Bundle() [3/3]

ARDOUR::Bundle::Bundle ( std::shared_ptr< Bundle )

◆ ~Bundle()

virtual ARDOUR::Bundle::~Bundle ( )
inlinevirtual

Definition at line 77 of file bundle.h.

Member Function Documentation

◆ add_channel() [1/3]

void ARDOUR::Bundle::add_channel ( std::string const &  ,
DataType   
)

◆ add_channel() [2/3]

void ARDOUR::Bundle::add_channel ( std::string const &  ,
DataType  ,
PortList   
)

◆ add_channel() [3/3]

void ARDOUR::Bundle::add_channel ( std::string const &  ,
DataType  ,
std::string const &   
)

◆ add_channels_from_bundle()

void ARDOUR::Bundle::add_channels_from_bundle ( std::shared_ptr< Bundle )

◆ add_port_to_channel()

void ARDOUR::Bundle::add_port_to_channel ( uint32_t  ,
std::string   
)

◆ channel_name()

std::string ARDOUR::Bundle::channel_name ( uint32_t  ) const

◆ channel_ports()

PortList const& ARDOUR::Bundle::channel_ports ( uint32_t  c) const
Parameters
cChannel index.
Returns
Ports associated with this channel.

◆ channel_type()

DataType ARDOUR::Bundle::channel_type ( uint32_t  ) const

◆ connect()

void ARDOUR::Bundle::connect ( std::shared_ptr< Bundle ,
AudioEngine ,
bool  allow_partial = false 
)

◆ connected_to()

bool ARDOUR::Bundle::connected_to ( std::shared_ptr< Bundle ,
AudioEngine ,
DataType  type = DataType::NIL,
bool  exclusive = false 
)

◆ connected_to_anything()

bool ARDOUR::Bundle::connected_to_anything ( AudioEngine )

◆ disconnect()

void ARDOUR::Bundle::disconnect ( std::shared_ptr< Bundle ,
AudioEngine  
)

◆ emit_changed()

void ARDOUR::Bundle::emit_changed ( Change  )
private

◆ has_same_ports()

bool ARDOUR::Bundle::has_same_ports ( std::shared_ptr< Bundle ) const

◆ n_total()

uint32_t ARDOUR::Bundle::n_total ( ) const

◆ name()

std::string ARDOUR::Bundle::name ( ) const
inline
Returns
Bundle name

Definition at line 119 of file bundle.h.

◆ nchannels()

ChanCount ARDOUR::Bundle::nchannels ( ) const
Returns
Number of channels that this Bundle has

◆ offers_port()

bool ARDOUR::Bundle::offers_port ( std::string  ) const

◆ offers_port_alone()

bool ARDOUR::Bundle::offers_port_alone ( std::string  ) const

◆ operator==()

bool ARDOUR::Bundle::operator== ( Bundle const &  other)

◆ overall_channel_to_type()

uint32_t ARDOUR::Bundle::overall_channel_to_type ( DataType  ,
uint32_t   
) const

◆ parse_io_string()

int ARDOUR::Bundle::parse_io_string ( std::string const &  ,
std::vector< std::string > &   
)
private

◆ port_attached_to_channel()

bool ARDOUR::Bundle::port_attached_to_channel ( uint32_t  ,
std::string   
)

◆ ports_are_inputs()

bool ARDOUR::Bundle::ports_are_inputs ( ) const
inline

Definition at line 123 of file bundle.h.

◆ ports_are_outputs()

bool ARDOUR::Bundle::ports_are_outputs ( ) const
inline

Definition at line 124 of file bundle.h.

◆ remove_channel()

void ARDOUR::Bundle::remove_channel ( uint32_t  )

◆ remove_channels()

void ARDOUR::Bundle::remove_channels ( )

◆ remove_port_from_channel()

void ARDOUR::Bundle::remove_port_from_channel ( uint32_t  ,
std::string   
)

◆ remove_ports_from_channel()

void ARDOUR::Bundle::remove_ports_from_channel ( uint32_t  )

◆ remove_ports_from_channels()

void ARDOUR::Bundle::remove_ports_from_channels ( )

◆ resume_signals()

void ARDOUR::Bundle::resume_signals ( )

◆ set_channel_name()

void ARDOUR::Bundle::set_channel_name ( uint32_t  ,
std::string const &   
)

◆ set_channels()

int ARDOUR::Bundle::set_channels ( std::string const &  )
private

◆ set_name()

void ARDOUR::Bundle::set_name ( std::string const &  )

◆ set_port()

void ARDOUR::Bundle::set_port ( uint32_t  ,
std::string   
)

◆ set_ports_are_inputs()

void ARDOUR::Bundle::set_ports_are_inputs ( )

◆ set_ports_are_outputs()

void ARDOUR::Bundle::set_ports_are_outputs ( )

◆ suspend_signals()

void ARDOUR::Bundle::suspend_signals ( )

◆ type_channel_to_overall()

uint32_t ARDOUR::Bundle::type_channel_to_overall ( DataType  ,
uint32_t   
) const

Member Data Documentation

◆ _channel

std::vector<Channel> ARDOUR::Bundle::_channel
protected

Definition at line 147 of file bundle.h.

◆ _channel_mutex

Glib::Threads::Mutex ARDOUR::Bundle::_channel_mutex
mutableprotected

mutex for _channel_ports and _channel_names XXX: is this necessary?

Definition at line 146 of file bundle.h.

◆ _name

std::string ARDOUR::Bundle::_name
private

Definition at line 154 of file bundle.h.

◆ _pending_change

Change ARDOUR::Bundle::_pending_change
private

Definition at line 158 of file bundle.h.

◆ _ports_are_inputs

bool ARDOUR::Bundle::_ports_are_inputs
private

Definition at line 155 of file bundle.h.

◆ _signals_suspended

bool ARDOUR::Bundle::_signals_suspended
private

Definition at line 157 of file bundle.h.

◆ Changed

PBD::Signal<void(Change)> ARDOUR::Bundle::Changed

Definition at line 140 of file bundle.h.


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