Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Currency Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWCurrency

Module:  Currency   Group:  Currency


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include<rw/currency/currency.h>
RWCurrency USDollars("USD", 840, "dollar", "cents", 0.01);

Description

The RWCurrency class provides a repository for the following currency information:

If you omit the introduction date and the expiration date when constructing an RWCurrency object, the constructor assigns them values of the public static data members RWCurrency::noIntroductionDate and RWCurrency::noExpirationDate, respectively.

Static Public Data Members

static const RWDate noExpirationDate;
static const RWDate noIntroductionDate;

Public Constructors

RWCurrency();
RWCurrency(const RWCurrency& c);
RWCurrency(const RWCString& mnemonic, 
           int code, const RWCString& name,
           const RWCString& fractionName, 
           double wholeToFractRatio);
RWCurrency(const RWCString& mnemonic, 
           int code, const RWCString& name,
           const RWCString& fractionName, 
           double wholeToFractRatio, const RWDate& intro,
           constRWDate& expire);

Public Member Operators

RWCurrency&
operator=(const RWCurrency& c);

Public Member Functions

int 
code() const;
RWDate
expirationDate() const;
RWCString 
fractionName() const;
bool
hasExpired() const;
RWDate
introductionDate() const;
bool
isActive() const;
RWCString 
mnemonic() const;
RWCString 
name() const;
void 
restoreFrom(RWFile&);
void 
restoreFrom(RWvistream&);
void 
setCode(int code);
RWDate
setExpirationDate(const RWDate& d);
RWDate
setIntroductionDate(const RWDate& d);
void 
saveOn(RWFile&) const;
void 
saveOn(RWvostream&) const;
void 
setFractionName(const RWCString& name);
void 
setName(const RWCString& name);
void 
setMnemonic(const RWCString& mnemonic);
void 
setWholeToFractionRatio(double ratio);
RWCString 
wholeToFractionRatio() const;

Related Global Operators

bool 
operator==(const RWCurrency& lhs, const RWCurrency& rhs);
RWvostream& 
operator<<(RWvostream& strm, const RWCurrency& c);
RWFile& 
operator<<(RWFile& file, const RWCurrency& c);
RWvistream& 
operator>>(RWvistream& strm, const RWCurrency& c);
RWFile& 
operator>>(RWFile& strm, const RWCurrency& c);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.