CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::SelectCommandImpl< DataObject > Class Template Reference
+ Inheritance diagram for CASM::SelectCommandImpl< DataObject >:

Detailed Description

template<typename DataObject>
class CASM::SelectCommandImpl< DataObject >

'casm select' implementation, templated by type

This:

  • holds a DB::InterfaceData object which stores dictionaries and selections
  • provides the implementation for 'help' (i.e. print allowed query commands)
  • provides the implementation for 'run' (i.e. –set, –set-on, –set-off, –and, etc.)

Definition at line 124 of file select.cc.

Public Member Functions

 SelectCommandImpl (const SelectCommand &cmd)
 
int help () const override
 
int desc () const override
 
int run () const override
 

Protected Attributes

const SelectCommandm_cmd
 

Private Member Functions

int _count (std::string s) const
 
const std::vector< fs::path > & _selection_paths () const
 
fs::path _selection_paths (Index i) const
 
const std::vector< std::string > & _criteria_vec () const
 
std::string _criteria () const
 
fs::path _output_path () const
 
void _set () const
 
void _set_on () const
 
void _set_off () const
 
void _and () const
 
void _or () const
 
void _xor () const
 
void _not () const
 
void _subset () const
 
void _write_input_stats () const
 
void _write_selection_stats (Index Ntot, const DB::Selection< DataObject > &sel, Log &log, bool only_selected) const
 
const DataFormatterDictionary< DataObject > & _dict () const
 
std::string _sel_str () const
 
double _sel_size () const
 
DB::Selection< DataObject > & _sel (Index i=0) const
 

Private Attributes

DB::InterfaceData< DataObject > m_data
 
Index m_Ntot
 

Constructor & Destructor Documentation

◆ SelectCommandImpl()

template<typename DataObject >
CASM::SelectCommandImpl< DataObject >::SelectCommandImpl ( const SelectCommand cmd)

Definition at line 189 of file select.cc.

Member Function Documentation

◆ _and()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_and
private

Definition at line 313 of file select.cc.

◆ _count()

template<typename DataObject >
int CASM::SelectCommandImpl< DataObject >::_count ( std::string  s) const
inlineprivate

Definition at line 135 of file select.cc.

◆ _criteria()

template<typename DataObject >
std::string CASM::SelectCommandImpl< DataObject >::_criteria
private

Definition at line 279 of file select.cc.

◆ _criteria_vec()

template<typename DataObject >
const std::vector<std::string>& CASM::SelectCommandImpl< DataObject >::_criteria_vec ( ) const
inlineprivate

Definition at line 143 of file select.cc.

◆ _dict()

template<typename DataObject >
const DataFormatterDictionary<DataObject>& CASM::SelectCommandImpl< DataObject >::_dict ( ) const
inlineprivate

Definition at line 172 of file select.cc.

◆ _not()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_not
private

Definition at line 363 of file select.cc.

◆ _or()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_or
private

Definition at line 328 of file select.cc.

◆ _output_path()

template<typename DataObject >
fs::path CASM::SelectCommandImpl< DataObject >::_output_path ( ) const
inlineprivate

Definition at line 149 of file select.cc.

◆ _sel()

template<typename DataObject >
DB::Selection<DataObject>& CASM::SelectCommandImpl< DataObject >::_sel ( Index  i = 0) const
inlineprivate

Definition at line 180 of file select.cc.

◆ _sel_size()

template<typename DataObject >
double CASM::SelectCommandImpl< DataObject >::_sel_size ( ) const
inlineprivate

Definition at line 178 of file select.cc.

◆ _sel_str()

template<typename DataObject >
std::string CASM::SelectCommandImpl< DataObject >::_sel_str ( ) const
inlineprivate

Definition at line 176 of file select.cc.

◆ _selection_paths() [1/2]

template<typename DataObject >
const std::vector<fs::path>& CASM::SelectCommandImpl< DataObject >::_selection_paths ( ) const
inlineprivate

Definition at line 137 of file select.cc.

◆ _selection_paths() [2/2]

template<typename DataObject >
fs::path CASM::SelectCommandImpl< DataObject >::_selection_paths ( Index  i) const
inlineprivate

Definition at line 141 of file select.cc.

◆ _set()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_set
private

Definition at line 295 of file select.cc.

◆ _set_off()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_set_off
private

Definition at line 307 of file select.cc.

◆ _set_on()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_set_on
private

Definition at line 301 of file select.cc.

◆ _subset()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_subset
private

Definition at line 371 of file select.cc.

◆ _write_input_stats()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_write_input_stats
private

Definition at line 384 of file select.cc.

◆ _write_selection_stats()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_write_selection_stats ( Index  Ntot,
const DB::Selection< DataObject > &  sel,
Log log,
bool  only_selected 
) const
private

Definition at line 400 of file select.cc.

◆ _xor()

template<typename DataObject >
void CASM::SelectCommandImpl< DataObject >::_xor
private

Definition at line 340 of file select.cc.

◆ desc()

template<typename DataObject >
int CASM::SelectCommandImpl< DataObject >::desc
overridevirtual

Reimplemented from CASM::SelectCommandImplBase.

Definition at line 220 of file select.cc.

◆ help()

template<typename DataObject >
int CASM::SelectCommandImpl< DataObject >::help
overridevirtual

Reimplemented from CASM::SelectCommandImplBase.

Definition at line 195 of file select.cc.

◆ run()

template<typename DataObject >
int CASM::SelectCommandImpl< DataObject >::run
overridevirtual

Reimplemented from CASM::SelectCommandImplBase.

Definition at line 225 of file select.cc.

Member Data Documentation

◆ m_cmd

const SelectCommand& CASM::SelectCommandImplBase::m_cmd
protectedinherited

Definition at line 79 of file select.cc.

◆ m_data

template<typename DataObject >
DB::InterfaceData<DataObject> CASM::SelectCommandImpl< DataObject >::m_data
mutableprivate

Definition at line 184 of file select.cc.

◆ m_Ntot

template<typename DataObject >
Index CASM::SelectCommandImpl< DataObject >::m_Ntot
private

Definition at line 185 of file select.cc.


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