diff -dprU 3 uppsrc/ide/Debuggers.old/MIValue.h uppsrc/ide/Debuggers/MIValue.h --- uppsrc/ide/Debuggers.old/MIValue.h Fri Aug 31 18:09:59 2012 +++ uppsrc/ide/Debuggers/MIValue.h Fri Jan 31 18:58:52 2014 @@ -7,7 +7,7 @@ using namespace Upp; // this struct contains values returned by GDB MI interface typedef enum { MIString, MIArray, MITuple } MIValueType; -class MIValue : public Moveable +class MIValue : public MoveableAndDeepCopyOption { private: int ParsePair(String &name, MIValue &val, String const &s, int i = 0); @@ -34,11 +34,12 @@ class MIValue : public Moveable // check for emptyness bool IsEmpty(void) const; + MIValue &Set(String const &s) { Parse(s); return *this; } MIValue &operator=(pick_ MIValue &v); - MIValue &operator=(String const &s); - MIValue(); + MIValue() { Clear(); } MIValue(MIValue pick_ &v); - MIValue(String const &s); + MIValue(const MIValue &v, int); + explicit MIValue(String const &s) { Parse(s); } void Clear(void); diff -dprU 3 uppsrc/ide/Debuggers.old/MIValue.cpp uppsrc/ide/Debuggers/MIValue.cpp --- uppsrc/ide/Debuggers.old/MIValue.cpp Fri Aug 31 18:09:59 2012 +++ uppsrc/ide/Debuggers/MIValue.cpp Fri Jan 31 18:56:52 2014 @@ -194,14 +194,8 @@ MIValue &MIValue::operator=(pick_ MIValu return *this; } -MIValue::MIValue() -{ - Clear(); -} - MIValue::MIValue(MIValue pick_ &v) { - Clear(); type = v.type; switch(type) { @@ -219,15 +213,23 @@ MIValue::MIValue(MIValue pick_ &v) } } -MIValue::MIValue(String const &s) -{ - Parse(s); -} - -MIValue &MIValue::operator=(String const &s) +MIValue::MIValue(const MIValue &v, int) { - Parse(s); - return *this; + type = v.type; + switch(type) + { + case MIString: + string <<= v.string; + break; + case MIArray: + array <<= v.array; + break; + case MITuple: + tuple <<= v.tuple; + break; + default: + SetError("Unknown MIValue type"); + } } void MIValue::Clear()