Class row_initializer
Defined in File row.hpp
Inheritance Relationships
Base Type
public std::vector< item >
Class Documentation
-
class row_initializer : public std::vector<item>
The class row_initializer is a list of cif::item’s.
This class is used to construct new rows, it allows to group a list of item name and value pairs and pass it in one go to the constructing function.
Public Functions
-
inline row_initializer(std::initializer_list<item> items)
constructor taking a std::initializer_list of items
-
template<typename ItemIter>
inline row_initializer(ItemIter b, ItemIter e) constructor taking a range of items
-
inline row_initializer(row_handle rh)
constructor taking the values of an existing row
-
row_initializer(const_row_handle rh)
Constructor.
-
void set_value(std::string name, item_value value)
set the value for item name name to value
-
void set_value_if_empty(std::string name, item_value value)
set the value for item name name to value, but only if the item did not have a value already
-
inline void set_value_if_empty(const item &i)
set the value for item i, but only if the item did not have a value already
-
inline auto emplace_back(std::string name, item_value value)
enable emplace_back for more complex items (floats with precission)
-
inline row_initializer(std::initializer_list<item> items)