void DataFieldBoolean::SetAsInteger(int Value) { if (GetAsInteger() != Value) { SetAsBoolean(!(Value == 0)); } }
bool FundamentalValue::Equals(const Value* other) const { if(other->GetType() != GetType()) { return false; } switch(GetType()) { case TYPE_BOOLEAN: { bool lhs, rhs; return GetAsBoolean(&lhs) && other->GetAsBoolean(&rhs) && lhs==rhs; } case TYPE_INTEGER: { int lhs, rhs; return GetAsInteger(&lhs) && other->GetAsInteger(&rhs) && lhs==rhs; } case TYPE_DOUBLE: { double lhs, rhs; return GetAsDouble(&lhs) && other->GetAsDouble(&rhs) && lhs==rhs; } default: NOTREACHED(); return false; } }
ComboList DataFieldBoolean::CreateComboList(const TCHAR *reference) const { ComboList combo_list; combo_list.Append(false, false_text); combo_list.Append(true, true_text); combo_list.current_index = GetAsInteger(); return combo_list; }
ComboList * DataFieldBoolean::CreateComboList() const { ComboList *combo_list = new ComboList(); combo_list->Append(0, 0, mTextFalse, mTextFalse); combo_list->Append(1, 1, mTextTrue, mTextTrue); combo_list->ComboPopupItemSavedIndex = GetAsInteger(); return combo_list; }
ComboList * DataFieldBoolean::CreateComboList() const { ComboList *combo_list = new ComboList(); combo_list->Append(false, false_text); combo_list->Append(true, true_text); combo_list->ComboPopupItemSavedIndex = GetAsInteger(); return combo_list; }
int DataFieldFloat::SetAsInteger(int Value){ int res = GetAsInteger(); SetAsFloat(Value); return(res); }