CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <info.hh>
'casm info' implementation
Output of information about CASM objects – meant to be a quick way of implementing new functions in C++ for use via CLI or Python, etc.
There are no enforced limits on what the methods may do, but the current intention is that the input is simple JSON, with optional PrimClex pointer if provided by the API call.
The input should include a list of "properties" to query via DataFormatters, with default empty array indicating to print all properties in a DataFormatterDictionary. For example:
The output is primarily intended to be JSON directly to the CASM::log()
, but it is up to the each method to document itself.
Implement a new casm info
method by following the example of PrimInfoInterface
.
Public Types | |
typedef Completer::InfoOption | OptionType |
Public Member Functions | |
InfoCommand (const CommandArgs &_args, Completer::InfoOption &_opt) | |
int | vm_count_check () const override |
int | help () const override |
int | desc () const override |
int | run () const override |
InfoInterfaceVector const & | info_methods () const |
void | print_names (std::ostream &sout, InfoInterfaceVector const &info_methods) const |
int | count (std::string s) const |
const po::variables_map & | vm () const |
const OptionType & | opt () const |
const CommandArgs & | args () const |
fs::path | root () const |
bool | in_project () const |
PrimClex & | primclex () const |
Static Public Attributes | |
static const std::string | name = "info" |
Private Attributes | |
InfoInterfaceVector | m_standard_info_methods |
InfoInterfaceVector const * | m_info_method_vector |
OptionType & | m_opt |
const CommandArgs & | m_args |
bool | m_in_project |
std::unique_ptr< PrimClex > | m_primclex |
|
inherited |
Definition at line 52 of file APICommand.hh.
CASM::InfoCommand::InfoCommand | ( | const CommandArgs & | _args, |
Completer::InfoOption & | _opt | ||
) |
|
inherited |
Definition at line 11 of file APICommand.cc.
|
inlineinherited |
Definition at line 57 of file APICommand.hh.
|
overridevirtual |
Implements CASM::APICommandBase.
|
overridevirtual |
Implements CASM::APICommandBase.
|
inherited |
Definition at line 15 of file APICommand.cc.
InfoInterfaceVector const & CASM::InfoCommand::info_methods | ( | ) | const |
|
inlineinherited |
Definition at line 61 of file APICommand.hh.
|
inherited |
Definition at line 17 of file APICommand.cc.
void CASM::InfoCommand::print_names | ( | std::ostream & | sout, |
InfoInterfaceVector const & | info_methods | ||
) | const |
|
inherited |
Definition at line 13 of file APICommand.cc.
|
overridevirtual |
Implements CASM::APICommandBase.
|
inlineinherited |
Definition at line 59 of file APICommand.hh.
|
overridevirtual |
Implements CASM::APICommandBase.
|
privateinherited |
Definition at line 41 of file APICommand.hh.
|
privateinherited |
Definition at line 42 of file APICommand.hh.
|
mutableprivate |
|
privateinherited |
Definition at line 64 of file APICommand.hh.
|
mutableprivateinherited |
Definition at line 43 of file APICommand.hh.
|
mutableprivate |