Skip to main content

chronon::params::detail::ScaledUnitBase

CRTP base for scaled-unit types (Frequency, Latency, Bandwidth). More...

#include <UnitTypes.hpp>

Public Functions

Name
std::stringtoString() const
booloperator>=(const Derived & other) const
booloperator>(const Derived & other) const
booloperator==(const Derived & other) const
booloperator<=(const Derived & other) const
booloperator<(const Derived & other) const
Derivedoperator/(double scalar) const
doubleoperator/(const Derived & other) const
Derivedoperator-(const Derived & other) const
Derivedoperator+(const Derived & other) const
Derivedoperator*(double scalar) const
booloperator!=(const Derived & other) const
doublebaseValue() const
ScaledUnitBase()
ScaledUnitBase(double base_value)
ScaledUnitBase(const std::string & s)

Protected Functions

Name
voidparse(const std::string & s)

Protected Attributes

Name
doublevalue_

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