acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
unit_base< ENUM > Class Template Reference
Inheritance diagram for unit_base< ENUM >:
targeted_unit< ENUM, allowed_units >

Public Member Functions

template<prototype_integral INTEGRAL>
constexpr unit_base (INTEGRAL i, ENUM eunit)
template<prototype_floating FLOATING>
constexpr unit_base (FLOATING f, ENUM eunit)
template<prototype_floating FLOATING>
constexpr unit_base (FLOATING f)
constexpr unit_base (const unit_base &unit)
constexpr bool is_rate () const
constexpr bool is_floating () const
constexpr void set_floating ()
constexpr void clear_floating ()
constexpr ::i64 as_i64 () const
constexpr ::f64 as_f64 () const
constexpr ::i32 as_i32 () const
constexpr ::f32 as_f32 () const
constexpr ENUM eunit () const
constexpr bool is_null_or_negative ()
constexpr bool is_negative ()
constexpr bool is_null_or_positive ()
constexpr bool is_positive ()
bool operator== (const unit_base &unit) const
template<prototype_floating FLOATING>
constexpr unit_base & operator= (FLOATING f)
constexpr unit_base & operator= (const unit_base &unit)
constexpr void set_unit (ENUM eunit)
template<prototype_floating FLOATING>
unit_base & operator*= (FLOATING f)
template<prototype_floating FLOATING>
unit_base & operator/= (FLOATING f)
template<prototype_floating FLOATING>
unit_base operator* (FLOATING f) const
template<prototype_floating FLOATING>
unit_base operator/ (FLOATING f) const

Static Public Member Functions

static constexpr ENUM rate_unit ()

Protected Attributes

union { 
   ::f64   m_f64 
   ::i64   m_hi 
}; 
ENUM m_eunit
bool m_bFloating: 1

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