summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/portaudio/bindings/cpp/include/portaudiocpp/SystemHostApiIterator.hxx
blob: a3e2f4b3c236e7e46e4e54b391290ee83b662610 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX
#define INCLUDED_PORTAUDIO_SYSTEMHOSTAPIITERATOR_HXX

// ---------------------------------------------------------------------------------------

#include <iterator>
#include <cstddef>

#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