iterator for a BSONObj More...
#include <bsonobjiterator.h>
Public Member Functions | |
| BSONObjIterator (const BSONObj &jso) | |
| Create an iterator for a BSON object. | |
| BSONObjIterator (const char *start, const char *end) | |
| bool | more () |
| bool | moreWithEOO () |
| BSONElement | next (bool checkEnd) |
| BSONElement | next () |
| void | operator++ () |
| void | operator++ (int) |
| BSONElement | operator* () |
iterator for a BSONObj
Note each BSONObj ends with an EOO element: so you will get more() on an empty object, although next().eoo() will be true.
The BSONObj must stay in scope for the duration of the iterator's execution.
todo: we may want to make a more stl-like iterator interface for this with things like begin() and end()
| bool mongo::BSONObjIterator::more | ( | ) | [inline] |
| bool mongo::BSONObjIterator::moreWithEOO | ( | ) | [inline] |
| BSONElement mongo::BSONObjIterator::next | ( | bool | checkEnd | ) | [inline] |
1.6.3