Configuration *configuration
)
{
+ BOOST_ASSERT(configuration != NULL);
+
// help
if ( vm.count( HelpCmdStr ) > 0 )
{
Configuration *configuration
)
{
+ BOOST_ASSERT(configuration != NULL);
+
BOOST_FOREACH( ConfigurationOptionItem configuration_option, ConfigOptions )
{
bool validated = configuration_option->validate( vm );
}
}
+ bool hosts_parsed = parse_hosts_options(vm, configuration);
+
+ return hosts_parsed;
+}
+
+/**
+ * @brief Parse the hosts section options.
+ *
+ * @param vm The input @c boost::program_options::variables_map.
+ * @param configuration The output @c Configuration filled with the parsed
+ * hosts options.
+ *
+ * @return @c true if the hosts were parsed correctly, or @c false otherwise.
+ */
+bool ConfigurationOptions::parse_hosts_options(
+ const variables_map &vm,
+ Configuration *configuration
+)
+{
+ BOOST_ASSERT(configuration != NULL);
+
size_t host_down_limit_count = static_cast<size_t>( configuration->get_hosts_down_limit() );
BOOST_FOREACH( HostConfigurationOptionItem host_option, HostOptions )
) const;
private:
+ bool parse_hosts_options(
+ const boost::program_options::variables_map &vm,
+ Configuration *configuration
+ );
+
+private:
ConfigurationOptionList GenericOptions;
ConfigurationOptionList ConfigOptions;
HostConfigurationOptionList HostOptions;