// This file was generated by generate-gltf-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include "CesiumGltf/ReaderContext.h"
#include "CesiumJsonReader/ArrayJsonHandler.h"
#include "CesiumJsonReader/DoubleJsonHandler.h"
#include "MeshPrimitiveJsonHandler.h"
#include "NamedObjectJsonHandler.h"

namespace CesiumGltf {
struct ReaderContext;
struct Mesh;

class MeshJsonHandler : public NamedObjectJsonHandler {
public:
  using ValueType = Mesh;

  MeshJsonHandler(const ReaderContext& context) noexcept;
  void reset(IJsonHandler* pParentHandler, Mesh* pObject);

  virtual IJsonHandler* readObjectKey(const std::string_view& str) override;

protected:
  IJsonHandler* readObjectKeyMesh(
      const std::string& objectType,
      const std::string_view& str,
      Mesh& o);

private:
  Mesh* _pObject = nullptr;
  CesiumJsonReader::ArrayJsonHandler<MeshPrimitive, MeshPrimitiveJsonHandler>
      _primitives;
  CesiumJsonReader::
      ArrayJsonHandler<double, CesiumJsonReader::DoubleJsonHandler>
          _weights;
};
} // namespace CesiumGltf
