19 #ifndef __ardour_port_set_h__
20 #define __ardour_port_set_h__
24 #include <boost/utility.hpp>
46 size_t num_ports()
const;
71 bool empty()
const {
return (_count.n_total() == 0); }
73 template<
typename PS,
typename P>
86 : _set(list), _type(type), _index(index) {}
97 return iterator(*
this, type, 0);
101 return iterator(*
this, type,
102 (type ==
DataType::NIL) ? _count.n_total() : _count.get(type));
106 return const_iterator(*
this, type, 0);
110 return const_iterator(*
this, type,
111 (type ==
DataType::NIL) ? _count.n_total() : _count.get(type));
135 typedef std::vector<boost::shared_ptr<Port> >
PortVec;
148 #endif // __ardour_port_set_h__
boost::shared_ptr< P > operator*()
iterator_base< PS, P > & operator++()
iterator end(DataType type=DataType::NIL)
boost::shared_ptr< AudioPort > operator*()
std::vector< boost::shared_ptr< Port > > PortVec
const_iterator end(DataType type=DataType::NIL) const
bool operator==(const iterator_base< PS, P > &other)
boost::shared_ptr< P > operator->()
audio_iterator & operator++()
audio_iterator audio_end()
audio_iterator audio_begin()
size_t num_ports(DataType type) const
bool operator==(const audio_iterator &other)
audio_iterator(PortSet &list, size_t index)
bool operator!=(const iterator_base< PS, P > &other)
boost::shared_ptr< AudioPort > operator->()
iterator_base< PortSet, Port > iterator
DataType _type
Ignored if NIL (to iterator over entire set)
bool operator!=(const audio_iterator &other)
iterator begin(DataType type=DataType::NIL)
iterator_base< const PortSet, const Port > const_iterator
const ChanCount & count() const
std::vector< PortVec > _ports
const_iterator begin(DataType type=DataType::NIL) const