cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
stat_bench::param::ParameterValue Class Reference

Class of values of parameters. More...

#include <stat_bench/param/parameter_value.h>

+ Collaboration diagram for stat_bench::param::ParameterValue:

Public Member Functions

 ParameterValue () noexcept=default
 Constructor.
 
template<typename T>
auto as () const -> const T &
 Get value.
 
auto calculate_hash () const -> std::size_t
 Calculate hash value.
 
void clear () noexcept
 Clear data.
 
template<typename T, typename... Args>
auto emplace (Args &&... args) -> ParameterValue &
 Initialize data.
 
template<typename T>
auto is_type_of () const -> bool
 Check data type.
 
auto operator!= (const ParameterValue &rhs) const -> bool
 Check whether two values are not equal.
 
auto operator== (const ParameterValue &rhs) const -> bool
 Check whether two values are equal.
 
auto to_double () const -> double
 Convert to double.
 
auto to_string () const -> util::Utf8String
 Format to string.
 
auto to_variant () const -> ParameterValueVariant
 Convert to a variant object.
 

Detailed Description

Class of values of parameters.

Definition at line 146 of file parameter_value.h.

Member Function Documentation

◆ as()

template<typename T>
auto stat_bench::param::ParameterValue::as ( ) const -> const T&
inlinenodiscard

Get value.

Template Parameters
TType.
Returns
Data.

Definition at line 199 of file parameter_value.h.

◆ calculate_hash()

auto stat_bench::param::ParameterValue::calculate_hash ( ) const -> std::size_t
inlinenodiscard

Calculate hash value.

Returns
Hash value.

Definition at line 256 of file parameter_value.h.

◆ clear()

void stat_bench::param::ParameterValue::clear ( )
inlinenoexcept

Clear data.

Definition at line 176 of file parameter_value.h.

◆ emplace()

template<typename T, typename... Args>
auto stat_bench::param::ParameterValue::emplace ( Args &&... args) -> ParameterValue&
inline

Initialize data.

Template Parameters
TType of data.
ArgsType of constructor arguments.
Parameters
[in]argsConstructor arguments.
Returns
This.

Definition at line 162 of file parameter_value.h.

◆ is_type_of()

template<typename T>
auto stat_bench::param::ParameterValue::is_type_of ( ) const -> bool
inlinenodiscard

Check data type.

Template Parameters
TType.
Returns
Whether data is a object of type T.

Definition at line 185 of file parameter_value.h.

◆ operator!=()

auto stat_bench::param::ParameterValue::operator!= ( const ParameterValue & rhs) const -> bool
inlinenodiscard

Check whether two values are not equal.

Parameters
[in]rhsRight-hand-side value.
Return values
trueTwo values are not equal.
falseTwo values are equal.

Definition at line 290 of file parameter_value.h.

◆ operator==()

auto stat_bench::param::ParameterValue::operator== ( const ParameterValue & rhs) const -> bool
inlinenodiscard

Check whether two values are equal.

Parameters
[in]rhsRight-hand-side value.
Return values
trueTwo values are equal.
falseTwo values are not equal.

Definition at line 270 of file parameter_value.h.

◆ to_double()

auto stat_bench::param::ParameterValue::to_double ( ) const -> double
inlinenodiscard

Convert to double.

Returns
Value as double.

Definition at line 229 of file parameter_value.h.

◆ to_string()

auto stat_bench::param::ParameterValue::to_string ( ) const -> util::Utf8String
inlinenodiscard

Format to string.

Returns
Formatted string.

Definition at line 217 of file parameter_value.h.

◆ to_variant()

auto stat_bench::param::ParameterValue::to_variant ( ) const -> ParameterValueVariant
inlinenodiscard

Convert to a variant object.

Returns
Value as a variant object.

Definition at line 242 of file parameter_value.h.


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