Potenziato init() di TDistrib
git-svn-id: svn://10.65.10.50/trunk@202 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0ffb982941
commit
27006ca266
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user