#include <bsonobjiterator.h>
Public Member Functions | |
BSONObjIterator (const char *start, const char *end) | |
BSONObjIterator (const BSONObj &jso) | |
bool | more () |
bool | moreWithEOO () |
BSONElement | next (bool checkEnd=false) |
BSONElement | operator* () |
void | operator++ (int) |
void | operator++ () |
Private Attributes | |
const char * | _pos |
const char * | _theend |
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.
todo: we may want to make a more stl-like iterator interface for this with things like begin() and end()
Definition at line 32 of file bsonobjiterator.h.
mongo::BSONObjIterator::BSONObjIterator | ( | const BSONObj & | jso | ) | [inline] |
Create an iterator for a BSON object.
Definition at line 36 of file bsonobjiterator.h.
mongo::BSONObjIterator::BSONObjIterator | ( | const char * | start, | |
const char * | end | |||
) | [inline] |
Definition at line 46 of file bsonobjiterator.h.
bool mongo::BSONObjIterator::more | ( | ) | [inline] |
Definition at line 52 of file bsonobjiterator.h.
bool mongo::BSONObjIterator::moreWithEOO | ( | ) | [inline] |
Definition at line 55 of file bsonobjiterator.h.
BSONElement mongo::BSONObjIterator::next | ( | bool | checkEnd = false |
) | [inline] |
Definition at line 58 of file bsonobjiterator.h.
BSONElement mongo::BSONObjIterator::operator* | ( | ) | [inline] |
Definition at line 68 of file bsonobjiterator.h.
void mongo::BSONObjIterator::operator++ | ( | int | ) | [inline] |
Definition at line 66 of file bsonobjiterator.h.
void mongo::BSONObjIterator::operator++ | ( | ) | [inline] |
Definition at line 65 of file bsonobjiterator.h.
const char* mongo::BSONObjIterator::_pos [private] |
Definition at line 74 of file bsonobjiterator.h.
const char* mongo::BSONObjIterator::_theend [private] |
Definition at line 75 of file bsonobjiterator.h.