BValueIterator Class Reference
[Data Model]

#include <support/Iterator.h>

Inheritance diagram for BValueIterator:

BnIterator IIterator BBinder IInterface IBinder SAtom SAtom List of all members.

Public Member Functions

 BValueIterator (const SValue &value)
virtual status_t Next (IIterator::ValueList *keys, IIterator::ValueList *values, uint32_t flags, size_t count=0)
 Return a batch of keys and values from the iteration.
virtual SValue Options () const
 The iterable options that are in force for this iterator.
virtual status_t Remove ()

Protected Member Functions

virtual ~BValueIterator ()

Constructor & Destructor Documentation

BValueIterator const SValue value  ) 
 

~BValueIterator  )  [protected, virtual]
 


Member Function Documentation

status_t Next IIterator::ValueList keys,
IIterator::ValueList values,
uint32_t  flags,
size_t  count = 0
[virtual]
 

Return a batch of keys and values from the iteration.

Parameters:
[out] keys The mapping keys. If your iterator is returning simple values (not mappings), the keys can be B_WILD_VALUE, or you can just make this sequence empty.
[out] values The value of each item. Must be returned.
[in] flags Any of REQUEST_DATA, COLLAPSE_NODE, IGNORE_PROJECTION.
[in] count A "hint" about how many results you want. (You may get more, or fewer.) Use 0 for "don't care".
Returns:
B_OK if results were returned, B_END_OF_DATA if there is no more data in the iterator, or some other error code if an error occurred.
This API is designed, for performance reasons, to return iteration results as batches. You will usually use SIterator::Next() to hide that batching mechanism and retrieve the entries one at a time. In either case, the function will return B_END_OF_DATA once you have reached the end of the iterator's data.

The iterator may return key/value pairs, or single values. If returning single values, by the SValue mapping rules the key should always be B_WILD_VALUE.

The Next() method can be given a flags parameter. Like INode::Walk(), you can supply REQUEST_DATA and COLLAPSE_NODE in the function's flags, with the corresponding semantics for the values the iterator returns. Also like INode::Walk(), the iterator is free to ignore these flags.

Implements IIterator.

SValue Options  )  const [virtual]
 

The iterable options that are in force for this iterator.

You can use this determine which of the arguments given to IIterable::NewIterator() are in force for this iterator, and in what way. These are the same form as the arguments supplied to IIterable::NewIterator().

Implements IIterator.

status_t Remove  )  [virtual]
 


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