Compare commits

...

1 Commits

Author SHA1 Message Date
40718158ae fixbug 2026-03-22 17:18:19 +07:00
2 changed files with 10 additions and 0 deletions

View File

@@ -112,6 +112,9 @@ namespace robot_xmlrpcpp {
//! Check for the existence of a struct member by name.
bool hasMember(const std::string& name) const;
//! If this value is a struct, returns pointer to its members; otherwise nullptr.
const ValueStruct *getStructMembers() const;
//! Decode xml. Destroys any existing value.
bool fromXml(std::string const& valueXml, int* offset);

View File

@@ -209,6 +209,13 @@ namespace robot_xmlrpcpp {
return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end();
}
const XmlRpcValue::ValueStruct *XmlRpcValue::getStructMembers() const
{
if (_type != TypeStruct)
return nullptr;
return _value.asStruct;
}
// Set the value from xml. The chars at *offset into valueXml
// should be the start of a <value> tag. Destroys any existing value.
bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset)