| 
    Ardour
    9.0-pre0-1982-ga458a302d1
    
   | 
 
#include <port_set.h>
Classes | |
| class | audio_iterator | 
| class | iterator_base | 
Public Types | |
| typedef iterator_base< PortSet, Port > | iterator | 
| typedef iterator_base< const PortSet, const Port > | const_iterator | 
Public Member Functions | |
| PortSet () | |
| size_t | num_ports () const | 
| size_t | num_ports (DataType type) const | 
| void | add (std::shared_ptr< Port > port) | 
| bool | remove (std::shared_ptr< Port > port) | 
| std::shared_ptr< Port > | port (size_t index) const | 
| std::shared_ptr< Port > | port (DataType t, size_t index) const | 
| std::shared_ptr< AudioPort > | nth_audio_port (size_t n) const | 
| std::shared_ptr< MidiPort > | nth_midi_port (size_t n) const | 
| bool | contains (std::shared_ptr< const Port > port) const | 
| void | clear () | 
| const ChanCount & | count () const | 
| bool | empty () const | 
| iterator | begin (DataType type=DataType::NIL) | 
| iterator | end (DataType type=DataType::NIL) | 
| const_iterator | begin (DataType type=DataType::NIL) const | 
| const_iterator | end (DataType type=DataType::NIL) const | 
| audio_iterator | audio_begin () | 
| audio_iterator | audio_end () | 
Private Types | |
| typedef std::vector< std::shared_ptr< Port > > | PortVec | 
Private Attributes | |
| std::vector< PortVec > | _ports | 
| PortVec | _all_ports | 
| ChanCount | _count | 
An ordered list of Ports, possibly of various types.
This allows access to all the ports as a list, ignoring type, or accessing the nth port of a given type. Note that port(n) and nth_audio_port(n) may NOT return the same port.
Each port is held twice; once in a per-type vector of vectors (_ports) and once in a vector of all port (_all_ports). This is to speed up the fairly common case of iterating over all ports.
Definition at line 41 of file port_set.h.
| typedef iterator_base<const PortSet, const Port> ARDOUR::PortSet::const_iterator | 
Definition at line 102 of file port_set.h.
| typedef iterator_base<PortSet, Port> ARDOUR::PortSet::iterator | 
Definition at line 101 of file port_set.h.
      
  | 
  private | 
Definition at line 143 of file port_set.h.
| ARDOUR::PortSet::PortSet | ( | ) | 
| void ARDOUR::PortSet::add | ( | std::shared_ptr< Port > | port | ) | 
      
  | 
  inline | 
Definition at line 139 of file port_set.h.
      
  | 
  inline | 
Definition at line 140 of file port_set.h.
      
  | 
  inline | 
Definition at line 104 of file port_set.h.
      
  | 
  inline | 
Definition at line 113 of file port_set.h.
| void ARDOUR::PortSet::clear | ( | ) | 
Remove all ports from the PortSet. Ports are not deregistered with the engine, it's the caller's responsibility to not leak here!
| bool ARDOUR::PortSet::contains | ( | std::shared_ptr< const Port > | port | ) | const | 
      
  | 
  inline | 
Definition at line 73 of file port_set.h.
      
  | 
  inline | 
Definition at line 75 of file port_set.h.
      
  | 
  inline | 
Definition at line 108 of file port_set.h.
      
  | 
  inline | 
Definition at line 117 of file port_set.h.
| std::shared_ptr<AudioPort> ARDOUR::PortSet::nth_audio_port | ( | size_t | n | ) | const | 
| std::shared_ptr<MidiPort> ARDOUR::PortSet::nth_midi_port | ( | size_t | n | ) | const | 
| size_t ARDOUR::PortSet::num_ports | ( | ) | const | 
      
  | 
  inline | 
Definition at line 46 of file port_set.h.
nth port of type t, or nth port if t = NIL
| t | data type | 
| index | port index | 
| std::shared_ptr<Port> ARDOUR::PortSet::port | ( | size_t | index | ) | const | 
nth port
| index | port index | 
| bool ARDOUR::PortSet::remove | ( | std::shared_ptr< Port > | port | ) | 
      
  | 
  private | 
Definition at line 148 of file port_set.h.
      
  | 
  private | 
Definition at line 150 of file port_set.h.
      
  | 
  private | 
Definition at line 146 of file port_set.h.