summaryrefslogtreecommitdiff
path: root/src/mongo/bson
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2014-08-11 15:12:00 -0400
committerAndrew Morrow <acm@mongodb.com>2014-08-12 13:27:21 -0400
commitf3bcadd173c368efbfdbe8900bf4bdb31bb5ac9c (patch)
tree0303ca4bafc5d21963ad8638200a514d13caf51a /src/mongo/bson
parentf8097fb0f8c4c52bbf117e5d5aaa16f9008937c1 (diff)
downloadmongo-f3bcadd173c368efbfdbe8900bf4bdb31bb5ac9c.tar.gz
SERVER-14839 Remove unused BSONObj::[vV]als methods
Diffstat (limited to 'src/mongo/bson')
-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;