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

Representation of volume, internally stored as floating-point cubic meters. More...

#include <volume.h>

Public Member Functions

 Volume ()
 Creates a volume object representing an 'unknown' volume.
 
float inCubicKilometers () const
 Returns the volume in cubic kilometers.
 
float inCubicMeters () const
 Returns the volume in cubic meters.
 
float inLiters () const
 Returns the volume in liters.
 
float inCubicDecimeters () const
 Returns the volume in liters.
 
float inMilliliters () const
 Returns the volume in milliliters.
 
float inCubicCentimeters () const
 Returns the volume in milliliters.
 
float inMicroliters () const
 Returns the volume in microliters.
 
float inCubicMillimeters () const
 Returns the volume in microliters.
 
float inCubicMicrometers () const
 Returns the volume in cubic micrometers.
 
float inCubicInches () const
 Returns the volume in cubic inches.
 
bool isUnknown () const
 Returns whether the object represents an unknown volume.
 
bool operator< (const Volume &other) const
 
bool operator== (const Volume &other) const
 
bool operator> (const Volume &other) const
 
bool operator<= (const Volume &other) const
 
bool operator>= (const Volume &other) const
 
bool operator!= (const Volume &other) const
 
Volumeoperator+= (const Volume &other)
 
Volumeoperator-= (const Volume &other)
 
Volumeoperator*= (float multi)
 
Volumeoperator/= (float div)
 

Friends

Volume UnknownVolume ()
 Returns a volume object representing an unknown volume.
 
Volume VolumeInCubicMeters (float)
 Returns a volume object equivalent to the specified volume expressed in cubic meters.
 

Detailed Description

Representation of volume, internally stored as floating-point cubic meters.

Definition at line 21 of file volume.h.

Constructor & Destructor Documentation

◆ Volume()

roo_quantity::Volume::Volume ( )
inline

Creates a volume object representing an 'unknown' volume.

Definition at line 24 of file volume.h.

Member Function Documentation

◆ inCubicCentimeters()

float roo_quantity::Volume::inCubicCentimeters ( ) const
inline

Returns the volume in milliliters.

Definition at line 42 of file volume.h.

References inMilliliters().

◆ inCubicDecimeters()

float roo_quantity::Volume::inCubicDecimeters ( ) const
inline

Returns the volume in liters.

Definition at line 36 of file volume.h.

References inLiters().

◆ inCubicInches()

float roo_quantity::Volume::inCubicInches ( ) const
inline

Returns the volume in cubic inches.

Definition at line 54 of file volume.h.

◆ inCubicKilometers()

float roo_quantity::Volume::inCubicKilometers ( ) const
inline

Returns the volume in cubic kilometers.

Definition at line 27 of file volume.h.

◆ inCubicMeters()

◆ inCubicMicrometers()

float roo_quantity::Volume::inCubicMicrometers ( ) const
inline

Returns the volume in cubic micrometers.

Definition at line 51 of file volume.h.

◆ inCubicMillimeters()

float roo_quantity::Volume::inCubicMillimeters ( ) const
inline

Returns the volume in microliters.

Definition at line 48 of file volume.h.

References inMicroliters().

◆ inLiters()

float roo_quantity::Volume::inLiters ( ) const
inline

Returns the volume in liters.

Definition at line 33 of file volume.h.

Referenced by inCubicDecimeters().

◆ inMicroliters()

float roo_quantity::Volume::inMicroliters ( ) const
inline

Returns the volume in microliters.

Definition at line 45 of file volume.h.

Referenced by inCubicMillimeters().

◆ inMilliliters()

float roo_quantity::Volume::inMilliliters ( ) const
inline

Returns the volume in milliliters.

Definition at line 39 of file volume.h.

Referenced by inCubicCentimeters().

◆ isUnknown()

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

Returns whether the object represents an unknown volume.

Definition at line 57 of file volume.h.

◆ operator!=()

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

Definition at line 75 of file volume.h.

◆ operator*=()

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

Definition at line 89 of file volume.h.

◆ operator+=()

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

Definition at line 79 of file volume.h.

References inCubicMeters().

◆ operator-=()

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

Definition at line 84 of file volume.h.

References inCubicMeters().

◆ operator/=()

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

Definition at line 94 of file volume.h.

◆ operator<()

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

Definition at line 59 of file volume.h.

◆ operator<=()

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

Definition at line 67 of file volume.h.

◆ operator==()

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

Definition at line 61 of file volume.h.

◆ operator>()

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

Definition at line 65 of file volume.h.

◆ operator>=()

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

Definition at line 71 of file volume.h.

Friends And Related Symbol Documentation

◆ UnknownVolume

Volume UnknownVolume ( )
friend

Returns a volume object representing an unknown volume.

Definition at line 122 of file volume.h.

◆ VolumeInCubicMeters

Volume VolumeInCubicMeters ( float  volume)
friend

Returns a volume object equivalent to the specified volume expressed in cubic meters.

Definition at line 132 of file volume.h.


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