#include <support/IIterable.h>
Inheritance diagram for IIterable:
The IIterable interface is a factory for generating iterators over a particular point in the Binder Data Model. This allows you to discover what data is available at that point in a namespace.
Clients will usually use the SIterator convenience class instead of making direct calls on an IIterable/IIterator. Implementations should never directly implement IIterable, instead deriving from BGenericIterable or one of its subclasses.
Note that iterators are not recursive. That is, they return to you all of the immediate children of the object you are iterating over. If you want to recursively iterate through the contents of those children, you will need to call Iterate() on each of the objects you retrieve from the original iterator.
Public Member Functions | |
status_t | LinkIterable (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
virtual sptr< IIterator > | NewIterator (const SValue &args=B_UNDEFINED_VALUE, status_t *error=NULL)=0 |
Walk through the namespace based on the given path. | |
status_t | UnlinkIterable (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
Protected Member Functions | |
IIterable () | |
virtual | ~IIterable () |
|
|
|
|
|
|
|
Walk through the namespace based on the given path.
Clients should usually use SIterator instead of calling NewIterator() directly. The options parameter is used to control what data is returned by the iterator. The available options are fairly implementation-dependent, but some common ones are described here. Because you can not know what any given IIterable object will be able to do, the IIterator interface you get back has a read-only options property with which you can find out how it is configured. Any of the options supplied to IIterate() that it understands will be propagated to the options property in the form it understood them.
See Binder Data Model for more detail on these options.
Implemented in BGenericIterable, BCatalogMirror, and BTokenSource. |
|
|