OSB_LIB::Currency Class Reference

Collaboration diagram for OSB_LIB::Currency:

Collaboration graph
[legend]
List of all members.

Detailed Description

ISO 4217:1995 Currency.

A currency consists of the ISO 4217 currency code (e.g., EUR), base name (dollar), fraction name (cents) and the symbols for the base and fraction parts.
Users creating non-ISO currencies will need to maintain the uniqueness of these identifiers. The currency code is used by other classes (e.g., Money) to refer to a currency.

Definition at line 73 of file money.h.

Public Types

Public Member Functions

Read access to data members

Private Attributes

Friends


Member Typedef Documentation

typedef std::string OSB_LIB::Currency::Oid

Object identifier: the ISO 4217 3-character code.

Definition at line 79 of file money.h.


Constructor & Destructor Documentation

OSB_LIB::Currency::Currency ( const Oid oid = Oid()  )  [explicit]

Default constructor with optional object id.

Exceptions:
OsbException if oid contains more than 3 characters.


Member Function Documentation

std::string OSB_LIB::Currency::baseName (  )  const [inline]

Base name of the currency (e.g., dollar).

Definition at line 93 of file money.h.

References baseName_.

std::string OSB_LIB::Currency::baseSymbol (  )  const [inline]

Symbol to use for the base part of an amount (e.g., $).

Definition at line 97 of file money.h.

References baseSymbol_.

std::string OSB_LIB::Currency::fractionName (  )  const [inline]

Fraction name of the currency (e.g., cents).

Definition at line 95 of file money.h.

References fractionName_.

std::string OSB_LIB::Currency::fractionSymbol (  )  const [inline]

Symbol for the fraction part of an amount (e.g., c).

Definition at line 99 of file money.h.

References fractionSymbol_.

bool OSB_LIB::Currency::match ( const Oid oid  )  const [inline]

Check if a currency object has the specified currency code.

Definition at line 102 of file money.h.

References oid_.

Oid OSB_LIB::Currency::oid (  )  const [inline]

Currency ISO 4217 code.

Definition at line 91 of file money.h.

References oid_.


Friends And Related Function Documentation

friend class OSB_DB::CurrencyBookGw [friend]

Allow the gateway to set data members directly.

Definition at line 76 of file money.h.


Member Data Documentation

std::string OSB_LIB::Currency::baseName_ [private]

Base name of the currency.

Definition at line 108 of file money.h.

Referenced by baseName().

std::string OSB_LIB::Currency::baseSymbol_ [private]

Symbol for the base part.

Definition at line 110 of file money.h.

Referenced by baseSymbol().

std::string OSB_LIB::Currency::fractionName_ [private]

Fraction name.

Definition at line 112 of file money.h.

Referenced by fractionName().

std::string OSB_LIB::Currency::fractionSymbol_ [private]

Symbol for the fraction.

Definition at line 114 of file money.h.

Referenced by fractionSymbol().

Oid OSB_LIB::Currency::oid_ [private]

Currency ISO 4217 code.

Definition at line 106 of file money.h.

Referenced by match(), and oid().


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