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

struct some_allowed_units { static ENUM * allowed_units() {...} } More...

#include <targeted_unit.h>

Inheritance diagram for targeted_unit< ENUM, allowed_units >:
unit_base< ENUM >

Public Member Functions

template<prototype_integral INTEGRAL>
constexpr targeted_unit (INTEGRAL i, ENUM eunit)
template<prototype_floating FLOATING>
constexpr targeted_unit (FLOATING f, ENUM eunit)
constexpr targeted_unit (const unit_base< ENUM > &unit)
template<prototype_floating FLOATING>
constexpr targeted_unit & operator= (FLOATING f)
constexpr targeted_unit & operator= (const unit_base< ENUM > &unit)
constexpr void set_unit (ENUM eunit)
template<prototype_floating FLOATING>
targeted_unit & operator*= (FLOATING f)
template<prototype_floating FLOATING>
targeted_unit & operator/= (FLOATING f)
template<prototype_floating FLOATING>
targeted_unit operator* (FLOATING f) const
template<prototype_floating FLOATING>
targeted_unit operator/ (FLOATING f) const
Public Member Functions inherited from unit_base< ENUM >
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 void assert_allowed (ENUM eunit)
static constexpr bool is_allowed (ENUM eunit)
Static Public Member Functions inherited from unit_base< ENUM >
static constexpr ENUM rate_unit ()

Additional Inherited Members

Protected Attributes inherited from unit_base< ENUM >
union { 
   ::f64   m_f64 
   ::i64   m_hi 
}; 
ENUM m_eunit
bool m_bFloating: 1

Detailed Description

template<typename ENUM, typename allowed_units>
class targeted_unit< ENUM, allowed_units >

struct some_allowed_units { static ENUM * allowed_units() {...} }


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