233593b7fb
git-svn-id: svn://10.65.10.50/trunk@6614 c028cbd2-c16b-5b4b-a496-9718f37d4682
40 lines
894 B
C++
Executable File
40 lines
894 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_value(const char* newval);
|
|
const char* get_value() const { return _val; }
|
|
|
|
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() { _val[0] = '\0'; }
|
|
TCurrency(const TCurrency& cur);
|
|
TCurrency(const real& num, const char* val = "");
|
|
virtual ~TCurrency() { }
|
|
};
|
|
|
|
#endif
|