Changeset 1435 for code/branches/console/src/util/MultiTypeString.cc
- Timestamp:
- May 27, 2008, 1:17:33 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/util/MultiTypeString.cc
r1320 r1435 33 33 MultiTypeString::MultiTypeString(MultiType type) : MultiTypePrimitive(type) 34 34 { 35 // Nothing to do for string and xml-element35 // Nothing to do for string 36 36 } 37 37 … … 49 49 } 50 50 51 bool MultiTypeString::operator==(const MultiTypePrimitive& mtp) const 52 { 53 return MultiTypePrimitive::operator==(mtp); 54 } 55 51 56 bool MultiTypeString::operator!=(const MultiTypeString& mts) const 52 57 { … … 60 65 61 66 return true; 67 } 68 69 bool MultiTypeString::operator!=(const MultiTypePrimitive& mtp) const 70 { 71 return MultiTypePrimitive::operator!=(mtp); 62 72 } 63 73 … … 97 107 MultiTypePrimitive::setValue(mts); 98 108 this->string_ = mts.string_; 109 } 110 111 void MultiTypeString::setValue(const MultiTypePrimitive& mtp) 112 { 113 MultiTypePrimitive::setValue(mtp); 99 114 } 100 115 … … 138 153 bool MultiTypeString::assimilate(const MultiTypeString& mts, const MultiTypeString& defvalue) 139 154 { 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) 141 182 return ConvertValue(&this->string_, mts, defvalue.string_); 142 183 else if (this->type_ == MT_string) 143 184 return ConvertValue(&this->string_, mts, defvalue.string_); 144 185 else 145 return MultiTypePrimitive::assimilate(mts, defvalue);186 return false; 146 187 } 147 188
Note: See TracChangeset
for help on using the changeset viewer.