New serializer work.

Rework add/addRaw/addData per discussion with Arthur.
New STObject add/deserialize code.
STArray add/deserialize code.
Allow arrays of normal fields.
Other small fixes.
This commit is contained in:
JoelKatz
2012-09-27 15:43:29 -07:00
parent 5d0adc449b
commit b6653732b0
6 changed files with 132 additions and 56 deletions

View File

@@ -202,7 +202,7 @@ STVector256* STVector256::construct(SerializerIterator& u, SField::ref name)
return new STVector256(name, value);
}
void STVector256::addData(Serializer& s) const
void STVector256::add(Serializer& s) const
{
s.addVL(mValue.empty() ? NULL : mValue[0].begin(), mValue.size() * (256 / 8));
}
@@ -427,7 +427,7 @@ std::string STPathSet::getText() const
}
#endif
void STPathSet::addData(Serializer& s) const
void STPathSet::add(Serializer& s) const
{
bool bFirst = true;