ad_physics
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ad::physics::Acceleration Class Reference

DataType Acceleration. More...

#include <ad/physics/Acceleration.hpp>

Public Member Functions

 Acceleration ()
 default constructor More...
 
_AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ Acceleration (double const iAcceleration)
 standard constructor More...
 
 Acceleration (const Acceleration &other)=default
 standard copy constructor
 
 Acceleration (Acceleration &&other)=default
 standard move constructor
 
Accelerationoperator= (const Acceleration &other)=default
 standard assignment operator More...
 
Accelerationoperator= (Acceleration &&other)=default
 standard move operator More...
 
bool operator== (const Acceleration &other) const
 standard comparison operator More...
 
bool operator!= (const Acceleration &other) const
 standard comparison operator More...
 
bool operator> (const Acceleration &other) const
 standard comparison operator More...
 
bool operator< (const Acceleration &other) const
 standard comparison operator More...
 
bool operator>= (const Acceleration &other) const
 standard comparison operator More...
 
bool operator<= (const Acceleration &other) const
 standard comparison operator More...
 
Acceleration operator+ (const Acceleration &other) const
 standard arithmetic operator More...
 
Accelerationoperator+= (const Acceleration &other)
 standard arithmetic operator More...
 
Acceleration operator- (const Acceleration &other) const
 standard arithmetic operator More...
 
Acceleration operator-= (const Acceleration &other)
 standard arithmetic operator More...
 
Acceleration operator* (const double &scalar) const
 standard arithmetic operator More...
 
Acceleration operator/ (const double &scalar) const
 standard arithmetic operator More...
 
double operator/ (const Acceleration &other) const
 standard arithmetic operator More...
 
Acceleration operator- () const
 standard arithmetic operator More...
 
_AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ operator double () const
 conversion to base type: double More...
 
bool isValid () const
 
void ensureValid () const
 ensure that the Acceleration is valid More...
 
void ensureValidNonZero () const
 ensure that the Acceleration is valid and non zero More...
 

Static Public Member Functions

static Acceleration getMin ()
 get minimum valid Acceleration (i.e. cMinValue)
 
static Acceleration getMax ()
 get maximum valid Acceleration (i.e. cMaxValue)
 
static Acceleration getPrecision ()
 get assumed accuracy of Acceleration (i.e. cPrecisionValue)
 

Static Public Attributes

static const double cMinValue
 constant defining the minimum valid Acceleration value (used in isValid())
 
static const double cMaxValue
 constant defining the maximum valid Acceleration value (used in isValid())
 
static const double cPrecisionValue
 constant defining the assumed Acceleration value accuracy (used in comparison operator==(), operator!=())
 

Detailed Description

DataType Acceleration.

The rate of change of Speed of an object with respect to time. The unit is: MeterPerSecondSquared

Constructor & Destructor Documentation

ad::physics::Acceleration::Acceleration ( )
inline

default constructor

The default value of Acceleration is: std::numeric_limits<double>::quiet_NaN()

_AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ ad::physics::Acceleration::Acceleration ( double const  iAcceleration)
inline

standard constructor

Note
_AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ defines, if only an explicit conversion is allowed.

Member Function Documentation

void ad::physics::Acceleration::ensureValid ( ) const
inline

ensure that the Acceleration is valid

Throws an std::out_of_range() exception if the Acceleration in not valid (i.e. isValid() returns false)

void ad::physics::Acceleration::ensureValidNonZero ( ) const
inline

ensure that the Acceleration is valid and non zero

Throws an std::out_of_range() exception if the Acceleration in not valid or zero (i.e. isValid() returns false)

bool ad::physics::Acceleration::isValid ( ) const
inline
Returns
true if the Acceleration in a valid range

An Acceleration value is defined to be valid if:

_AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ ad::physics::Acceleration::operator double ( ) const
inline

conversion to base type: double

Note
the conversion to the base type removes the physical unit. _AD_PHYSICS_ACCELERATION_EXPLICIT_CONVERSION_ defines, if only explicit calls are allowed.
bool ad::physics::Acceleration::operator!= ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration.
Returns
true if one of the Acceleration is not valid or they can be taken as numerically different
Acceleration ad::physics::Acceleration::operator* ( const double &  scalar) const
inline

standard arithmetic operator

Parameters
[in]scalarScalar double value
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if value or the result of the operation is not valid
Acceleration ad::physics::Acceleration::operator+ ( const Acceleration other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Acceleration
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid
Acceleration& ad::physics::Acceleration::operator+= ( const Acceleration other)
inline

standard arithmetic operator

Parameters
[in]otherOther Acceleration
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid
Acceleration ad::physics::Acceleration::operator- ( const Acceleration other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Acceleration
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid
Acceleration ad::physics::Acceleration::operator- ( ) const
inline

standard arithmetic operator

Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if this or the result of the operation is not valid
Acceleration ad::physics::Acceleration::operator-= ( const Acceleration other)
inline

standard arithmetic operator

Parameters
[in]otherOther Acceleration
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid
Acceleration ad::physics::Acceleration::operator/ ( const double &  scalar) const
inline

standard arithmetic operator

Parameters
[in]scalarScalar double value
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if this or the result of the operation is not valid or other is zero
double ad::physics::Acceleration::operator/ ( const Acceleration other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Acceleration
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid or other is zero
since Acceleration is a type with physical unit, the division results in the dimensionless type.
bool ad::physics::Acceleration::operator< ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration.
Returns
true if both Acceleration are valid and this Acceleration is strictly numerically smaller than other.
Note
the precision of Acceleration is considered
bool ad::physics::Acceleration::operator<= ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration
Returns
true if both Acceleration are valid and this Acceleration is numerically smaller than other.
Note
the precision of Acceleration is considered
Acceleration& ad::physics::Acceleration::operator= ( const Acceleration other)
default

standard assignment operator

Parameters
[in]otherOther Acceleration
Returns
Reference to this Acceleration.
Acceleration& ad::physics::Acceleration::operator= ( Acceleration &&  other)
default

standard move operator

Parameters
[in]otherOther Acceleration
Returns
Reference to this Acceleration.
bool ad::physics::Acceleration::operator== ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration
Returns
true if both Acceleration are valid and can be taken as numerically equal
bool ad::physics::Acceleration::operator> ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration.
Returns
true if both Acceleration are valid and this Acceleration is strictly numerically greater than other.
Note
the precision of Acceleration is considered
bool ad::physics::Acceleration::operator>= ( const Acceleration other) const
inline

standard comparison operator

Parameters
[in]otherOther Acceleration.
Returns
true if both Acceleration are valid and this Acceleration is numerically greater than other.
Note
the precision of Acceleration is considered

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