Class item

Class Documentation

class item

item is a transient class that is used to pass data into rows but it also takes care of formatting data.

Public Functions

item() = default

Default constructor, empty item.

inline item(std::string_view name, char value)

constructor for an item with name name and as content a single character string with content value

template<typename T, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
inline item(std::string_view name, const T &value, int precision)

constructor for an item with name name and as content a the formatted floating point value value with precision precision

template<typename T, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
inline item(const std::string_view name, const T &value)

constructor for an item with name name and as content a formatted floating point value value with so-called general formatting

template<typename T, std::enable_if_t<std::is_integral_v<T> and not std::is_same_v<T, bool>, int> = 0>
inline item(const std::string_view name, const T &value)

constructor for an item with name name and as content a the formatted integral value value

template<typename T, std::enable_if_t<std::is_same_v<T, bool>, int> = 0>
inline item(const std::string_view name, const T &value)

constructor for an item with name name and as content a the formatted boolean value value

inline item(const std::string_view name, const std::string_view value)

constructor for an item with name name and as content value value

inline std::string_view name() const

Return the name of the item.

inline std::string_view value() const

Return the value of the item.

inline void value(std::string_view v)

replace the content of the stored value with v

inline bool empty() const

empty means either null or unknown

inline bool is_null() const

returns true if the field contains ‘.’

inline bool is_unknown() const

returns true if the field contains ‘?’

inline size_t length() const

the length of the value string

template<size_t N>
inline decltype(auto) get() const

support for structured binding