diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-10-17 22:29:12 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-10-17 22:29:12 -0400 |
commit | 738b686c1210f1435fa1dc1bf4252565c9eb2e8a (patch) | |
tree | 76ee42b477b47d6ded1448e49e13b28fe3cb7aa4 /bson | |
parent | 24e69084c3a294a76c51393d39be34801db58306 (diff) | |
download | mongo-738b686c1210f1435fa1dc1bf4252565c9eb2e8a.tar.gz |
way to get len() on BSON(Obj|Array)Builder
Diffstat (limited to 'bson')
-rw-r--r-- | bson/bsonobjbuilder.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bson/bsonobjbuilder.h b/bson/bsonobjbuilder.h index 82b1e31c69e..fefa7ea19d7 100644 --- a/bson/bsonobjbuilder.h +++ b/bson/bsonobjbuilder.h @@ -608,6 +608,8 @@ namespace mongo { bool owned() const { return &_b == &_buf; } BSONObjIterator iterator() const ; + + int len() const { return _b.len(); } private: char* _done() { @@ -694,6 +696,8 @@ namespace mongo { append( e ); } + int len() const { return _b.len(); } + private: void fill( const StringData& name ) { char *r; |