Files correlati : Ricompilazione Demo : [ ] Commento : currency.* Migliorata gestione valute nulle date.h Migliorati operatori di somma date.cpp Eliminato uso inutile della __tmp_date execp.cpp Corretta chiamata a chiusura files expr.h Trasformato Sandro in Alex expr.cpp Sostituiti vari real(0.0) con ZERO git-svn-id: svn://10.65.10.50/trunk@7199 c028cbd2-c16b-5b4b-a496-9718f37d4682
41 lines
922 B
C++
Executable File
41 lines
922 B
C++
Executable File
#ifndef __CURRENCY_H
|
|
#define __CURRENCY_H
|
|
|
|
#ifndef __REAL_H
|
|
#include <real.h>
|
|
#endif
|
|
|
|
#ifndef __RECTYPES_H
|
|
class TRectype;
|
|
#endif
|
|
|
|
class TCurrency : public TSortable
|
|
{
|
|
real _num;
|
|
char _val[4];
|
|
|
|
protected:
|
|
virtual int compare(const TSortable& s) const;
|
|
|
|
public:
|
|
void change_currency(const char* newval);
|
|
const char* get_currency() const { return _val; }
|
|
void set_currency(const char* newval);
|
|
|
|
void set_num(const real& num) { _num = num; }
|
|
const real& get_num() const { return _num; }
|
|
|
|
const TCurrency& operator=(const TCurrency& cur);
|
|
|
|
const char* string(bool dotted = FALSE) const;
|
|
void read(const TRectype& rec, const char* field, const char *val = NULL);
|
|
void write(TRectype& rec, const char* field, const char *val = NULL, bool forceval = FALSE) const;
|
|
|
|
TCurrency();
|
|
TCurrency(const TCurrency& cur);
|
|
TCurrency(const real& num, const char* val = "");
|
|
virtual ~TCurrency() { }
|
|
};
|
|
|
|
#endif
|