Lines Matching refs:_value
57 case TypeString: delete _value.asString; break; in invalidate()
58 case TypeDateTime: delete _value.asTime; break; in invalidate()
59 case TypeBase64: delete _value.asBinary; break; in invalidate()
60 case TypeArray: delete _value.asArray; break; in invalidate()
61 case TypeStruct: delete _value.asStruct; break; in invalidate()
65 _value.asBinary = 0; in invalidate()
76 case TypeString: _value.asString = new std::string(); break; in assertTypeOrInvalid()
77 case TypeDateTime: _value.asTime = new struct tm(); break; in assertTypeOrInvalid()
78 case TypeBase64: _value.asBinary = new BinaryData(); break; in assertTypeOrInvalid()
79 case TypeArray: _value.asArray = new ValueArray(); break; in assertTypeOrInvalid()
80 case TypeStruct: _value.asStruct = new ValueStruct(); break; in assertTypeOrInvalid()
81 default: _value.asBinary = 0; break; in assertTypeOrInvalid()
92 else if (int(_value.asArray->size()) < size) in assertArray()
101 _value.asArray = new ValueArray(size); in assertArray()
103 if (int(_value.asArray->size()) < size) in assertArray()
104 _value.asArray->resize(size); in assertArray()
113 _value.asStruct = new ValueStruct(); in assertStruct()
127 case TypeBoolean: _value.asBool = rhs._value.asBool; break; in operator =()
128 case TypeInt: _value.asInt = rhs._value.asInt; break; in operator =()
129 case TypeDouble: _value.asDouble = rhs._value.asDouble; break; in operator =()
130 case TypeDateTime: _value.asTime = new struct tm(*rhs._value.asTime); break; in operator =()
131 case TypeString: _value.asString = new std::string(*rhs._value.asString); break; in operator =()
132 case TypeBase64: _value.asBinary = new BinaryData(*rhs._value.asBinary); break; in operator =()
133 case TypeArray: _value.asArray = new ValueArray(*rhs._value.asArray); break; in operator =()
134 case TypeStruct: _value.asStruct = new ValueStruct(*rhs._value.asStruct); break; in operator =()
135 default: _value.asBinary = 0; break; in operator =()
155 case TypeBoolean: return ( !_value.asBool && !other._value.asBool) || in operator ==()
156 ( _value.asBool && other._value.asBool); in operator ==()
157 case TypeInt: return _value.asInt == other._value.asInt; in operator ==()
158 case TypeDouble: return _value.asDouble == other._value.asDouble; in operator ==()
159 case TypeDateTime: return tmEq(*_value.asTime, *other._value.asTime); in operator ==()
160 case TypeString: return *_value.asString == *other._value.asString; in operator ==()
161 case TypeBase64: return *_value.asBinary == *other._value.asBinary; in operator ==()
162 case TypeArray: return *_value.asArray == *other._value.asArray; in operator ==()
167 if (_value.asStruct->size() != other._value.asStruct->size()) in operator ==()
170 ValueStruct::const_iterator it1=_value.asStruct->begin(); in operator ==()
171 ValueStruct::const_iterator it2=other._value.asStruct->begin(); in operator ==()
172 while (it1 != _value.asStruct->end()) { in operator ==()
197 case TypeString: return int(_value.asString->size()); in size()
198 case TypeBase64: return int(_value.asBinary->size()); in size()
199 case TypeArray: return int(_value.asArray->size()); in size()
200 case TypeStruct: return int(_value.asStruct->size()); in size()
210 return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end(); in hasMember()
281 _value.asBinary = 0; in nilFromXml()
303 _value.asBool = (ivalue == 1); in boolFromXml()
312 xml += (_value.asBool ? "1" : "0"); in boolToXml()
328 _value.asInt = int(ivalue); in intFromXml()
336 snprintf(buf, sizeof(buf)-1, "%d", _value.asInt); in intToXml()
356 _value.asDouble = dvalue; in doubleFromXml()
364 snprintf(buf, sizeof(buf)-1, getDoubleFormat().c_str(), _value.asDouble); in doubleToXml()
383 …_value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset)… in stringFromXml()
384 *offset += int(_value.asString->length()); in stringFromXml()
392 xml += XmlRpcUtil::xmlEncode(*_value.asString); in stringToXml()
413 _value.asTime = new struct tm(t); in timeFromXml()
420 struct tm* t = _value.asTime; in timeToXml()
444 _value.asBinary = new BinaryData(); in binaryFromXml()
450 std::back_insert_iterator<BinaryData> ins = std::back_inserter(*(_value.asBinary)); in binaryFromXml()
465 encoder.put(_value.asBinary->begin(), _value.asBinary->end(), ins, iostatus, base64<>::crlf()); in binaryToXml()
484 _value.asArray = new ValueArray; in arrayFromXml()
487 _value.asArray->push_back(v); // copy... in arrayFromXml()
503 int s = int(_value.asArray->size()); in arrayToXml()
505 xml += _value.asArray->at(i).toXml(); in arrayToXml()
518 _value.asStruct = new ValueStruct; in structFromXml()
530 _value.asStruct->insert(p); in structFromXml()
546 for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { in structToXml()
566 case TypeBoolean: os << _value.asBool; break; in write()
567 case TypeInt: os << _value.asInt; break; in write()
568 case TypeDouble: os << _value.asDouble; break; in write()
569 case TypeString: os << *_value.asString; break; in write()
572 struct tm* t = _value.asTime; in write()
585 … encoder.put(_value.asBinary->begin(), _value.asBinary->end(), out, iostatus, base64<>::crlf()); in write()
590 int s = int(_value.asArray->size()); in write()
595 _value.asArray->at(i).write(os); in write()
604 for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) in write()
606 if (it!=_value.asStruct->begin()) os << ','; in write()