chronon::params::detail::ScaledUnitBase
CRTP base for scaled-unit types (Frequency, Latency, Bandwidth). More...
#include <UnitTypes.hpp>
Public Functions
| Name | |
|---|---|
| std::string | toString() const |
| bool | operator>=(const Derived & other) const |
| bool | operator>(const Derived & other) const |
| bool | operator==(const Derived & other) const |
| bool | operator<=(const Derived & other) const |
| bool | operator<(const Derived & other) const |
| Derived | operator/(double scalar) const |
| double | operator/(const Derived & other) const |
| Derived | operator-(const Derived & other) const |
| Derived | operator+(const Derived & other) const |
| Derived | operator*(double scalar) const |
| bool | operator!=(const Derived & other) const |
| double | baseValue() const |
| ScaledUnitBase() | |
| ScaledUnitBase(double base_value) | |
| ScaledUnitBase(const std::string & s) |
Protected Functions
| Name | |
|---|---|
| void | parse(const std::string & s) |
Protected Attributes
| Name | |
|---|---|
| double | value_ |
Detailed Description
template <typename Derived >
class chronon::params::detail::ScaledUnitBase;
CRTP base for scaled-unit types (Frequency, Latency, Bandwidth).
Derived must provide:
- static constexpr const char* type_name();
- static const std::array<ScaleEntry, N>& scaleTable(); (ordered from largest to smallest multiplier for toString())
- static constexpr bool non_negative();
Public Functions Documentation
function toString
inline std::string toString() const
function operator>=
inline bool operator>=(
const Derived & other
) const
function operator>
inline bool operator>(
const Derived & other
) const
function operator==
inline bool operator==(
const Derived & other
) const
function operator<=
inline bool operator<=(
const Derived & other
) const
function operator<
inline bool operator<(
const Derived & other
) const
function operator/
inline Derived operator/(
double scalar
) const
function operator/
inline double operator/(
const Derived & other
) const
function operator-
inline Derived operator-(
const Derived & other
) const
function operator+
inline Derived operator+(
const Derived & other
) const
function operator*
inline Derived operator*(
double scalar
) const
function operator!=
inline bool operator!=(
const Derived & other
) const
function baseValue
inline double baseValue() const
function ScaledUnitBase
inline ScaledUnitBase()
function ScaledUnitBase
inline explicit ScaledUnitBase(
double base_value
)
function ScaledUnitBase
inline explicit ScaledUnitBase(
const std::string & s
)
Protected Functions Documentation
function parse
inline void parse(
const std::string & s
)
Protected Attributes Documentation
variable value_
double value_;
Updated on 2026-05-27 at 08:42:21 +0000