1 #ifndef CASM_APICommand
2 #define CASM_APICommand
4 #include <boost/program_options.hpp>
26 fs::path
root()
const;
34 virtual int help()
const = 0;
36 virtual int desc()
const = 0;
38 virtual int run()
const = 0;
49 template <
typename _OptionType>
57 int count(std::string
s)
const {
return opt().vm().count(
s); }
59 const po::variables_map &
vm()
const {
return opt().vm(); }
68 template <
typename CommandType>
70 CommandArgs const &args,
typename CommandType::OptionType &opt);
73 template <
typename CommandType>
76 typename CommandType::OptionType &opt);
79 template <
typename CommandType>
std::set< std::string > & s
virtual int desc() const =0
const CommandArgs & args() const
virtual int help() const =0
const CommandArgs & m_args
virtual int run() const =0
std::unique_ptr< PrimClex > m_primclex
PrimClex & primclex() const
virtual int vm_count_check() const =0
virtual ~APICommandBase()
APICommandBase(const CommandArgs &_args)
const OptionType & opt() const
const po::variables_map & vm() const
int count(std::string s) const
APICommand(const CommandArgs &_args, OptionType &_opt)
PrimClex is the top-level data structure for a CASM project.
std::unique_ptr< CommandType > make_api_command(CommandArgs const &args, typename CommandType::OptionType &opt)
Parse command line options and make API command. Throws for parsing errors.
int run_api_command(const CommandArgs &args)
Standardizes how 'casm X' api commands are executed and implemented.
Data structure holding basic CASM command info.