Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2008, 1:17:33 AM (16 years ago)
Author:
landauf
Message:

after some changes in MultiTypeMath and co., the new config and tconfig commands work very well. they substitute set and tset respectively.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/util/MultiTypeString.cc

    r1320 r1435  
    3333MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type)
    3434{
    35     // Nothing to do for string and xml-element
     35    // Nothing to do for string
    3636}
    3737
     
    4949}
    5050
     51bool MultiTypeString::operator==(const MultiTypePrimitive& mtp) const
     52{
     53    return MultiTypePrimitive::operator==(mtp);
     54}
     55
    5156bool MultiTypeString::operator!=(const MultiTypeString& mts) const
    5257{
     
    6065
    6166    return true;
     67}
     68
     69bool MultiTypeString::operator!=(const MultiTypePrimitive& mtp) const
     70{
     71    return MultiTypePrimitive::operator!=(mtp);
    6272}
    6373
     
    97107    MultiTypePrimitive::setValue(mts);
    98108    this->string_ = mts.string_;
     109}
     110
     111void MultiTypeString::setValue(const MultiTypePrimitive& mtp)
     112{
     113    MultiTypePrimitive::setValue(mtp);
    99114}
    100115
     
    138153bool MultiTypeString::assimilate(const MultiTypeString& mts, const MultiTypeString& defvalue)
    139154{
    140     if (this->type_ == MT_constchar)
     155    if (this->type_ == MT_void)
     156        return ConvertValue(&this->value_.void_, mts, defvalue.value_.void_);
     157    else if (this->type_ == MT_int)
     158        return ConvertValue(&this->value_.int_, mts, defvalue.value_.int_);
     159    else if (this->type_ == MT_uint)
     160        return ConvertValue(&this->value_.uint_, mts, defvalue.value_.uint_);
     161    else if (this->type_ == MT_char)
     162        return ConvertValue(&this->value_.char_, mts, defvalue.value_.char_);
     163    else if (this->type_ == MT_uchar)
     164        return ConvertValue(&this->value_.uchar_, mts, defvalue.value_.uchar_);
     165    else if (this->type_ == MT_short)
     166        return ConvertValue(&this->value_.short_, mts, defvalue.value_.short_);
     167    else if (this->type_ == MT_ushort)
     168        return ConvertValue(&this->value_.ushort_, mts, defvalue.value_.ushort_);
     169    else if (this->type_ == MT_long)
     170        return ConvertValue(&this->value_.long_, mts, defvalue.value_.long_);
     171    else if (this->type_ == MT_ulong)
     172        return ConvertValue(&this->value_.ulong_, mts, defvalue.value_.ulong_);
     173    else if (this->type_ == MT_float)
     174        return ConvertValue(&this->value_.float_, mts, defvalue.value_.float_);
     175    else if (this->type_ == MT_double)
     176        return ConvertValue(&this->value_.double_, mts, defvalue.value_.double_);
     177    else if (this->type_ == MT_longdouble)
     178        return ConvertValue(&this->value_.longdouble_, mts, defvalue.value_.longdouble_);
     179    else if (this->type_ == MT_bool)
     180        return ConvertValue(&this->value_.bool_, mts, defvalue.value_.bool_);
     181    else if (this->type_ == MT_constchar)
    141182        return ConvertValue(&this->string_, mts, defvalue.string_);
    142183    else if (this->type_ == MT_string)
    143184        return ConvertValue(&this->string_, mts, defvalue.string_);
    144185    else
    145         return MultiTypePrimitive::assimilate(mts, defvalue);
     186        return false;
    146187}
    147188
Note: See TracChangeset for help on using the changeset viewer.