fixbug
This commit is contained in:
@@ -112,6 +112,9 @@ namespace robot_xmlrpcpp {
|
|||||||
//! Check for the existence of a struct member by name.
|
//! Check for the existence of a struct member by name.
|
||||||
bool hasMember(const std::string& name) const;
|
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.
|
//! Decode xml. Destroys any existing value.
|
||||||
bool fromXml(std::string const& valueXml, int* offset);
|
bool fromXml(std::string const& valueXml, int* offset);
|
||||||
|
|
||||||
|
|||||||
@@ -209,6 +209,13 @@ namespace robot_xmlrpcpp {
|
|||||||
return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end();
|
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
|
// Set the value from xml. The chars at *offset into valueXml
|
||||||
// should be the start of a <value> tag. Destroys any existing value.
|
// should be the start of a <value> tag. Destroys any existing value.
|
||||||
bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset)
|
bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset)
|
||||||
|
|||||||
Reference in New Issue
Block a user