summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/bson/bsonobj.cpp45
-rw-r--r--src/mongo/bson/bsonobj.h21
2 files changed, 0 insertions, 66 deletions
diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp
index 0fc1a2461dd..209142a9921 100644
--- a/src/mongo/bson/bsonobj.cpp
+++ b/src/mongo/bson/bsonobj.cpp
@@ -820,49 +820,4 @@ namespace mongo {
return s;
}
- template <class T>
- void BSONObj::Vals(std::vector<T>& v) const {
- BSONObjIterator i(*this);
- while( i.more() ) {
- T t;
- i.next().Val(t);
- v.push_back(t);
- }
- }
- template <class T>
- void BSONObj::Vals(std::list<T>& v) const {
- BSONObjIterator i(*this);
- while( i.more() ) {
- T t;
- i.next().Val(t);
- v.push_back(t);
- }
- }
-
- template <class T>
- void BSONObj::vals(std::vector<T>& v) const {
- BSONObjIterator i(*this);
- while( i.more() ) {
- try {
- T t;
- i.next().Val(t);
- v.push_back(t);
- }
- catch(...) { }
- }
- }
- template <class T>
- void BSONObj::vals(std::list<T>& v) const {
- BSONObjIterator i(*this);
- while( i.more() ) {
- try {
- T t;
- i.next().Val(t);
- v.push_back(t);
- }
- catch(...) { }
- }
- }
-
-
} // namespace mongo
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h
index 08055ecbb22..206a10078e6 100644
--- a/src/mongo/bson/bsonobj.h
+++ b/src/mongo/bson/bsonobj.h
@@ -474,27 +474,6 @@ namespace mongo {
/** add all elements of the object to the specified list */
void elems(std::list<BSONElement> &) const;
- /** add all values of the object to the specified vector. If type mismatches, exception.
- this is most useful when the BSONObj is an array, but can be used with non-arrays too in theory.
-
- example:
- bo sub = y["subobj"].Obj();
- std::vector<int> myints;
- sub.Vals(myints);
- */
- template <class T>
- void Vals(std::vector<T> &) const;
- /** add all values of the object to the specified list. If type mismatches, exception. */
- template <class T>
- void Vals(std::list<T> &) const;
-
- /** add all values of the object to the specified vector. If type mismatches, skip. */
- template <class T>
- void vals(std::vector<T> &) const;
- /** add all values of the object to the specified list. If type mismatches, skip. */
- template <class T>
- void vals(std::list<T> &) const;
-
friend class BSONObjIterator;
typedef BSONObjIterator iterator;