diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-11-28 03:40:02 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-11-28 03:40:02 -0500 |
commit | a8115022f0dc2e437c16695d12faf284ae544f8e (patch) | |
tree | 5f51f44919eb7e87f7437ae20b088b8a04a88244 /bson/bson-inl.h | |
parent | 108401044ce1d7a2ee23a398d4b46d4f602733a6 (diff) | |
download | mongo-a8115022f0dc2e437c16695d12faf284ae544f8e.tar.gz |
StringBuilder support for BSONObj/BSONElement
Diffstat (limited to 'bson/bson-inl.h')
-rw-r--r-- | bson/bson-inl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bson/bson-inl.h b/bson/bson-inl.h index aa430e65503..5ed7f0d6d03 100644 --- a/bson/bson-inl.h +++ b/bson/bson-inl.h @@ -614,6 +614,16 @@ namespace mongo { return s << e.toString(); } + inline StringBuilder& operator<<( StringBuilder &s, const BSONObj &o ) { + o.toString( s ); + return s; + } + inline StringBuilder& operator<<( StringBuilder &s, const BSONElement &e ) { + e.toString( s ); + return s; + } + + inline void BSONElement::Val(BSONObj& v) const { v = Obj(); } template<typename T> |