bool Serializer::WriteVariantVector(const VariantVector& value) { bool success = true; success &= WriteVLE(value.Size()); for (VariantVector::ConstIterator i = value.Begin(); i != value.End(); ++i) success &= WriteVariant(*i); return success; }
bool Serializer::WriteBuffer(const PODVector<unsigned char>& value) { bool success = true; unsigned size = value.Size(); success &= WriteVLE(size); if (size) success &= Write(&value[0], size) == size; return success; }
bool Serializer::WriteVariantMap(const VariantMap& value) { bool success = true; success &= WriteVLE(value.Size()); for (VariantMap::ConstIterator i = value.Begin(); i != value.End(); ++i) { WriteStringHash(i->first_); WriteVariant(i->second_); } return success; }
bool Serializer::WriteResourceRefList(const ResourceRefList& value) { bool success = true; success &= WriteStringHash(value.type_); success &= WriteVLE(value.names_.Size()); for (unsigned i = 0; i < value.names_.Size(); ++i) success &= WriteString(value.names_[i]); return success; }