roo_quantity
API Documentation for roo_quantity
Loading...
Searching...
No Matches
roo_quantity::Work Class Reference

Representation of work, internally stored as floating-point Joules. More...

#include <work.h>

Public Member Functions

 Work ()
 Creates a work object representing an 'unknown' work.
 
float inKiloJoules () const
 Returns the work in kilojoules.
 
float inJoules () const
 Returns the work in joules.
 
float inMilliJoules () const
 Returns the work in millijoules.
 
float inMicroJoules () const
 Returns the work in microjoules.
 
bool isUnknown () const
 Returns whether the object represents an unknown work.
 
bool operator< (const Work &other) const
 
bool operator== (const Work &other) const
 
bool operator> (const Work &other) const
 
bool operator<= (const Work &other) const
 
bool operator>= (const Work &other) const
 
bool operator!= (const Work &other) const
 
Workoperator+= (const Work &other)
 
Workoperator-= (const Work &other)
 
Workoperator*= (float multi)
 
Workoperator/= (float div)
 

Friends

Work UnknownWork ()
 Returns a work object representing an unknown work.
 
Work WorkInJoules (float)
 Returns a work object equivalent to the specified work expressed in Joules.
 

Detailed Description

Representation of work, internally stored as floating-point Joules.

Definition at line 19 of file work.h.

Constructor & Destructor Documentation

◆ Work()

roo_quantity::Work::Work ( )
inline

Creates a work object representing an 'unknown' work.

Definition at line 22 of file work.h.

Member Function Documentation

◆ inJoules()

◆ inKiloJoules()

float roo_quantity::Work::inKiloJoules ( ) const
inline

Returns the work in kilojoules.

Definition at line 25 of file work.h.

◆ inMicroJoules()

float roo_quantity::Work::inMicroJoules ( ) const
inline

Returns the work in microjoules.

Definition at line 34 of file work.h.

◆ inMilliJoules()

float roo_quantity::Work::inMilliJoules ( ) const
inline

Returns the work in millijoules.

Definition at line 31 of file work.h.

◆ isUnknown()

bool roo_quantity::Work::isUnknown ( ) const
inline

Returns whether the object represents an unknown work.

Definition at line 37 of file work.h.

◆ operator!=()

bool roo_quantity::Work::operator!= ( const Work other) const
inline

Definition at line 49 of file work.h.

◆ operator*=()

Work & roo_quantity::Work::operator*= ( float  multi)
inline

Definition at line 61 of file work.h.

◆ operator+=()

Work & roo_quantity::Work::operator+= ( const Work other)
inline

Definition at line 51 of file work.h.

References inJoules().

◆ operator-=()

Work & roo_quantity::Work::operator-= ( const Work other)
inline

Definition at line 56 of file work.h.

References inJoules().

◆ operator/=()

Work & roo_quantity::Work::operator/= ( float  div)
inline

Definition at line 66 of file work.h.

◆ operator<()

bool roo_quantity::Work::operator< ( const Work other) const
inline

Definition at line 39 of file work.h.

◆ operator<=()

bool roo_quantity::Work::operator<= ( const Work other) const
inline

Definition at line 45 of file work.h.

◆ operator==()

bool roo_quantity::Work::operator== ( const Work other) const
inline

Definition at line 41 of file work.h.

◆ operator>()

bool roo_quantity::Work::operator> ( const Work other) const
inline

Definition at line 43 of file work.h.

◆ operator>=()

bool roo_quantity::Work::operator>= ( const Work other) const
inline

Definition at line 47 of file work.h.

Friends And Related Symbol Documentation

◆ UnknownWork

Work UnknownWork ( )
friend

Returns a work object representing an unknown work.

Definition at line 94 of file work.h.

◆ WorkInJoules

Work WorkInJoules ( float  work)
friend

Returns a work object equivalent to the specified work expressed in Joules.

Definition at line 116 of file work.h.


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