21 #ifndef FILE_OPTIONS_HPP
22 #define FILE_OPTIONS_HPP
61 ErrorCode get_null_option(
const char* name )
const;
74 ErrorCode get_toggle_option(
const char* name,
bool default_value,
bool& value )
const;
85 ErrorCode get_int_option(
const char* name,
int& value )
const;
106 ErrorCode get_int_option(
const char* name,
int default_val,
int& value )
const;
117 ErrorCode get_real_option(
const char* name,
double& value )
const;
128 ErrorCode get_str_option(
const char* name, std::string& value )
const;
137 ErrorCode get_option(
const char* name, std::string& value )
const;
151 ErrorCode match_option(
const char* name,
const char*
const* values,
int& index )
const;
162 ErrorCode match_option(
const char* name,
const char* value )
const;
177 ErrorCode get_ints_option(
const char* name, std::vector< int >& values )
const;
190 ErrorCode get_reals_option(
const char* name, std::vector< double >& values )
const;
203 ErrorCode get_strs_option(
const char* name, std::vector< std::string >& values )
const;
208 return mOptions.size();
214 return mOptions.empty();
218 void get_options( std::vector< std::string >& list )
const;
221 bool all_seen()
const;
224 void mark_all_seen()
const;
227 ErrorCode get_unseen_option( std::string& value )
const;
237 ErrorCode get_option(
const char* name,
const char*& value )
const;
244 static bool compare(
const char* name,
const char* option );