FreeCAD C++
Public Member Functions | List of all members
Base::Quantity Class Reference

#include <Base/Quantity.h>

Detailed Description

The Quantity class.

Public Member Functions

 Quantity (void)
 default constructor
 
 ~Quantity ()
 Destruction.
 
QString getUserString (double &factor, QString &unitString) const
 transfer to user preferred unit/potence
 
const UnitgetUnit (void) const
 returns the unit of the quantity
 
void setUnit (const Unit &un)
 set the unit of the quantity
 
double getValue (void) const
 get the Value of the quantity
 
void setValue (double val)
 set the value of the quantity
 
double getValueAs (const Quantity &) const
 
bool isDimensionless (void) const
 true if it has a number without a unit
 
bool isQuantity (void) const
 true if it has a number and a valid unit
 
bool isValid (void) const
 true if it has a number with or without a unit
 
void setInvalid (void)
 sets the quantity invalid
 
Quantity operator * (const Quantity &p) const
 

Static Public Attributes

static Quantity NanoMetre
 

Member Function Documentation

◆ getValueAs()

double Base::Quantity::getValueAs ( const Quantity ) const

get the Value in a special unit given as quantity. One can use one of the predifeined quantity units in this class

◆ operator *()

Quantity Base::Quantity::operator * ( const Quantity p) const

Operators.

Member Data Documentation

◆ NanoMetre

Quantity Base::Quantity::NanoMetre
static

Predefined Unit types.