Add size method

This commit is contained in:
fbraem
2013-02-27 19:50:05 +01:00
parent 2d3e78146d
commit d1b318b806

View File

@@ -207,6 +207,10 @@ public:
/// Reads a document from the reader
size_t size() const;
/// Returns the number of elements in the document.
virtual std::string toString(int indent = 0) const;
/// Returns a String representation of the document.
@@ -263,6 +267,12 @@ inline bool Document::exists(const std::string& name)
}
inline size_t Document::size() const
{
return _elements.size();
}
// BSON Embedded Document
// spec: document
template<>