summaryrefslogtreecommitdiff
path: root/src/mongo/util/options_parser/option_description.cpp
diff options
context:
space:
mode:
authorShaun Verch <shaun.verch@10gen.com>2013-10-17 22:23:45 -0400
committerShaun Verch <shaun.verch@10gen.com>2013-10-23 19:41:30 -0400
commit107978292c125ebb6674ad57548f1a4dc8f977d1 (patch)
tree3354909dcab4a6dfdd1013ea461bd948b54b19f7 /src/mongo/util/options_parser/option_description.cpp
parente7089550acfde9507dcae677e03000e8b2dad3b4 (diff)
downloadmongo-107978292c125ebb6674ad57548f1a4dc8f977d1.tar.gz
SERVER-11144 Chaining interface for option registration
Diffstat (limited to 'src/mongo/util/options_parser/option_description.cpp')
-rw-r--r--src/mongo/util/options_parser/option_description.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/option_description.cpp b/src/mongo/util/options_parser/option_description.cpp
new file mode 100644
index 00000000000..fe052c9f716
--- /dev/null
+++ b/src/mongo/util/options_parser/option_description.cpp
@@ -0,0 +1,39 @@
+/* Copyright 2013 10gen Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "mongo/util/options_parser/option_description.h"
+
+namespace mongo {
+namespace optionenvironment {
+
+ OptionDescription& OptionDescription::hidden() {
+ _isVisible = false;
+ return *this;
+ }
+ OptionDescription& OptionDescription::setDefault(Value defaultValue) {
+ _default = defaultValue;
+ return *this;
+ }
+ OptionDescription& OptionDescription::setImplicit(Value implicitValue) {
+ _implicit = implicitValue;
+ return *this;
+ }
+ OptionDescription& OptionDescription::composing() {
+ _isComposing = true;
+ return *this;
+ }
+
+} // namespace optionenvironment
+} // namespace mongo