Tolto close() a TDistrib

git-svn-id: svn://10.65.10.50/trunk@61 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-08-25 09:35:18 +00:00
parent 8b6051e689
commit 3eb401c338
2 changed files with 57 additions and 58 deletions

View File

@ -778,7 +778,7 @@ void TDistrib ::add (real slice)
_slices.add (slice); _slices.add (slice);
} }
real TDistrib ::get () real TDistrib::get ()
{ {
_ready = TRUE; _ready = TRUE;
CHECK (_current < _slices.items (), "TDistrib: too many gets"); CHECK (_current < _slices.items (), "TDistrib: too many gets");
@ -793,7 +793,7 @@ real TDistrib ::get ()
return r; return r;
} }
void TDistrib ::init (const real & r) void TDistrib::init (const real & r)
{ {
_current = 0; _prog = 0; _current = 0; _prog = 0;
_tot = r; _ready = FALSE; _tot = r; _ready = FALSE;

View File

@ -24,9 +24,9 @@
// @C // @C
class real : public TObject class real : public TObject
{ {
// @DPRIV // @DPRIV
DEC _dec; DEC _dec;
// @END // @END
protected: protected:
virtual TObject* dup() const; virtual TObject* dup() const;
@ -35,11 +35,11 @@ protected:
public: public:
static char* eng2ita(char* s); static char* eng2ita(char* s);
static char* ita2eng(const char* s); static char* ita2eng(const char* s);
static bool is_real(const char* n); static bool is_real(const char* n);
// @FPUB // @FPUB
DEC* ptr() const { return (DEC*)&_dec; } DEC* ptr() const { return (DEC*)&_dec; }
char* string(int len = 0, int dec = UNDEFINED, char pad = ' ') const; char* string(int len = 0, int dec = UNDEFINED, char pad = ' ') const;
char* stringa(int len = 0, int dec = UNDEFINED, char pad = ' ') const; char* stringa(int len = 0, int dec = UNDEFINED, char pad = ' ') const;
@ -136,11 +136,10 @@ class TDistrib : public TObject
int _current; int _current;
int _decs; int _decs;
public: public:
void add(real slice); void add(real slice);
real get(); real get();
void close();
void init(const real& r); void init(const real& r);
void operator =(const real& r) { init(r); } void operator =(const real& r) { init(r); }