diff options
author | Tad Marshall <tad@10gen.com> | 2012-05-20 10:38:53 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-05-20 16:30:21 -0400 |
commit | 0a5953d46bb50c12095054ab434a56fd9e7f1172 (patch) | |
tree | 8360491a294972c5dbf9f9b1f6170dcba0fda0a9 /src/mongo/bson/bsonelement.h | |
parent | fa79e6978f17d9db78d71bbcfffb1032a83f7c09 (diff) | |
download | mongo-0a5953d46bb50c12095054ab434a56fd9e7f1172.tar.gz |
Some cleanup of headers and whitespace
Try to impose current kernel style guide rules for include files on a
subset of files: include what you use, start include paths from "mongo/",
group and sort includes alphabetically. Changed tabs to spaces in a few
places, fixed alignment where tabs had throw it off.
Diffstat (limited to 'src/mongo/bson/bsonelement.h')
-rw-r--r-- | src/mongo/bson/bsonelement.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index 49fbe5d7513..497b2677379 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -1,4 +1,4 @@ -// BSONElement +// bsonelement.h /* Copyright 2009 10gen Inc. * @@ -18,11 +18,11 @@ #pragma once #include <string.h> // strlen +#include <string> #include <vector> #include "mongo/bson/bsontypes.h" #include "mongo/bson/oid.h" -#include "mongo/bson/util/builder.h" #include "mongo/platform/float_utils.h" namespace mongo { @@ -76,12 +76,12 @@ namespace mongo { void Null() const { chk(isNull()); } // throw UserException if not null void OK() const { chk(ok()); } // throw UserException if element DNE - /** @return the embedded object associated with this field. + /** @return the embedded object associated with this field. Note the returned object is a reference to within the parent bson object. If that - object is out of scope, this pointer will no longer be valid. Call getOwned() on the - returned BSONObj if you need your own copy. - throws UserException if the element is not of type object. - */ + object is out of scope, this pointer will no longer be valid. Call getOwned() on the + returned BSONObj if you need your own copy. + throws UserException if the element is not of type object. + */ BSONObj Obj() const; /** populate v with the value of the element. If type does not match, throw exception. @@ -479,7 +479,6 @@ namespace mongo { } }; - inline int BSONElement::canonicalType() const { BSONType t = type(); switch ( t ) { |