compres(char v) : state(v) {}
// is it?
operator bool() const { return state != 0; }
- // is it not?
- bool operator! () const { return state != 1; }
- bool operator==(bool b) const { return state != !b; }
- bool operator!=(bool b) const { return state != b; }
private:
char state;
};
UpdateValue();
}
- bool IsOriginal() const { return !(IsInverted() || IsNegated()); }
bool IsInverted() const { return inverted; }
bool IsNegated() const { return negated; }
- bool IsInvertedOriginal() const { return IsInverted() && !IsNegated(); }
bool IsNegatedOriginal() const { return !IsInverted() && IsNegated(); }
private:
return *this;
}
const CodeTreeData *operator-> () const { return &p->first; }
- const CodeTreeData &operator* () const { return p->first; }
CodeTreeData *operator-> () { PrepareForWrite(); return &p->first; }
- CodeTreeData &operator* () { PrepareForWrite(); return p->first; }
void Shock();
};
SubTree& getp0() { /*chk<1>();*/pit tmp=GetBegin(); return *tmp; }
SubTree& getp1() { /*chk<2>();*/pit tmp=GetBegin(); ++tmp; return *tmp; }
- SubTree& getp2() { /*chk<3>();*/pit tmp=GetBegin(); ++tmp; ++tmp; return *tmp; }
// set
void SetImmed(double v) { data->SetImmed(v); }
compres NonZero() const { if(!IsImmed()) return maybe;
return GetImmed() != 0.0; }
- compres IsPositive() const { if(!IsImmed()) return maybe;
- return GetImmed() > 0.0; }
private:
struct ConstList