AMCAX Kernel 1.0.0.0
AMCAX::Measurement Class Reference

Class for measurement. More...

#include <misc/Measurement.hpp>

Inheritance diagram for AMCAX::Measurement:
Collaboration diagram for AMCAX::Measurement:

Public Member Functions

AMCAX_API Measurement ()
 Default constructor.
 
AMCAX_API Measurement (const double value, const SIUnit &unit)
 Construct a new Measurement object with a value and a unit. More...
 
AMCAX_API Measurement (const Measurement &other)
 Copy constructor. More...
 
AMCAX_API Measurement (Measurement &&other) noexcept
 Move constructor. More...
 
AMCAX_API Measurementoperator= (const Measurement &other)
 Copy assignment operator. More...
 
AMCAX_API Measurementoperator= (Measurement &&other) noexcept
 Move assignment operator. More...
 
AMCAX_API Measurementoperator= (const double value)
 Assign a value to the measurement. More...
 
AMCAX_API Measurementoperator= (const SIUnit &unit)
 Assign a SetUnit to the measurement. More...
 
virtual AMCAX_API ~Measurement ()
 Destructor.
 
AMCAX_API bool operator== (const Measurement &other) const
 If the measurement is same as the other measurement. More...
 
AMCAX_API bool operator!= (const Measurement &other) const
 If the measurement is not same as the other measurement. More...
 
AMCAX_API bool operator< (const Measurement &other) const
 If the measurement is less than the other measurement. More...
 
AMCAX_API bool operator> (const Measurement &other) const
 If the measurement is greater than the other measurement. More...
 
AMCAX_API bool operator<= (const Measurement &other) const
 If the measurement is less than or equal to the other measurement. More...
 
AMCAX_API bool operator>= (const Measurement &other) const
 If the measurement is greater than or equal to the other measurement. More...
 
AMCAX_API const double & GetValue () const
 Get an immutable reference to the value of the measurement. More...
 
AMCAX_API double & SetValue ()
 Get a mutable reference to the value of the measurement. More...
 
AMCAX_API const SIUnitGetUnit () const
 Get an immutable reference to the unit of the measurement. More...
 
AMCAX_API SIUnitSetUnit ()
 Get a mutable reference to the unit of the measurement. More...
 

Protected Attributes

double _Value {0.0}
 
SIUnit _Unit
 

Detailed Description

Class for measurement.

Constructor & Destructor Documentation

◆ Measurement() [1/3]

AMCAX_API AMCAX::Measurement::Measurement ( const double  value,
const SIUnit unit 
)

Construct a new Measurement object with a value and a unit.

Parameters
valueThe value of the measurement
unitThe unit of the measurement

◆ Measurement() [2/3]

AMCAX_API AMCAX::Measurement::Measurement ( const Measurement other)

Copy constructor.

Parameters
otherThe other Measurement object

◆ Measurement() [3/3]

AMCAX_API AMCAX::Measurement::Measurement ( Measurement &&  other)
noexcept

Move constructor.

Parameters
otherThe other Measurement object

Member Function Documentation

◆ GetUnit()

AMCAX_API const SIUnit & AMCAX::Measurement::GetUnit ( ) const

Get an immutable reference to the unit of the measurement.

Returns
An immutable reference to the unit of the measurement

◆ GetValue()

AMCAX_API const double & AMCAX::Measurement::GetValue ( ) const

Get an immutable reference to the value of the measurement.

Returns
An immutable reference to the value of the measurement

◆ operator!=()

AMCAX_API bool AMCAX::Measurement::operator!= ( const Measurement other) const

If the measurement is not same as the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is not same as the other measurement

◆ operator<()

AMCAX_API bool AMCAX::Measurement::operator< ( const Measurement other) const

If the measurement is less than the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is less than the other measurement

◆ operator<=()

AMCAX_API bool AMCAX::Measurement::operator<= ( const Measurement other) const

If the measurement is less than or equal to the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is less than or equal to the other measurement

◆ operator=() [1/4]

AMCAX_API Measurement & AMCAX::Measurement::operator= ( const double  value)

Assign a value to the measurement.

Parameters
valueThe value to assign
Returns
The measurement object

◆ operator=() [2/4]

AMCAX_API Measurement & AMCAX::Measurement::operator= ( const Measurement other)

Copy assignment operator.

Parameters
otherThe other Measurement object

◆ operator=() [3/4]

AMCAX_API Measurement & AMCAX::Measurement::operator= ( const SIUnit unit)

Assign a SetUnit to the measurement.

Parameters
unitThe unit to assign
Returns
The measurement object

◆ operator=() [4/4]

AMCAX_API Measurement & AMCAX::Measurement::operator= ( Measurement &&  other)
noexcept

Move assignment operator.

Parameters
otherThe other Measurement object

◆ operator==()

AMCAX_API bool AMCAX::Measurement::operator== ( const Measurement other) const

If the measurement is same as the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is same as the other measurement

◆ operator>()

AMCAX_API bool AMCAX::Measurement::operator> ( const Measurement other) const

If the measurement is greater than the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is greater than the other measurement

◆ operator>=()

AMCAX_API bool AMCAX::Measurement::operator>= ( const Measurement other) const

If the measurement is greater than or equal to the other measurement.

Parameters
otherThe other measurement
Returns
True if the measurement is greater than or equal to the other measurement

◆ SetUnit()

AMCAX_API SIUnit & AMCAX::Measurement::SetUnit ( )

Get a mutable reference to the unit of the measurement.

Returns
A mutable reference to the unit of the measurement

◆ SetValue()

AMCAX_API double & AMCAX::Measurement::SetValue ( )

Get a mutable reference to the value of the measurement.

Returns
A mutable reference to the value of the measurement

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