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

#include "CesiumGltf/BufferView.h"
#include "CesiumGltf/ReaderContext.h"
#include "CesiumJsonReader/IntegerJsonHandler.h"
#include "NamedObjectJsonHandler.h"

namespace CesiumGltf {
struct ReaderContext;
struct BufferView;

class BufferViewJsonHandler : public NamedObjectJsonHandler {
public:
  using ValueType = BufferView;

  BufferViewJsonHandler(const ReaderContext& context) noexcept;
  void reset(IJsonHandler* pParentHandler, BufferView* pObject);

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

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

private:
  BufferView* _pObject = nullptr;
  CesiumJsonReader::IntegerJsonHandler<int32_t> _buffer;
  CesiumJsonReader::IntegerJsonHandler<int64_t> _byteOffset;
  CesiumJsonReader::IntegerJsonHandler<int64_t> _byteLength;
  CesiumJsonReader::IntegerJsonHandler<int64_t> _byteStride;
  CesiumJsonReader::IntegerJsonHandler<BufferView::Target> _target;
};
} // namespace CesiumGltf
