CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::EnumCommand Class Reference

#include <enum.hh>

+ Inheritance diagram for CASM::EnumCommand:

Detailed Description

'casm enum' implementation

The enum command provides access to methods that construct and save Supercells or Configurations.

New "standard" methods may be implemented by:

  • Implement an interface derived from EnumInteraceBase. This involves:
    • Giving the method a "name"
    • Provide a "help" string describing the method and JSON input format and options
    • Implement a "run" method that accepts inputs and executes the method
    • See the interfaces implemented in casm/app/enum/methods for examples
  • Insert the interface into the standard enumerator map by adding it to the implementation of make_standard_enumerator_interfaces.

Custom enumeration methods can also be implemented via plugins. TODO: Full description.

Definition at line 29 of file enum.hh.

Public Types

typedef Completer::EnumOption OptionType
 

Public Member Functions

 EnumCommand (CommandArgs const &_args, Completer::EnumOption &_opt)
 
int vm_count_check () const override
 
int help () const override
 
int desc () const override
 
int run () const override
 
EnumInterfaceVector const & enumerators () const
 
void print_names (std::ostream &sout, EnumInterfaceVector const &enumerators) const
 
int count (std::string s) const
 
const po::variables_map & vm () const
 
const OptionTypeopt () const
 
const CommandArgsargs () const
 
fs::path root () const
 
bool in_project () const
 
PrimClexprimclex () const
 

Static Public Attributes

static const std::string name = "enum"
 

Private Attributes

EnumInterfaceVector m_standard_enumerators
 
EnumInterfaceVector const * m_enumerator_vector
 
OptionTypem_opt
 
const CommandArgsm_args
 
bool m_in_project
 
std::unique_ptr< PrimClexm_primclex
 

Member Typedef Documentation

◆ OptionType

Definition at line 52 of file APICommand.hh.

Constructor & Destructor Documentation

◆ EnumCommand()

CASM::EnumCommand::EnumCommand ( CommandArgs const &  _args,
Completer::EnumOption _opt 
)

Definition at line 78 of file enum.cc.

Member Function Documentation

◆ args()

const CommandArgs & CASM::APICommandBase::args ( ) const
inherited

Definition at line 11 of file APICommand.cc.

◆ count()

int CASM::APICommand< Completer::EnumOption >::count ( std::string  s) const
inlineinherited

Definition at line 57 of file APICommand.hh.

◆ desc()

int CASM::EnumCommand::desc ( ) const
overridevirtual

Implements CASM::APICommandBase.

Definition at line 115 of file enum.cc.

◆ enumerators()

EnumInterfaceVector const & CASM::EnumCommand::enumerators ( ) const

Definition at line 221 of file enum.cc.

◆ help()

int CASM::EnumCommand::help ( ) const
overridevirtual

Implements CASM::APICommandBase.

Definition at line 105 of file enum.cc.

◆ in_project()

bool CASM::APICommandBase::in_project ( ) const
inherited

Definition at line 15 of file APICommand.cc.

◆ opt()

const OptionType& CASM::APICommand< Completer::EnumOption >::opt ( ) const
inlineinherited

Definition at line 61 of file APICommand.hh.

◆ primclex()

PrimClex & CASM::APICommandBase::primclex ( ) const
inherited

Definition at line 17 of file APICommand.cc.

◆ print_names()

void CASM::EnumCommand::print_names ( std::ostream &  sout,
EnumInterfaceVector const &  enumerators 
) const

Definition at line 236 of file enum.cc.

◆ root()

fs::path CASM::APICommandBase::root ( ) const
inherited

Definition at line 13 of file APICommand.cc.

◆ run()

int CASM::EnumCommand::run ( ) const
overridevirtual

Implements CASM::APICommandBase.

Definition at line 163 of file enum.cc.

◆ vm()

const po::variables_map& CASM::APICommand< Completer::EnumOption >::vm ( ) const
inlineinherited

Definition at line 59 of file APICommand.hh.

◆ vm_count_check()

int CASM::EnumCommand::vm_count_check ( ) const
overridevirtual

Implements CASM::APICommandBase.

Definition at line 82 of file enum.cc.

Member Data Documentation

◆ m_args

const CommandArgs& CASM::APICommandBase::m_args
privateinherited

Definition at line 41 of file APICommand.hh.

◆ m_enumerator_vector

EnumInterfaceVector const* CASM::EnumCommand::m_enumerator_vector
mutableprivate

Definition at line 52 of file enum.hh.

◆ m_in_project

bool CASM::APICommandBase::m_in_project
privateinherited

Definition at line 42 of file APICommand.hh.

◆ m_opt

OptionType& CASM::APICommand< Completer::EnumOption >::m_opt
privateinherited

Definition at line 64 of file APICommand.hh.

◆ m_primclex

std::unique_ptr<PrimClex> CASM::APICommandBase::m_primclex
mutableprivateinherited

Definition at line 43 of file APICommand.hh.

◆ m_standard_enumerators

EnumInterfaceVector CASM::EnumCommand::m_standard_enumerators
mutableprivate

Definition at line 51 of file enum.hh.

◆ name

const std::string CASM::EnumCommand::name = "enum"
static

Definition at line 31 of file enum.hh.


The documentation for this class was generated from the following files: