Add SerializedObject and SerializedTransaction support for STPathSet.

This commit is contained in:
Arthur Britto
2012-06-17 15:14:00 -07:00
parent 291951b031
commit 616af57654
3 changed files with 13 additions and 0 deletions

View File

@@ -485,6 +485,17 @@ STAmount STObject::getValueFieldAmount(SOE_Field field) const
return *cf;
}
STPathSet STObject::getValueFieldPathSet(SOE_Field field) const
{
const SerializedType* rf = peekAtPField(field);
if (!rf) throw std::runtime_error("Field not found");
SerializedTypeID id = rf->getSType();
if (id == STI_NOTPRESENT) return STPathSet(); // optional field not present
const STPathSet *cf = dynamic_cast<const STPathSet *>(rf);
if (!cf) throw std::runtime_error("Wrong field type");
return *cf;
}
STVector256 STObject::getValueFieldV256(SOE_Field field) const
{
const SerializedType* rf = peekAtPField(field);