cpp_robotics::unit::Unit
単位クラス More...
#include <unit_core.hpp>
Public Types
Name | |
---|---|
using T | value_type |
using UnitDimType | unit_dimention_type |
using P | prefix_type |
using Unit< T, UnitDimType, P > | unit_type |
Public Functions
Name | |
---|---|
Unit() =default | |
constexpr | Unit(T val) |
constexpr T | value() const |
constexpr T | raw_value() const |
constexpr unit_type | operator+() const |
constexpr unit_type | operator-() const |
constexpr unit_type | operator+(const unit_type & rhl) const |
constexpr unit_type | operator-(const unit_type & rhl) const |
constexpr auto | operator*(const unit_type & rhl) const |
constexpr unit_type & | operator+=(const unit_type & rhl) |
constexpr unit_type & | operator-=(const unit_type & rhl) |
template <int R_Tag> constexpr |
operator Unit< value_type, unit_dimention_type, prefix_type, R_Tag >() const |
template <class R_P > constexpr |
operator Unit< value_type, unit_dimention_type, R_P, tag >() const |
constexpr | operator value_type() const |
constexpr bool | operator==(const unit_type & r_value) |
constexpr bool | operator!=(const unit_type & r_value) |
Public Attributes
Name | |
---|---|
constexpr int | tag |
Detailed Description
template <class T ,
class UnitDimType ,
class P ,
int Tag =-1>
class cpp_robotics::unit::Unit;
単位クラス
Template Parameters:
- T 浮動小数点数型
- UnitDimType 次元
- P 接頭辞
- Tag 同次元の単位系を区別するタグ
Public Types Documentation
using value_type
using cpp_robotics::unit::Unit< T, UnitDimType, P, Tag >::value_type = T;
using unit_dimention_type
using cpp_robotics::unit::Unit< T, UnitDimType, P, Tag >::unit_dimention_type = UnitDimType;
using prefix_type
using cpp_robotics::unit::Unit< T, UnitDimType, P, Tag >::prefix_type = P;
using unit_type
using cpp_robotics::unit::Unit< T, UnitDimType, P, Tag >::unit_type = Unit<T, UnitDimType, P>;
Public Functions Documentation
function Unit
Unit() =default
function Unit
inline constexpr Unit(
T val
)
function value
inline constexpr T value() const
function raw_value
inline constexpr T raw_value() const
function operator+
inline constexpr unit_type operator+() const
function operator-
inline constexpr unit_type operator-() const
function operator+
inline constexpr unit_type operator+(
const unit_type & rhl
) const
function operator-
inline constexpr unit_type operator-(
const unit_type & rhl
) const
function operator*
inline constexpr auto operator*(
const unit_type & rhl
) const
function operator+=
inline constexpr unit_type & operator+=(
const unit_type & rhl
)
function operator-=
inline constexpr unit_type & operator-=(
const unit_type & rhl
)
function operator Unit< value_type, unit_dimention_type, prefix_type, R_Tag >
template <int R_Tag>
inline constexpr operator Unit< value_type, unit_dimention_type, prefix_type, R_Tag >() const
function operator Unit< value_type, unit_dimention_type, R_P, tag >
template <class R_P >
inline constexpr operator Unit< value_type, unit_dimention_type, R_P, tag >() const
function operator value_type
inline constexpr operator value_type() const
function operator==
inline constexpr bool operator==(
const unit_type & r_value
)
function operator!=
inline constexpr bool operator!=(
const unit_type & r_value
)
Public Attributes Documentation
variable tag
static constexpr int tag = Tag;
Updated on 2024-05-28 at 06:55:40 +0000