Variant StructTypeTemplate::attributeValue(const ObjectType &type, ObjectTypeTemplate::Attribute attribute) const
{
    if (attribute == ObjectTypeTemplate::Attribute::name) {
        return type.parameterValue(0);
    } else {
        return Variant();
    }
}
int64_t StructTypeTemplate::fixedSize(const ObjectType &type) const
{
    int s = 0;
    for (int i = 1; i < type.numberOfParameters(); i += 2) {
        int t = type.parameterValue(i).toObjectType().fixedSize();
        if (t != -1) {
            s += t;
        } else {
            return -1;
        }
    }
    return s;
}