CatapultServer  v0.5.0.1 (Elephant)
Options.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/types.h"
23 #include <boost/program_options.hpp>
24 
25 namespace catapult { namespace tools {
26 
28  using OptionsBuilder = boost::program_options::options_description_easy_init;
29 
31  using OptionsPositional = boost::program_options::positional_options_description;
32 
34  using Options = boost::program_options::variables_map;
35 
37  template<typename TValue>
38  auto OptionsValue() {
39  return boost::program_options::value<TValue>();
40  }
41 
43  template<typename TValue>
44  auto OptionsValue(TValue& value) {
45  return boost::program_options::value<TValue>(&value);
46  }
47 
49  inline auto OptionsSwitch() {
50  return boost::program_options::bool_switch();
51  }
52 }}
catapult::tools::Options
boost::program_options::variables_map Options
Provides access to parsed options.
Definition: Options.h:34
catapult::tools::OptionsPositional
boost::program_options::positional_options_description OptionsPositional
Definition of positional arguments.
Definition: Options.h:31
catapult::tools::OptionsSwitch
auto OptionsSwitch()
Helper wrapper to simplify defining toggle values.
Definition: Options.h:49
catapult::tools::OptionsValue
auto OptionsValue()
Helper wrapper to simplify defining values with no specified storage.
Definition: Options.h:38
catapult::tools::OptionsBuilder
boost::program_options::options_description_easy_init OptionsBuilder
Options builder.
Definition: Options.h:28
types.h
catapult
Definition: AddressExtractionExtension.cpp:28