Work toward RPC send.

This commit is contained in:
Arthur Britto
2012-05-20 22:59:13 -07:00
parent dfd218c079
commit 98ade9985e
9 changed files with 108 additions and 70 deletions

View File

@@ -564,6 +564,16 @@ void STObject::setValueFieldAmount(SOE_Field field, const STAmount &v)
(*cf) = v;
}
void STObject::setValueFieldPath(SOE_Field field, const STPath &v)
{
SerializedType* rf = getPField(field);
if (!rf) throw std::runtime_error("Field not found");
if (rf->getSType() == STI_NOTPRESENT) rf = makeFieldPresent(field);
STPath* cf = dynamic_cast<STPath*>(rf);
if (!cf) throw std::runtime_error("Wrong field type");
(*cf) = v;
}
Json::Value STObject::getJson(int options) const
{
Json::Value ret(Json::objectValue);