CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::QueryHandler< _DataObject > Class Template Referenceabstract

#include <QueryHandler.hh>

+ Inheritance diagram for CASM::QueryHandler< _DataObject >:

Detailed Description

template<typename _DataObject>
class CASM::QueryHandler< _DataObject >

Definition at line 23 of file QueryHandler.hh.

Public Types

typedef _DataObject DataObject
 

Public Member Functions

 QueryHandler (const ProjectSettings &set)
 
DataFormatterDictionary< DataObject > & dict ()
 
const DataFormatterDictionary< DataObject > & dict () const
 
void set_selected (const DB::Selected< DataObject > &selection)
 Set the selection to be used for the 'selected' column. More...
 
void set_selected (const DB::Selection< DataObject > &selection)
 Set the selection to be used for the 'selected' column. More...
 
void add_alias (const std::string &alias_name, const std::string &alias_command)
 Add user-defined query alias. More...
 
const std::map< std::string, std::string > & aliases () const
 const Access aliases map More...
 
std::unique_ptr< Cloneable > clone () const
 
std::unique_ptr< Cloneable > move ()
 

Private Member Functions

std::map< std::string, std::string > & _aliases ()
 Access aliases map. More...
 
virtual Cloneable * _clone () const =0
 
virtual Cloneable * _move ()=0
 

Private Attributes

const ProjectSettingsm_set
 
std::map< std::string, std::string > m_aliases
 
notstd::cloneable_ptr< DataFormatterDictionary< DataObject > > m_dict
 
std::map< std::string, std::shared_ptr< RuntimeLibrary > > m_lib
 

Member Typedef Documentation

◆ DataObject

template<typename _DataObject >
typedef _DataObject CASM::QueryHandler< _DataObject >::DataObject

Definition at line 26 of file QueryHandler.hh.

Constructor & Destructor Documentation

◆ QueryHandler()

template<typename DataObject >
CASM::QueryHandler< DataObject >::QueryHandler ( const ProjectSettings set)

Definition at line 16 of file QueryHandler_impl.hh.

Member Function Documentation

◆ _aliases()

template<typename _DataObject >
std::map<std::string, std::string>& CASM::QueryHandler< _DataObject >::_aliases ( )
inlineprivate

Access aliases map.

  • key: alias name
  • value: alias command

Definition at line 60 of file QueryHandler.hh.

◆ _clone()

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

◆ _move()

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

◆ add_alias()

template<typename DataObject >
void CASM::QueryHandler< DataObject >::add_alias ( const std::string &  alias_name,
const std::string &  alias_command 
)

Add user-defined query alias.

  • Aliases are added to memory, but not saved to file until ProjectSettings is saved
  • Aliases are added to the dictionary and ProjectSettings, but not saved to file

Definition at line 72 of file QueryHandler_impl.hh.

◆ aliases()

template<typename _DataObject >
const std::map<std::string, std::string>& CASM::QueryHandler< _DataObject >::aliases ( ) const
inline

const Access aliases map

  • key: alias name
  • mapped value: alias command

Definition at line 51 of file QueryHandler.hh.

◆ clone()

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

Definition at line 92 of file cloneable_ptr.hh.

◆ dict() [1/2]

template<typename DataObject >
DataFormatterDictionary< DataObject > & CASM::QueryHandler< DataObject >::dict

Definition at line 34 of file QueryHandler_impl.hh.

◆ dict() [2/2]

template<typename DataObject >
const DataFormatterDictionary< DataObject > & CASM::QueryHandler< DataObject >::dict

Definition at line 39 of file QueryHandler_impl.hh.

◆ move()

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

Definition at line 95 of file cloneable_ptr.hh.

◆ set_selected() [1/2]

template<typename DataObject >
void CASM::QueryHandler< DataObject >::set_selected ( const DB::Selected< DataObject > &  selection)

Set the selection to be used for the 'selected' column.

  • ToDo: generalize Selected<DataObject>

Definition at line 48 of file QueryHandler_impl.hh.

◆ set_selected() [2/2]

template<typename DataObject >
void CASM::QueryHandler< DataObject >::set_selected ( const DB::Selection< DataObject > &  selection)

Set the selection to be used for the 'selected' column.

  • ToDo: generalize ConstConfigSelection

Definition at line 62 of file QueryHandler_impl.hh.

Member Data Documentation

◆ m_aliases

template<typename _DataObject >
std::map<std::string, std::string> CASM::QueryHandler< _DataObject >::m_aliases
private

Definition at line 64 of file QueryHandler.hh.

◆ m_dict

template<typename _DataObject >
notstd::cloneable_ptr<DataFormatterDictionary<DataObject> > CASM::QueryHandler< _DataObject >::m_dict
private

Definition at line 66 of file QueryHandler.hh.

◆ m_lib

template<typename _DataObject >
std::map<std::string, std::shared_ptr<RuntimeLibrary> > CASM::QueryHandler< _DataObject >::m_lib
private

Definition at line 68 of file QueryHandler.hh.

◆ m_set

template<typename _DataObject >
const ProjectSettings* CASM::QueryHandler< _DataObject >::m_set
private

Definition at line 62 of file QueryHandler.hh.


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