48 _theend = jso.
objdata() + sz - 1;
56 BSONObjIterator(
const char * start ,
const char * end ) {
62 bool more() {
return _pos < _theend; }
71 assert( _pos <= _theend );
72 BSONElement e( _pos, checkEnd ? (
int)(_theend + 1 - _pos) : -1 );
73 _pos += e.
size( checkEnd ? (
int)(_theend + 1 - _pos) : -1 );
77 assert( _pos <= _theend );
82 void operator++() { next(); }
83 void operator++(
int) {
next(); }
85 BSONElement operator*() {
86 assert( _pos <= _theend );
87 return BSONElement(_pos);
95 #define BSONOBJITERSORTED_DFTFIELDS 100
102 if ( _fields != &_staticFields[0] )
108 return _cur < _nfields;
113 if ( _cur < _nfields )
119 const char ** _fields;
120 const char *_staticFields[BSONOBJITERSORTED_DFTFIELDS] ;