CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <SimpleFormatter.hh>
Abstract base type to allow containers of DatumEvaluator<ObjectType, ValuesType>
Definition at line 58 of file SimpleFormatter.hh.
Public Types | |
typedef std::function< ValueType(ObjectType const &object)> | ValueF |
Function that evaluates the value. More... | |
Public Member Functions | |
DatumEvaluator (std::string _name, ValueF _value_f) | |
Construct a non-vectorizable DatumEvaluator. More... | |
std::string const & | name () const override |
Name of the evaluated value. More... | |
ValueType | value (ObjectType const &object) const |
Value. More... | |
void | format_value (DataFormatter< ObjectType > &formatter, ObjectType const &object) const override |
Format each value generated by this evaluator for the object More... | |
bool | may_be_vectorized () const override |
Return true if value may be vectorized. This always returns false. More... | |
bool | is_fixed_size () const override |
std::vector< std::string > const & | component_names () const override |
void | format_vectorized_value (DataFormatter< ObjectType > &formatter, ObjectType const &object) const override |
virtual bool | is_vector () const =0 |
Return true if value may be vectorized. More... | |
virtual bool | is_map () const =0 |
Return true if value may be mapped. More... | |
virtual void | format_mapped_value (DataFormatter< ObjectType > &formatter, ObjectType const &object) const =0 |
Format each value generated by this evaluator for the object More... | |
Private Attributes | |
std::string | m_name |
ValueF | m_value_f |
typedef std::function<ValueType(ObjectType const &object)> CASM::simpleformatter::DatumEvaluator< ObjectType, ValueType >::ValueF |
Function that evaluates the value.
Definition at line 62 of file SimpleFormatter.hh.
CASM::simpleformatter::DatumEvaluator< ObjectType, ValueType >::DatumEvaluator | ( | std::string | _name, |
ValueF | _value_f | ||
) |
Construct a non-vectorizable DatumEvaluator.
Definition at line 429 of file SimpleFormatter.hh.
|
inlineoverridevirtual |
Return strings describing the values evaluated. May be used for csv column headers, json attribute names, etc. depending on DataFormatter<ObjectType> derived implementation
Implements CASM::simpleformatter::BaseDatumEvaluator< ObjectType >.
Definition at line 90 of file SimpleFormatter.hh.
|
pure virtualinherited |
Format each value generated by this evaluator for the object
|
overridevirtual |
Format each value generated by this evaluator for the object
Implements CASM::simpleformatter::BaseDatumEvaluator< ObjectType >.
Definition at line 448 of file SimpleFormatter.hh.
|
inlineoverridevirtual |
Format each value (subject to this->indices()) generated by this evaluator for the object
Implements CASM::simpleformatter::BaseDatumEvaluator< ObjectType >.
Definition at line 97 of file SimpleFormatter.hh.
|
inlineoverridevirtual |
Return true if vectorized value is a fixed size, no matter what object is being evaluated. If true, component_names().size() must be equal to the vector size.
Implements CASM::simpleformatter::BaseDatumEvaluator< ObjectType >.
Definition at line 83 of file SimpleFormatter.hh.
|
pure virtualinherited |
Return true if value may be mapped.
|
pure virtualinherited |
Return true if value may be vectorized.
|
inlineoverride |
Return true if value may be vectorized. This always returns false.
Definition at line 78 of file SimpleFormatter.hh.
|
overridevirtual |
Name of the evaluated value.
Implements CASM::simpleformatter::BaseDatumEvaluator< ObjectType >.
Definition at line 435 of file SimpleFormatter.hh.
ValueType CASM::simpleformatter::DatumEvaluator< ObjectType, ValueType >::value | ( | ObjectType const & | object | ) | const |
Value.
Format each value generated by this evaluator for the object
Definition at line 441 of file SimpleFormatter.hh.
|
private |
Definition at line 104 of file SimpleFormatter.hh.
|
private |
Definition at line 105 of file SimpleFormatter.hh.