Logo Search packages:      
Sourcecode: qbrew version File versions

Unit Class Reference

#include <quantity.h>

List of all members.

Detailed Description

A class to encapsulate the idea of a unit of measure. This is a slight variation of the Unit from Fowler's Quantity analysis pattern.

Definition at line 46 of file quantity.h.

Public Member Functions

void addConversion (const Unit &to, const Conversion c)
double convert (double amount, const Unit &u) const
bool convertable (const Unit &u) const
QString name () const
QString symbol () const
 Unit (const QString &name, const QString &symbol)
 ~Unit ()

Static Public Member Functions

static Unitunit (const QString &symbol)

Private Member Functions

Unit operator= (const Unit &)
 Unit (const Unit &)

Private Attributes

QMap< QString, Conversion > conversions_
QString name_
QString symbol_

Static Private Attributes

static QMap< QString, Unit * > units_

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

Generated by  Doxygen 1.6.0   Back to index