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

Detailed Description

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

'casm query' 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. perform query)

Definition at line 159 of file query.cc.

Public Member Functions

 QueryCommandImpl (const QueryCommand &cmd)
 
int help () const override
 
int desc () const override
 
int run () const override
 

Protected Attributes

const QueryCommandm_cmd
 

Private Member Functions

int _alias () const
 
void _write_pos () const
 
void _write_config_json () const
 
void _write_structure_json () const
 
int _query () const
 
int _count (std::string s) const
 
const fs::path & _selection_path () const
 
const std::vector< std::string > & _columns_vec () const
 
std::vector< std::string > _all_columns () const
 
fs::path _output_path () const
 
bool _write_json () const
 
bool _write_gz () const
 
DataFormatterDictionary< QueryData< DataObject > > & _dict ()
 
const DataFormatterDictionary< QueryData< DataObject > > & _dict () const
 
std::string _sel_str () const
 
double _sel_size () const
 
DB::Selection< DataObject > & _sel (Index i=0)
 
const DB::Selection< DataObject > & _sel (Index i=0) const
 

Private Attributes

DB::InterfaceData< DataObject > m_data
 
DataFormatterDictionary< QueryData< DataObject > > m_query_dict
 

Constructor & Destructor Documentation

◆ QueryCommandImpl()

template<typename DataObject >
CASM::QueryCommandImpl< DataObject >::QueryCommandImpl ( const QueryCommand cmd)

Definition at line 240 of file query.cc.

Member Function Documentation

◆ _alias()

template<typename DataObject >
int CASM::QueryCommandImpl< DataObject >::_alias
private

Definition at line 310 of file query.cc.

◆ _all_columns()

template<typename DataObject >
std::vector< std::string > CASM::QueryCommandImpl< DataObject >::_all_columns
private

Definition at line 506 of file query.cc.

◆ _columns_vec()

template<typename DataObject >
const std::vector<std::string>& CASM::QueryCommandImpl< DataObject >::_columns_vec ( ) const
inlineprivate

Definition at line 186 of file query.cc.

◆ _count()

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

Definition at line 180 of file query.cc.

◆ _dict() [1/2]

template<typename DataObject >
DataFormatterDictionary<QueryData<DataObject> >& CASM::QueryCommandImpl< DataObject >::_dict ( )
inlineprivate

Definition at line 198 of file query.cc.

◆ _dict() [2/2]

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

Definition at line 202 of file query.cc.

◆ _output_path()

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

Definition at line 192 of file query.cc.

◆ _query()

template<typename DataObject >
int CASM::QueryCommandImpl< DataObject >::_query
private

Definition at line 429 of file query.cc.

◆ _sel() [1/2]

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

Definition at line 210 of file query.cc.

◆ _sel() [2/2]

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

Definition at line 212 of file query.cc.

◆ _sel_size()

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

Definition at line 208 of file query.cc.

◆ _sel_str()

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

Definition at line 206 of file query.cc.

◆ _selection_path()

template<typename DataObject >
const fs::path& CASM::QueryCommandImpl< DataObject >::_selection_path ( ) const
inlineprivate

Definition at line 182 of file query.cc.

◆ _write_config_json()

template<typename DataObject >
void CASM::QueryCommandImpl< DataObject >::_write_config_json
private

Definition at line 347 of file query.cc.

◆ _write_gz()

template<typename DataObject >
bool CASM::QueryCommandImpl< DataObject >::_write_gz
private

Definition at line 540 of file query.cc.

◆ _write_json()

template<typename DataObject >
bool CASM::QueryCommandImpl< DataObject >::_write_json
private

Definition at line 527 of file query.cc.

◆ _write_pos()

template<typename DataObject >
void CASM::QueryCommandImpl< DataObject >::_write_pos
private

Definition at line 339 of file query.cc.

◆ _write_structure_json()

template<typename DataObject >
void CASM::QueryCommandImpl< DataObject >::_write_structure_json
private

Definition at line 355 of file query.cc.

◆ desc()

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

Reimplemented from CASM::QueryCommandImplBase.

Definition at line 285 of file query.cc.

◆ help()

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

Reimplemented from CASM::QueryCommandImplBase.

Definition at line 252 of file query.cc.

◆ run()

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

Reimplemented from CASM::QueryCommandImplBase.

Definition at line 290 of file query.cc.

Member Data Documentation

◆ m_cmd

const QueryCommand& CASM::QueryCommandImplBase::m_cmd
protectedinherited

Definition at line 119 of file query.cc.

◆ m_data

template<typename DataObject >
DB::InterfaceData<DataObject> CASM::QueryCommandImpl< DataObject >::m_data
private

Definition at line 218 of file query.cc.

◆ m_query_dict

template<typename DataObject >
DataFormatterDictionary<QueryData<DataObject> > CASM::QueryCommandImpl< DataObject >::m_query_dict
private

Definition at line 220 of file query.cc.


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