From a4dd0ad63c00f4dee3b86dfd3075d1d61b2b3180 Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 27 Aug 2022 23:52:56 -0500 Subject: add plibsys --- .../include/portaudiocpp/SystemHostApiIterator.hxx | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx (limited to '3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx') diff --git a/3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx b/3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx new file mode 100644 index 0000000..3e6a978 --- /dev/null +++ b/3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx @@ -0,0 +1,61 @@ +#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX +#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX + +// --------------------------------------------------------------------------------------- + +#include +#include + +#include "portaudiocpp/System.hxx" + +// --------------------------------------------------------------------------------------- + +// Forward declaration(s): +namespace portaudio +{ + class HostApi; +} + +// --------------------------------------------------------------------------------------- + +// Declaration(s): +namespace portaudio +{ + + + ////// + /// @brief Iterator class for iterating through all HostApis in a System. + /// + /// Compliant with the STL bidirectional iterator concept. + ////// + class System::HostApiIterator + { + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef Device value_type; + typedef ptrdiff_t difference_type; + typedef HostApi * pointer; + typedef HostApi & reference; + + HostApi &operator*() const; + HostApi *operator->() const; + + HostApiIterator &operator++(); + HostApiIterator operator++(int); + HostApiIterator &operator--(); + HostApiIterator operator--(int); + + bool operator==(const HostApiIterator &rhs) const; + bool operator!=(const HostApiIterator &rhs) const; + + private: + friend class System; + HostApi **ptr_; + }; + + +} // namespace portaudio + +// --------------------------------------------------------------------------------------- + +#endif // INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX -- cgit v1.2.1