#include <CurrencyDB.h>
Inheritance diagram for CurrencyDB:
Public Methods | |
void | unpackRecord (currencyStructure *currency, packedCurrencyStructure *packed_currency) DB_SECTION1 |
unpacks a currency record. More... | |
void | packRecord (currencyStructure *currency, MemHandle db_entry) DB_SECTION1 |
packs a currency record. More... | |
CurrencyDB () DB_SECTION1 | |
initialize the database. More... | |
UInt16 | newRecord (currencyStructure *c) DB_SECTION1 |
creates a new record; if this is the only currency the default currency for the application is automatically set to the uid for this new record; the exchange rate is automatically set to 1. More... | |
bool | deleteRecord (UInt16 id) DB_SECTION1 |
deletes a currency, given its id. More... | |
bool | checkCurrencyDependency (UInt16 id) DB_SECTION1 |
check whether there is any kind of dependency on the given currency. More... | |
bool | checkForExistingCode (Char *code, UInt32 ignore_uid=0) DB_SECTION1 |
checks if a given code already exists in the database. More... | |
double | getExchangeRate (UInt32 currency1, UInt32 currency2) DB_SECTION1 |
This method can be used to obtain the exchange rate between any two currencies. More... | |
void | adjustExchangeRate (UInt32 src_currency, UInt32 dest_currency, double rate) DB_SECTION1 |
modifies the exchange rate in between the given currency to match some given rate. More... | |
void | newDefaultCurrency (UInt32 currency) DB_SECTION1 |
Update all exchange rates so that they correspond to a new given default currency. More... | |
void | getDescriptionTruncLeftToFit (UInt32 uid, Int16 width, Char *buffer) DB_SECTION1 |
creates a description for a given currency and puts it in a (preallocated) buffer. More... | |
Static Public Methods | |
Int16 | compareRecords (packedCurrencyStructure *rec1, packedCurrencyStructure *rec2, Int16 other, SortRecordInfoPtr sr1, SortRecordInfoPtr sr2, MemHandle app_info) DB_SECTION1 |
Compares two packed currency structures. More... |
Definition at line 50 of file CurrencyDB.h.
|
initialize the database.
|
|
modifies the exchange rate in between the given currency to match some given rate.
|
|
check whether there is any kind of dependency on the given currency.
|
|
checks if a given code already exists in the database.
|
|
Compares two packed currency structures. The currency database is sorted by code For parameters see the PalmOS reference |
|
deletes a currency, given its id. The process fails if the given currency is set as default, or if there are any accounts which use the currency
Reimplemented from GenericDB. |
|
creates a description for a given currency and puts it in a (preallocated) buffer.
|
|
This method can be used to obtain the exchange rate between any two currencies. The calculation will make use of the exchange rate w.r.t the default currency
|
|
Update all exchange rates so that they correspond to a new given default currency.
|
|
creates a new record; if this is the only currency the default currency for the application is automatically set to the uid for this new record; the exchange rate is automatically set to 1. Otherwise the record is simply created without any further manipulation The code names have to be unique, so giving an existing code name will result in a warning a refusal to create
Reimplemented from Database< currencyStructure, packedCurrencyStructure >. |
|
packs a currency record.
Implements Database< currencyStructure, packedCurrencyStructure >. |
|
unpacks a currency record.
Implements Database< currencyStructure, packedCurrencyStructure >. |