diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2013-10-17 22:23:45 -0400 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2013-10-23 19:41:30 -0400 |
commit | 107978292c125ebb6674ad57548f1a4dc8f977d1 (patch) | |
tree | 3354909dcab4a6dfdd1013ea461bd948b54b19f7 /src/mongo/util/options_parser/option_description.cpp | |
parent | e7089550acfde9507dcae677e03000e8b2dad3b4 (diff) | |
download | mongo-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.cpp | 39 |
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 |