Convert hfm::Serializer to use hifi-namespaced types

This commit is contained in:
sabrina-shanman 2018-11-12 14:33:16 -08:00
parent 5b6e2aae5a
commit 93c7578f54
2 changed files with 27 additions and 4 deletions

View file

@ -12,16 +12,14 @@
#ifndef hifi_HFMSerializer_h
#define hifi_HFMSerializer_h
#include <QVarLengthArray>
#include <QVariant>
#include <QUrl>
#include <shared/HifiTypes.h>
#include "HFM.h"
namespace hfm {
class Serializer {
virtual Model::Pointer read(const QByteArray& data, const QVariantHash& mapping, const QUrl& url = QUrl()) = 0;
virtual Model::Pointer read(const hifi::ByteArray& data, const hifi::VariantHash& mapping, const hifi::URL& url = hifi::URL()) = 0;
};
};

View file

@ -0,0 +1,25 @@
//
// HifiTypes.h
// libraries/shared/src/shared
//
// Created by Sabrina Shanman on 2018/11/12.
// Copyright 2018 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi_HifiTypes_h
#define hifi_HifiTypes_h
#include <QVarLengthArray>
#include <QVariant>
#include <QUrl>
namespace hifi {
using ByteArray = QByteArray;
using VariantHash = QVariantHash;
using URL = QUrl;
};
#endif // hifi_HifiTypes_h