Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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;
}