6 #include <boost/program_options.hpp>
43 static std::string
path();
52 static std::string
query();
65 static void void_to_bash(std::vector<std::string> &arguments);
68 static void path_to_bash(std::vector<std::string> &arguments);
77 static void query_to_bash(std::vector<std::string> &arguments);
105 OptionHandlerBase(
const std::string &init_option_tag,
const std::string &init_descriptor);
108 po::variables_map &
vm();
111 const po::variables_map &
vm()
const;
114 const po::options_description &
desc();
117 const std::string &
tag()
const;
279 const std::vector<std::string> &
config_strs()
const;
337 const std::string &
exec_str()
const;
363 const std::vector<std::string> &
columns_vec()
const;
444 const std::string &
set_str()
const;
469 const std::vector<std::string> &
calc_vec()
const;
521 const std::vector<fs::path> &
pos_vec()
const;
627 const std::vector<std::string> &
input_vec()
const;
const std::string & exec_str() const
COORD_TYPE coordtype_enum() const
Return the coordinate type recasted as the CASM defined enum.
std::vector< std::string > m_columns_vec
void initialize() override
Fill in the options descriptions accordingly.
std::string m_input_str
The settings path to go with add_input_suboption()
std::vector< std::string > m_calc_vec
static void operator_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for OPERATOR.
const std::string & coordtype_str() const
Return the coordinate type in the form of a string.
std::vector< std::string > m_help_opt_vec
The list of strings to go with add_general_help_suboption()
std::vector< std::string > m_new_alias_vec
std::string m_supercell_str
The string of the supercell name of add_scelname_suboption()
const std::vector< std::string > & input_vec() const
void add_output_suboption()
Add a –output suboption. Expects to allow "STDOUT" to print to screen.
void initialize() override
Fill in the options descriptions accordingly.
const fs::path & struct_path() const
std::vector< std::string > m_config_strs
The list of the supercell names of add_configname_suboption()
std::vector< fs::path > m_pos_vec
void add_verbosity_suboption()
Add a –verbosity suboption. Default "standard" of "none", "quiet", "standard", "verbose", "debug" or an int 0-100.
double lattice_weight() const
void add_scelnames_suboption()
Add a –scelnames suboption.
virtual void initialize()=0
Fill in the options descriptions accordingly.
std::vector< std::string > m_input_vec
static std::string configname()
Get value_type string for configuration completion.
const std::string & axis_choice_str() const
const std::vector< std::string > & filter_strs() const
void initialize() override
Fill in the options descriptions accordingly.
void initialize() override
Fill in the options descriptions accordingly.
void initialize() override
Fill in the options descriptions accordingly.
const std::string & input_str() const
const fs::path settings_path() const
Returns the path corresponding to add_settings_suboption.
const std::string & config_str() const
Returns the name of the supercell for add_configname_suboption(), for when multiple=false.
void add_help_suboption()
Add a plain –help suboption.
void add_settings_suboption(bool required=true)
Add a –settings suboption. Expects a corresponding casm format to go with it.
void add_configname_suboption()
Add a –configname suboption.
std::string m_config_str
The name of a single configname to go with add_configname_suboption()
void add_general_help_suboption()
Add a smart –help suboption that takes "properties" or "operators".
void add_configlists_nodefault_suboption()
Add –configs suboption (no default)
void initialize() override
Fill in the options descriptions accordingly.
std::string method() const
const std::vector< fs::path > & pos_vec() const
void add_configlist_suboption(const fs::path &_default="MASTER")
Add –config suboption (defaults to MASTER)
static void query_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for QUERY.
double max_va_frac() const
fs::path m_selection_path
The selection string to go with add_config_suboption.
void initialize() override
Fill in the options descriptions accordingly.
const std::string & verbosity_str() const
Returns the string corresponding to add_verbosity_suboption()
void initialize() override
Fill in the options descriptions accordingly.
std::string m_tag
name of the casm command
const fs::path & selection_path() const
Returns the string corresponding to add_config_suboption()
static std::string path()
Get value_type string for path completion.
static std::string supercell()
Get value_type string for supercell completion.
void add_input_suboption(bool required=true)
Add a –input suboption. Expects a corresponding casm format to go with it.
void add_configlists_suboption(const fs::path &_default="MASTER")
Add –configs suboption (defaults to MASTER)
static std::string coordtype()
Get value_type string for coordinate mode completion.
static std::string operation()
Get value_type string for operation completion.
std::string input_str() const
Returns the path corresponding to add_input_suboption.
void add_configlist_nodefault_suboption()
Add –config suboption (no default)
const po::options_description & desc()
Get the program options, filled with the initialized values.
const std::vector< std::string > & criteria_vec() const
po::variables_map m_vm
Boost program options variable map.
std::vector< std::string > m_desc_vec
static ARG_TYPE determine_type(const po::option_description &boost_option)
Translate the stored boost value_name into an ARG_TYPE for the completer engine.
const std::vector< std::string > & help_opt_vec() const
Returns the list of strings corresponding to add_general_help_suboption()
double lattice_weight() const
static std::string command()
Get value_type string for command completion (i.e. stuff in your $PATH)
EigenIndex Index
For long integer indexing:
std::vector< fs::path > m_transf_mat_paths
fs::path m_output_path
The path that goes with add_output_suboption.
static std::string query()
Get value_type string for query completion.
OptionHandlerBase(const std::string &init_option_tag)
Define the name of the command during construction.
std::string m_unit_scel_str
void initialize() override
Fill in the options descriptions accordingly.
static void void_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for VOID (i.e. do nothing) ...
Index condition_index() const
std::vector< std::string > m_criteria_vec
const std::string & unit_scel_str() const
po::options_description m_desc
Boost program options. All the derived classes have them, but will fill them up themselves.
void initialize() override
Fill in the options descriptions accordingly.
const std::vector< std::string > & config_strs() const
Returns the names of the supercells for add_configname_suboption(), for when multiple=false.
const std::vector< std::string > & desc_vec() const
bool gzip_flag() const
Returns the value assigned for add_gzip_suboption()
static void path_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for PATH.
void add_gzip_suboption()
Add a –gzip suboption. The value will default to false unless overridden by the derived class...
const std::string & supercell_str() const
Returns the name of the supercell for add_scelname_suboption()
double min_va_frac() const
double max_va_frac() const
double vol_tolerance() const
const fs::path & batch_path() const
void add_confignames_suboption()
Add a –confignames suboption.
fs::path m_settings_path
The settings path to go with add_settings_suboption()
bool all_existing() const
void initialize() override
Fill in the options descriptions accordingly.
const std::vector< std::string > & columns_vec() const
const std::vector< std::string > & supercell_strs() const
Returns the list of the supercells for add_scelnames_suboption()
void initialize() override
Fill in the options descriptions accordingly.
void add_scelname_suboption()
Add a –scelname suboption.
bool m_gzip_flag
The bool that goes with add_gzip_suboption.
po::variables_map & vm()
Get the variables map.
static void scelname_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for SCELNAME TODO: This routine is cu...
void add_coordtype_suboption()
Add a –coord suboption to specify FRAC or CART.
void initialize() override
Fill in the options descriptions accordingly.
bool no_header_flag() const
double vol_tolerance() const
const std::string & tag() const
The desired name for the casm option (Perhaps this should get tied with CommandArg?)
std::string m_verbosity_str
The verbosity string to go with add_config_suboption.
const std::string & settings_str() const
static void command_to_bash(std::vector< std::string > &arguments)
Fill the output strings with bash completion appropriate values for COMMAND.
std::string m_coordtype_str
The enum value in the form of a string for add_coordtype_suboption(). Only the first letter matters...
const std::vector< std::string > & calc_vec() const
void initialize() override
Fill in the options descriptions accordingly.
std::vector< std::string > m_supercell_strs
The list of supercell names of add_scelnames_suboption()
void initialize() override
Fill in the options descriptions accordingly.
const fs::path output_path() const
Returns the path corresponding to add_output_suboption()
const std::vector< std::string > & new_alias_vec() const
std::string m_axis_choice_str
static const std::vector< std::pair< std::string, ARG_TYPE > > m_argument_table
List of pairs relating the value type name of po::option_description to its corresponding argument ty...
double min_va_frac() const
void initialize() override
Fill in the options descriptions accordingly.
void initialize() override
Fill in the options descriptions accordingly.
std::string m_settings_str
const fs::path & cspecs_path() const
std::vector< std::string > m_filter_strs
void initialize() override
Fill in the options descriptions accordingly.
const std::string & set_str() const
const std::vector< fs::path > & transf_mat_paths() const
std::vector< fs::path > m_selection_paths
The selection string to go with add_config_suboption.
const std::vector< fs::path > & selection_paths() const
Returns the string corresponding to add_config_suboption()
void initialize() override
Fill in the options descriptions accordingly.
bool verbatim_flag() const