CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DataFormatter.hh>
Parsing dictionary for constructing a DataFormatter<DataObject> object.
Definition at line 645 of file DataFormatter.hh.
Public Types | |
typedef _DataObject | DataObject |
typedef _DatumFormatterType | DatumFormatterType |
typedef notstd::unique_cloneable_map< std::string, DatumFormatterType > | UniqueMapType |
typedef UniqueMapType::key_type | key_type |
typedef UniqueMapType::value_type | value_type |
typedef UniqueMapType::size_type | size_type |
typedef UniqueMapType::iterator | iterator |
typedef UniqueMapType::const_iterator | const_iterator |
typedef std::function< KeyType(const ValueType &)> | KeyFuncType |
typedef std::function< typename MapType::mapped_type(const ValueType &)> | ConvertType |
typedef ValueType & | reference |
typedef ValueType * | pointer |
typedef MapType::iterator | MapIterator |
typedef MapType::const_iterator | ConstMapIterator |
Public Member Functions | |
DataFormatterDictionary () | |
const_iterator | lookup (const key_type &_name) const |
Equivalent to find, but set 'home' and throws error with suggestion if. More... | |
bool | contains (const key_type &_name) const |
True if dictionary contains entry for. More... | |
void | print_help (std::ostream &_stream, DatumFormatterClass ftype, int width=60, int separation=8) const |
Generates formatted help using the 'name' and 'description' of all contained BaseDatumFormatter. More... | |
DataFormatter< DataObject > | parse (const std::string &input) const |
Use the vector of strings to build a DataFormatter<DataObject> More... | |
DataFormatter< DataObject > | parse (const std::vector< std::string > &input) const |
Use a single string to build a DataFormatter<DataObject> More... | |
DataFormatter< DataObject > | parse (std::initializer_list< std::string > input) const |
Use a single string to build a DataFormatter<DataObject> More... | |
std::pair< iterator, bool > | insert (const value_type &value) |
Insert single value. More... | |
iterator | insert (const_iterator hint, const value_type &value) |
Insert single value. More... | |
iterator | insert (iterator hint, const value_type &value) |
Insert single value. More... | |
template<typename... ValuesOrMaps> | |
void | insert (const ValuesOrMaps &... more) |
Variadic insert accepts as const UniqueMap& or const ValueType&. More... | |
template<typename Iterator > | |
void | insert (Iterator begin, Iterator end, typename CASM::CASM_TMP::enable_if_iterator< Iterator >::type *=nullptr) |
Iterator range insert. More... | |
key_type | key (const value_type &value) const |
std::pair< iterator, bool > | insert (const value_type &value) |
Insert single value. More... | |
iterator | insert (const_iterator hint, const value_type &value) |
Insert single value. More... | |
iterator | insert (iterator hint, const value_type &value) |
Insert single value. More... | |
template<typename... ValuesOrMaps> | |
void | insert (const ValuesOrMaps &... more) |
Variadic insert accepts as const UniqueMap& or const ValueType&. More... | |
template<typename Iterator > | |
void | insert (Iterator begin, Iterator end, typename CASM::CASM_TMP::enable_if_iterator< Iterator >::type *=nullptr) |
Iterator range insert. More... | |
value_type & | operator[] (const key_type &key) |
iterator | find (const key_type &key) |
const_iterator | find (const key_type &key) const |
void | clear () |
iterator | erase (const_iterator pos) |
iterator | erase (const_iterator first, const_iterator last) |
size_type | erase (const key_type &key) |
size_type | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
const_iterator | cbegin () const |
iterator | end () |
const_iterator | end () const |
const_iterator | cend () const |
Private Member Functions | |
std::pair< iterator, bool > | _insert (const value_type &value) |
Copy insert. More... | |
template<typename A , typename B , typename C , typename D , typename E > | |
int | _insert (const unique_map< A, B, C, D, E > &value) |
Dictionary insert. More... | |
Private Attributes | |
MapType | m_map |
KeyFuncType | m_keyfunc |
ConvertType | m_converter |
typedef UniqueMapType::const_iterator CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::const_iterator |
Definition at line 656 of file DataFormatter.hh.
|
inherited |
Definition at line 135 of file unique_map.hh.
|
inherited |
Definition at line 130 of file unique_map.hh.
typedef _DataObject CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::DataObject |
Definition at line 648 of file DataFormatter.hh.
typedef _DatumFormatterType CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::DatumFormatterType |
Definition at line 649 of file DataFormatter.hh.
typedef UniqueMapType::iterator CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::iterator |
Definition at line 655 of file DataFormatter.hh.
typedef UniqueMapType::key_type CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::key_type |
Definition at line 652 of file DataFormatter.hh.
|
inherited |
Definition at line 128 of file unique_map.hh.
|
inherited |
Definition at line 134 of file unique_map.hh.
|
inherited |
Definition at line 132 of file unique_map.hh.
|
inherited |
Definition at line 131 of file unique_map.hh.
typedef UniqueMapType::size_type CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::size_type |
Definition at line 654 of file DataFormatter.hh.
typedef notstd::unique_cloneable_map<std::string, DatumFormatterType> CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::UniqueMapType |
Definition at line 651 of file DataFormatter.hh.
typedef UniqueMapType::value_type CASM::DataFormatterDictionary< _DataObject, _DatumFormatterType >::value_type |
Definition at line 653 of file DataFormatter.hh.
|
inline |
Definition at line 658 of file DataFormatter.hh.
|
inlineprivateinherited |
Dictionary insert.
Definition at line 235 of file unique_map.hh.
|
inlineprivateinherited |
Copy insert.
Definition at line 227 of file unique_map.hh.
|
inlineinherited |
Definition at line 213 of file unique_map.hh.
|
inlineinherited |
Definition at line 215 of file unique_map.hh.
|
inlineinherited |
Definition at line 217 of file unique_map.hh.
|
inlineinherited |
Definition at line 223 of file unique_map.hh.
|
inlineinherited |
Definition at line 197 of file unique_map.hh.
|
inline |
True if dictionary contains entry for.
_name |
Definition at line 697 of file DataFormatter.hh.
|
inlineinherited |
Definition at line 211 of file unique_map.hh.
|
inlineinherited |
Definition at line 219 of file unique_map.hh.
|
inlineinherited |
Definition at line 221 of file unique_map.hh.
|
inlineinherited |
Definition at line 207 of file unique_map.hh.
|
inlineinherited |
Definition at line 203 of file unique_map.hh.
|
inlineinherited |
Definition at line 199 of file unique_map.hh.
|
inlineinherited |
Definition at line 191 of file unique_map.hh.
|
inlineinherited |
Definition at line 193 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 149 of file unique_map.hh.
|
inlineinherited |
Insert single value.
Definition at line 149 of file unique_map.hh.
|
inline |
Variadic insert accepts as const UniqueMap& or const ValueType&.
Definition at line 169 of file unique_map.hh.
|
inlineinherited |
Variadic insert accepts as const UniqueMap& or const ValueType&.
Definition at line 169 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 154 of file unique_map.hh.
|
inlineinherited |
Insert single value.
Definition at line 154 of file unique_map.hh.
|
inline |
Iterator range insert.
Definition at line 175 of file unique_map.hh.
|
inlineinherited |
Iterator range insert.
Definition at line 175 of file unique_map.hh.
|
inline |
Insert single value.
Definition at line 161 of file unique_map.hh.
|
inlineinherited |
Insert single value.
Definition at line 161 of file unique_map.hh.
|
inlineinherited |
Definition at line 146 of file unique_map.hh.
DataFormatterDictionary< DataObject, DatumFormatterType >::const_iterator CASM::DataFormatterDictionary< DataObject, DatumFormatterType >::lookup | ( | const key_type & | _name | ) | const |
Equivalent to find, but set 'home' and throws error with suggestion if.
_name | not found |
Definition at line 276 of file DataFormatter_impl.hh.
|
inlineinherited |
Definition at line 183 of file unique_map.hh.
DataFormatter< DataObject > CASM::DataFormatterDictionary< DataObject, DatumFormatterType >::parse | ( | const std::string & | input | ) | const |
Use the vector of strings to build a DataFormatter<DataObject>
Use a single string to build a DataFormatter<DataObject>
Expects string of "formattername(argument1,argument2,...) formattername(argument1,argument2,...) ..."
Uses DataFormatterDictionary<DataObject>::lookup to suggest alternatives if exact request not found.
Definition at line 369 of file DataFormatter_impl.hh.
DataFormatter< DataObject > CASM::DataFormatterDictionary< DataObject, DatumFormatterType >::parse | ( | const std::vector< std::string > & | input | ) | const |
Use a single string to build a DataFormatter<DataObject>
Use the vector of strings to build a DataFormatter<DataObject>
Expects vector of "formattername(argument1,argument2,...)"
Uses DataFormatterDictionary<DataObject>::lookup to suggest alternatives if exact request not found.
Definition at line 346 of file DataFormatter_impl.hh.
DataFormatter< DataObject > CASM::DataFormatterDictionary< DataObject, DatumFormatterType >::parse | ( | std::initializer_list< std::string > | input | ) | const |
Use a single string to build a DataFormatter<DataObject>
Use a initializer list of string to build a DataFormatter<DataObject>
Definition at line 384 of file DataFormatter_impl.hh.
void CASM::DataFormatterDictionary< DataObject, DatumFormatterType >::print_help | ( | std::ostream & | _stream, |
DatumFormatterClass | ftype, | ||
int | width = 60 , |
||
int | separation = 8 |
||
) | const |
Generates formatted help using the 'name' and 'description' of all contained BaseDatumFormatter.
Definition at line 309 of file DataFormatter_impl.hh.
|
inlineinherited |
Definition at line 209 of file unique_map.hh.
|
privateinherited |
Definition at line 242 of file unique_map.hh.
|
privateinherited |
Definition at line 241 of file unique_map.hh.
|
privateinherited |
Definition at line 240 of file unique_map.hh.