From cf65d861310dcca50c0d6bd8d26187d33f4a4cb1 Mon Sep 17 00:00:00 2001 From: dwight Date: Sun, 8 Feb 2009 21:00:26 -0500 Subject: doxygen for bsonobjiterator --- db/jsobj.h | 6 +++++- dbgrid/dbgrid.vcproj | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/db/jsobj.h b/db/jsobj.h index 6543064f6b7..9e754eb2f55 100644 --- a/db/jsobj.h +++ b/db/jsobj.h @@ -985,13 +985,15 @@ namespace mongo { }; - /* iterator for a BSONObj + /** 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. */ class BSONObjIterator { public: + /** Create an iterator for a BSON object. + */ BSONObjIterator(const BSONObj& jso) { int sz = jso.objsize(); if ( sz == 0 ) { @@ -1001,9 +1003,11 @@ namespace mongo { pos = jso.objdata() + 4; theend = jso.objdata() + sz; } + /** @return true if more elements exist to be enumerated. */ bool more() { return pos < theend; } + /** @return the next element in the object. For the final element, element.eoo() will be true. */ BSONElement next( bool checkEnd = false ) { assert( pos < theend ); BSONElement e( pos, checkEnd ? theend - pos : -1 ); diff --git a/dbgrid/dbgrid.vcproj b/dbgrid/dbgrid.vcproj index 8fc514dbea2..6d3e790b8f3 100644 --- a/dbgrid/dbgrid.vcproj +++ b/dbgrid/dbgrid.vcproj @@ -330,11 +330,11 @@ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" >