Loading...
Searching...
No Matches
juce::AndroidDocumentIterator Class Referencefinal

## 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 &)
Create an iterator that will visit each item in this directory.
juce::AndroidDocumentIterator::makeRecursive
static AndroidDocumentIterator makeRecursive(const AndroidDocument &)
Create an iterator that will visit each item in this directory, and all nested directories.
juce::AndroidDocumentIterator::AndroidDocumentIterator
AndroidDocumentIterator()=default
Creates an end/sentinel iterator.
juce::AndroidDocument
Provides access to a document on Android devices.
Definition juce_AndroidDocument.h:254
juce::String
The JUCE String class!
Definition juce_String.h:67
name
int UnityEventModifiers const char * name
Definition juce_UnityPluginInterface.h:201

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

- juce_core/files/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
| Creates an end/sentinel iterator.
bool | operator== (const AndroidDocumentIterator &other) const noexcept
bool | operator!= (const AndroidDocumentIterator &other) const noexcept
AndroidDocument | operator* () const
| Returns the document to which this iterator points.
AndroidDocumentIterator & | operator++ ()
| Moves this iterator to the next position.
AndroidDocumentIterator | begin () const
| Allows this iterator to be used directly in a range-for.
AndroidDocumentIterator | end () const
| Allows this iterator to be used directly in a range-for.

## Static Public Member Functions

static AndroidDocumentIterator | makeNonRecursive (const AndroidDocument &)
| Create an iterator that will visit each item in this directory.
static AndroidDocumentIterator | makeRecursive (const AndroidDocument &)
| Create an iterator that will visit each item in this directory, and all nested directories.

## Member Typedef Documentation

## difference_type

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

## pointer

using juce::AndroidDocumentIterator::pointer = void

## iterator_category

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

## Constructors and Destructors

## AndroidDocumentIterator()

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

default

Creates an end/sentinel iterator.

Referenced by begin(), end(), makeNonRecursive(), makeRecursive(), operator!=(), operator++(), and operator==().

## Member Functions

## makeNonRecursive()

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

static

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

References AndroidDocumentIterator().

## makeRecursive()

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

static

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

References AndroidDocumentIterator().

## operator==()

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

inline noexcept

References AndroidDocumentIterator().

Referenced by operator!=().

## operator!=()

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

inline noexcept

References AndroidDocumentIterator(), and operator==().

## 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.

References AndroidDocumentIterator().

## begin()

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

inline

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

References AndroidDocumentIterator().

## end()

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

inline

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

References AndroidDocumentIterator().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited