Mercurial > hg > sv-dependency-builds
annotate src/portaudio/bindings/cpp/include/portaudiocpp/SystemDeviceIterator.hxx @ 98:4188fd8db918
Add Rubber Band build
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 20 Mar 2013 15:58:55 +0000 |
parents | 8a15ff55d9af |
children |
rev | line source |
---|---|
cannam@89 | 1 #ifndef INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX |
cannam@89 | 2 #define INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX |
cannam@89 | 3 |
cannam@89 | 4 // --------------------------------------------------------------------------------------- |
cannam@89 | 5 |
cannam@89 | 6 #include <iterator> |
cannam@89 | 7 #include <cstddef> |
cannam@89 | 8 |
cannam@89 | 9 #include "portaudiocpp/System.hxx" |
cannam@89 | 10 |
cannam@89 | 11 // --------------------------------------------------------------------------------------- |
cannam@89 | 12 |
cannam@89 | 13 // Forward declaration(s): |
cannam@89 | 14 namespace portaudio |
cannam@89 | 15 { |
cannam@89 | 16 class Device; |
cannam@89 | 17 class HostApi; |
cannam@89 | 18 } |
cannam@89 | 19 |
cannam@89 | 20 // --------------------------------------------------------------------------------------- |
cannam@89 | 21 |
cannam@89 | 22 // Declaration(s): |
cannam@89 | 23 namespace portaudio |
cannam@89 | 24 { |
cannam@89 | 25 |
cannam@89 | 26 |
cannam@89 | 27 ////// |
cannam@89 | 28 /// @brief Iterator class for iterating through all Devices in a System. |
cannam@89 | 29 /// |
cannam@89 | 30 /// Devices will be iterated by iterating all Devices in each |
cannam@89 | 31 /// HostApi in the System. Compliant with the STL bidirectional |
cannam@89 | 32 /// iterator concept. |
cannam@89 | 33 ////// |
cannam@89 | 34 class System::DeviceIterator |
cannam@89 | 35 { |
cannam@89 | 36 public: |
cannam@89 | 37 typedef std::bidirectional_iterator_tag iterator_category; |
cannam@89 | 38 typedef Device value_type; |
cannam@89 | 39 typedef ptrdiff_t difference_type; |
cannam@89 | 40 typedef Device * pointer; |
cannam@89 | 41 typedef Device & reference; |
cannam@89 | 42 |
cannam@89 | 43 Device &operator*() const; |
cannam@89 | 44 Device *operator->() const; |
cannam@89 | 45 |
cannam@89 | 46 DeviceIterator &operator++(); |
cannam@89 | 47 DeviceIterator operator++(int); |
cannam@89 | 48 DeviceIterator &operator--(); |
cannam@89 | 49 DeviceIterator operator--(int); |
cannam@89 | 50 |
cannam@89 | 51 bool operator==(const DeviceIterator &rhs); |
cannam@89 | 52 bool operator!=(const DeviceIterator &rhs); |
cannam@89 | 53 |
cannam@89 | 54 private: |
cannam@89 | 55 friend class System; |
cannam@89 | 56 friend class HostApi; |
cannam@89 | 57 Device **ptr_; |
cannam@89 | 58 }; |
cannam@89 | 59 |
cannam@89 | 60 |
cannam@89 | 61 } // namespace portaudio |
cannam@89 | 62 |
cannam@89 | 63 // --------------------------------------------------------------------------------------- |
cannam@89 | 64 |
cannam@89 | 65 #endif // INCLUDED_PORTAUDIO_SYSTEMDEVICEITERATOR_HXX |
cannam@89 | 66 |