summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2013-08-07 18:44:39 -0400
committerMathias Stearn <mathias@10gen.com>2013-08-09 13:38:27 -0400
commitbab9ab6d5b8687aa2a5bc0907ea07f8f5a90caf1 (patch)
treeab80ac7e49bbc2bfd6037d90825563ed0e574cc1 /src/mongo/db/pipeline/document.h
parent6b7cce6be7d9fbec8b0b262654b9a5512bd06746 (diff)
downloadmongo-bab9ab6d5b8687aa2a5bc0907ea07f8f5a90caf1.tar.gz
Remove deprecated methods from Document
Diffstat (limited to 'src/mongo/db/pipeline/document.h')
-rw-r--r--src/mongo/db/pipeline/document.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mongo/db/pipeline/document.h b/src/mongo/db/pipeline/document.h
index 9c72d56cda0..d323f60a82b 100644
--- a/src/mongo/db/pipeline/document.h
+++ b/src/mongo/db/pipeline/document.h
@@ -150,24 +150,16 @@ namespace mongo {
int memUsageForSorter() const { return getApproximateSize(); }
Document getOwned() const { return *this; }
- // TEMP for compatibility with legacy intrusive_ptr<Document>
- Document& operator*() { return *this; }
- const Document& operator*() const { return *this; }
- Document* operator->() { return this; }
- const Document* operator->() const { return this; }
+ /// only for testing
const void* getPtr() const { return _storage.get(); }
- void reset() { return _storage.reset(); }
- static Document createFromBsonObj(BSONObj* pBsonObj) { return Document(*pBsonObj); }
- size_t getFieldCount() const { return size(); }
- Value getValue(StringData fieldName) const { return getField(fieldName); }
-
- explicit Document(const DocumentStorage* ptr) : _storage(ptr) {};
private:
friend class FieldIterator;
friend class ValueStorage;
friend class MutableDocument;
+ explicit Document(const DocumentStorage* ptr) : _storage(ptr) {};
+
const DocumentStorage& storage() const {
return (_storage ? *_storage : DocumentStorage::emptyDoc());
}