diff options
author | Shaun Verch <shaun.verch@10gen.com> | 2013-08-18 11:23:55 -0700 |
---|---|---|
committer | Shaun Verch <shaun.verch@10gen.com> | 2013-09-05 13:49:33 -0400 |
commit | 43e7502572b4a217eb3f57eee479585ae2a2d19e (patch) | |
tree | 7db0ce4aec250b4147ec03842c526a194eda64c0 /src/mongo/util/options_parser/environment.h | |
parent | 4ffd53218fc9d8ad63e34c7cfec4247da2d1bef7 (diff) | |
download | mongo-43e7502572b4a217eb3f57eee479585ae2a2d19e.tar.gz |
SERVER-8510 Added legacy interface to Environment and Value to ease transition from variables_map
Diffstat (limited to 'src/mongo/util/options_parser/environment.h')
-rw-r--r-- | src/mongo/util/options_parser/environment.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/environment.h b/src/mongo/util/options_parser/environment.h index 15725d08814..c31c5ed0bfe 100644 --- a/src/mongo/util/options_parser/environment.h +++ b/src/mongo/util/options_parser/environment.h @@ -139,6 +139,21 @@ namespace optionenvironment { */ Status setAll(const Environment& other); + /** The functions below are the legacy interface to be consistent with + * boost::program_options::variables_map during the transition period + */ + + /** + * @return 1 if the given Key has a Value set in this Environment and 0 if not + */ + bool count(const Key& key) const; + + /** + * @return the Value for the given Key in this Environment. Returns an empty Value if + * Key is not set. + */ + Value operator[](const Key& key) const; + /* Debugging */ void dump(); |