48 void add (std::shared_ptr<Port> port);
49 bool remove (std::shared_ptr<Port> port);
54 std::shared_ptr<Port>
port(
size_t index)
const;
66 bool contains (std::shared_ptr<const Port> port)
const;
75 bool empty()
const {
return (_count.n_total() == 0); }
77 template<
typename PS,
typename P>
80 std::shared_ptr<P>
operator*() {
return _set.port(_type, _index); }
81 std::shared_ptr<P>
operator->() {
return _set.port(_type, _index); }
110 (type ==
DataType::NIL) ? _count.n_total() : _count.get(type));
119 (type ==
DataType::NIL) ? _count.n_total() : _count.get(type));
124 std::shared_ptr<AudioPort>
operator*() {
return _set.nth_audio_port(_index); }
125 std::shared_ptr<AudioPort>
operator->() {
return _set.nth_audio_port(_index); }
143 typedef std::vector<std::shared_ptr<Port> >
PortVec;
std::shared_ptr< AudioPort > operator->()
std::shared_ptr< AudioPort > operator*()
audio_iterator(PortSet &list, size_t index)
bool operator!=(const audio_iterator &other)
audio_iterator & operator++()
bool operator==(const audio_iterator &other)
DataType _type
Ignored if NIL (to iterator over entire set)
bool operator!=(const iterator_base< PS, P > &other)
std::shared_ptr< P > operator->()
std::shared_ptr< P > operator*()
iterator_base(PS &list, DataType type, size_t index)
iterator_base< PS, P > & operator++()
bool operator==(const iterator_base< PS, P > &other)
iterator begin(DataType type=DataType::NIL)
bool remove(std::shared_ptr< Port > port)
std::vector< PortVec > _ports
iterator_base< const PortSet, const Port > const_iterator
size_t num_ports(DataType type) const
audio_iterator audio_begin()
std::shared_ptr< AudioPort > nth_audio_port(size_t n) const
std::shared_ptr< MidiPort > nth_midi_port(size_t n) const
void add(std::shared_ptr< Port > port)
std::vector< std::shared_ptr< Port > > PortVec
iterator end(DataType type=DataType::NIL)
std::shared_ptr< Port > port(size_t index) const
const_iterator end(DataType type=DataType::NIL) const
const_iterator begin(DataType type=DataType::NIL) const
bool contains(std::shared_ptr< const Port > port) const
const ChanCount & count() const
std::shared_ptr< Port > port(DataType t, size_t index) const
iterator_base< PortSet, Port > iterator
audio_iterator audio_end()