summaryrefslogtreecommitdiff
path: root/src/mongo/s/mongo_version_range.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/mongo_version_range.h')
-rw-r--r--src/mongo/s/mongo_version_range.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/src/mongo/s/mongo_version_range.h b/src/mongo/s/mongo_version_range.h
index fcdc4dca4c2..2e5c443fcc9 100644
--- a/src/mongo/s/mongo_version_range.h
+++ b/src/mongo/s/mongo_version_range.h
@@ -36,33 +36,31 @@
namespace mongo {
- /**
- * The MongoVersionRange represents a min/max of MongoDB versions, useful for
- * excluding/including particular versions.
- *
- * The ranges may be single-version, in which case maxVersion == "", where only exact prefix
- * matches are included in the range. Alternately, the range may have a min and max version
- * and include any version with a prefix of the min and max version as well as all versions
- * between the two.
- */
- struct MongoVersionRange {
-
- static bool parseBSONArray(const BSONArray& arr,
- std::vector<MongoVersionRange>* excludes,
- std::string* errMsg);
+/**
+ * The MongoVersionRange represents a min/max of MongoDB versions, useful for
+ * excluding/including particular versions.
+ *
+ * The ranges may be single-version, in which case maxVersion == "", where only exact prefix
+ * matches are included in the range. Alternately, the range may have a min and max version
+ * and include any version with a prefix of the min and max version as well as all versions
+ * between the two.
+ */
+struct MongoVersionRange {
+ static bool parseBSONArray(const BSONArray& arr,
+ std::vector<MongoVersionRange>* excludes,
+ std::string* errMsg);
- static BSONArray toBSONArray(const std::vector<MongoVersionRange>& ranges);
+ static BSONArray toBSONArray(const std::vector<MongoVersionRange>& ranges);
- bool parseBSONElement(const BSONElement& el, std::string* errMsg);
+ bool parseBSONElement(const BSONElement& el, std::string* errMsg);
- void toBSONElement(BSONArrayBuilder* barr) const;
+ void toBSONElement(BSONArrayBuilder* barr) const;
- bool isInRange(StringData version) const;
+ bool isInRange(StringData version) const;
- std::string minVersion;
- std::string maxVersion;
- };
+ std::string minVersion;
+ std::string maxVersion;
+};
- bool isInMongoVersionRanges(StringData version,
- const std::vector<MongoVersionRange>& ranges);
+bool isInMongoVersionRanges(StringData version, const std::vector<MongoVersionRange>& ranges);
}