OpenShot Audio Library | OpenShotAudio: juce::AndroidDocumentIterator Class Reference

OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
juce::AndroidDocumentIterator Class Referencefinal

`#include <juce_AndroidDocument.h>`

## Public Types
using | difference_type = std::ptrdiff_t
using | pointer = void
using | iterator_category = std::input_iterator_tag

## Public Member Functions
| AndroidDocumentIterator ()=default
bool | operator== (const AndroidDocumentIterator &other) const noexcept
bool | operator!= (const AndroidDocumentIterator &other) const noexcept
AndroidDocument | operator* () const
AndroidDocumentIterator & | operator++ ()
AndroidDocumentIterator | begin () const
AndroidDocumentIterator | end () const

## Static Public Member Functions
static AndroidDocumentIterator | makeNonRecursive (const AndroidDocument &)
static AndroidDocumentIterator | makeRecursive (const AndroidDocument &)

## Detailed Description

An iterator that visits child documents in a directory.

Instances of this iterator can be created by calling makeRecursive() or makeNonRecursive(). The results of these functions can additionally be used in standard algorithms, and in range-for loops:

AndroidDocument findFileWithName (const AndroidDocument& parent, const String& name)
{
for (const auto& child : AndroidDocumentIterator::makeNonRecursive (parent))
if (child.getInfo().getName() == name)
return child;
return AndroidDocument();
}
std::vector<AndroidDocument> findAllChildrenRecursive (const AndroidDocument& parent)
{
std::vector<AndroidDocument> children;
std::copy (AndroidDocumentIterator::makeRecursive (doc),
AndroidDocumentIterator(),
std::back_inserter (children));
return children;
}
juce::AndroidDocumentIterator::makeNonRecursive
static AndroidDocumentIterator makeNonRecursive(const AndroidDocument &)
juce::AndroidDocumentIterator::makeRecursive
static AndroidDocumentIterator makeRecursive(const AndroidDocument &)
juce::AndroidDocumentIterator::AndroidDocumentIterator
AndroidDocumentIterator()=default
juce::AndroidDocument
Definition juce_AndroidDocument.h:242
juce::String
Definition juce_String.h:53

Definition at line 436 of file juce_AndroidDocument.h.

## Member Typedef Documentation

## ◆ difference_type

using juce::AndroidDocumentIterator::difference_type = std::ptrdiff_t

Definition at line 439 of file juce_AndroidDocument.h.

## ◆ iterator_category

using juce::AndroidDocumentIterator::iterator_category = std::input_iterator_tag

Definition at line 441 of file juce_AndroidDocument.h.

## ◆ pointer

using juce::AndroidDocumentIterator::pointer = void

Definition at line 440 of file juce_AndroidDocument.h.

## Constructor & Destructor Documentation

## ◆ AndroidDocumentIterator()

juce::AndroidDocumentIterator::AndroidDocumentIterator | ( |  | ) |
| default

Creates an end/sentinel iterator.

## Member Function Documentation

## ◆ begin()

AndroidDocumentIterator juce::AndroidDocumentIterator::begin | ( |  | ) | const
| inline

Allows this iterator to be used directly in a range-for.

Definition at line 462 of file juce_AndroidDocument.h.

## ◆ end()

AndroidDocumentIterator juce::AndroidDocumentIterator::end | ( |  | ) | const
| inline

Allows this iterator to be used directly in a range-for.

Definition at line 465 of file juce_AndroidDocument.h.

## ◆ makeNonRecursive()

static AndroidDocumentIterator juce::AndroidDocumentIterator::makeNonRecursive | ( | const AndroidDocument & |  | ) |
| static

Create an iterator that will visit each item in this directory.

## ◆ makeRecursive()

static AndroidDocumentIterator juce::AndroidDocumentIterator::makeRecursive | ( | const AndroidDocument & |  | ) |
| static

Create an iterator that will visit each item in this directory, and all nested directories.

## ◆ operator!=()

bool juce::AndroidDocumentIterator::operator!= | ( | const AndroidDocumentIterator & | other | ) | const
| inlinenoexcept

Definition at line 453 of file juce_AndroidDocument.h.

## ◆ operator*()

AndroidDocument juce::AndroidDocumentIterator::operator* | ( |  | ) | const

Returns the document to which this iterator points.

## ◆ operator++()

AndroidDocumentIterator & juce::AndroidDocumentIterator::operator++ | ( |  | ) |

Moves this iterator to the next position.

## ◆ operator==()

bool juce::AndroidDocumentIterator::operator== | ( | const AndroidDocumentIterator & | other | ) | const
| inlinenoexcept

Definition at line 452 of file juce_AndroidDocument.h.

The documentation for this class was generated from the following file:

- juce_AndroidDocument.h