Potenziato init() di TDistrib

git-svn-id: svn://10.65.10.50/trunk@202 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-09-09 10:03:59 +00:00
parent 0ffb982941
commit 27006ca266
2 changed files with 7 additions and 4 deletions

View File

@ -793,8 +793,9 @@ real TDistrib::get ()
return r;
}
void TDistrib::init (const real & r)
void TDistrib::init (const real & r, bool zap)
{
_current = 0; _prog = 0;
_tot = r; _ready = FALSE;
_tot = r; _ready = FALSE;
if (zap) _slices.destroy();
}

View File

@ -140,8 +140,10 @@ public:
void add(real slice);
real get();
void init(const real& r);
// se zap e' vero scancella tutte le percentuali immesse
// altrimenti cambia solo il totale
void init(const real& r, bool zap = FALSE);
void operator =(const real& r) { init(r); }
const real& last_slice() const
{