CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::InfoInterfaceBase Class Referenceabstract

#include <InfoInterface.hh>

+ Inheritance diagram for CASM::InfoInterfaceBase:

Detailed Description

Interface for casm enum methods

Notes:

  • See the interfaces implemented in casm/app/enum/methods for examples

Definition at line 17 of file InfoInterface.hh.

Public Member Functions

virtual std::string desc () const =0
 
virtual std::string name () const =0
 Enumeration method name (i.e. "prim", "supercell", "dof_space", etc.) More...
 
virtual void run (jsonParser const &json_options, PrimClex const *primclex=nullptr) const =0
 
std::unique_ptr< Cloneable > clone () const
 
std::unique_ptr< Cloneable > move ()
 

Private Member Functions

virtual Cloneable * _clone () const =0
 
virtual Cloneable * _move ()=0
 

Member Function Documentation

◆ _clone()

virtual Cloneable* notstd::Cloneable::_clone ( ) const
privatepure virtualinherited

◆ _move()

virtual Cloneable* notstd::Cloneable::_move ( )
privatepure virtualinherited

◆ clone()

std::unique_ptr<Cloneable> notstd::Cloneable::clone ( ) const
inlineinherited

Definition at line 92 of file cloneable_ptr.hh.

◆ desc()

virtual std::string CASM::InfoInterfaceBase::desc ( ) const
pure virtual

Enumeration method description. What will be printed by casm info --desc MethodName.

Implemented in CASM::SupercellInfoInterface, CASM::PrimInfoInterface, and CASM::NeighborListInfoInterface.

◆ move()

std::unique_ptr<Cloneable> notstd::Cloneable::move ( )
inlineinherited

Definition at line 95 of file cloneable_ptr.hh.

◆ name()

virtual std::string CASM::InfoInterfaceBase::name ( ) const
pure virtual

Enumeration method name (i.e. "prim", "supercell", "dof_space", etc.)

Implemented in CASM::SupercellInfoInterface, CASM::PrimInfoInterface, and CASM::NeighborListInfoInterface.

◆ run()

virtual void CASM::InfoInterfaceBase::run ( jsonParser const &  json_options,
PrimClex const *  primclex = nullptr 
) const
pure virtual

Enumeration method implementation

Parameters
json_optionsJSON input, as by –input or –settings CLI options
primclexOptional PrimClex pointer gives access to project resources. Will only by provided if provided to API, for use of current working directory project, must be constructed by the method.

It is up to the individual method to determine how to use json_options and document itself via desc(). For most methods, 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:

{
"prim": <prim.json format>, // optional
"something_else": ..., // for example Configuration JSON or other inputs
// optional, default=[] prints all DataFormatter properties///
"properties": ["name", "name", "name(args, ...)"]
}

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.

Implemented in CASM::SupercellInfoInterface, CASM::PrimInfoInterface, and CASM::NeighborListInfoInterface.


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