OSB_LIB::Unit Class Reference

Collaboration diagram for OSB_LIB::Unit:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 63 of file osbunit.h.

Public Types

Public Member Functions

Static Public Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef TypeId<Unit> OSB_LIB::Unit::Oid

Type-safe object identifier.

Definition at line 67 of file osbunit.h.


Member Enumeration Documentation

enum OSB_LIB::Unit::UnitId

Units supported by OSB.

Enumerator:
uiSeconds 
uiMinutes 
uiHours 
uiDays 
uiMonths 
uiYears 
uiBilledPeriod 
uiBytes 
uiMessages 
uiMax 

Definition at line 71 of file osbunit.h.


Member Function Documentation

static bool OSB_LIB::Unit::canConvert ( const Oid lhs,
const Oid rhs 
) [static]

Determine whether rhs can be converted to lhs.

static Decimal OSB_LIB::Unit::convert ( const Oid lhs,
const Oid rhs,
const Decimal value 
) [static]

Convert a value from one unit to another.

Parameters:
lhs The unit to be converted to.
rhs The unit of the original value to be converted.
value Original value to be converted.
Returns:
Converted value from the original rhs unit to the lhs unit.
Exceptions:
OsbException if the original value cannot be converted to the new value due to incompatible unit.

const std::string& OSB_LIB::Unit::name (  )  const

Get name.

Oid OSB_LIB::Unit::oid (  )  const

Get object id.

UnitId OSB_LIB::Unit::unitId (  )  const

Convert object id to `long'.

static UnitId OSB_LIB::Unit::unitId ( const Oid oid  )  [static]

Convert object id to `long', class utility.


Friends And Related Function Documentation

friend class OSB_DB::UnitGw [friend]

Definition at line 64 of file osbunit.h.


Member Data Documentation

std::string OSB_LIB::Unit::name_ [private]

Name of the unit.

Definition at line 120 of file osbunit.h.

Oid OSB_LIB::Unit::oid_ [private]

Object id.

Definition at line 118 of file osbunit.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:12:19 2006 for OSB Library by  doxygen 1.4.7