// This file was generated by $generator from $template

#pragma once

#include "$prefixDevice.h"

#include <vector>

$begin_namespaces

template<>
class Object<Array1D> : public DefaultObject<Array1D, ArrayObjectBase> {
public:
   const void* appMemory;
   ANARIMemoryDeleter deleter;
   const void* userdata;
   ANARIDataType elementType;
   uint64_t numItems1;
   uint64_t byteStride1;

   std::vector<ANARIObject> objectArray;

   Object(ANARIDevice d, ANARIObject handle, const void* appMemory,
      ANARIMemoryDeleter deleter, const void* userdata, ANARIDataType type,
      uint64_t numItems1, uint64_t byteStride1);

   void* map() override;
   void unmap() override;
   void releasePublic() override;
   const std::vector<ANARIObject>& objects() { return objectArray; }
   ~Object();
};

template<>
class Object<Array2D> : public DefaultObject<Array2D, ArrayObjectBase> {
public:
   const void* appMemory;
   ANARIMemoryDeleter deleter;
   const void* userdata;
   ANARIDataType elementType;
   uint64_t numItems1;
   uint64_t numItems2;
   uint64_t byteStride1;
   uint64_t byteStride2;

   Object(ANARIDevice d, ANARIObject handle, const void* appMemory,
      ANARIMemoryDeleter deleter, const void* userdata, ANARIDataType type,
      uint64_t numItems1, uint64_t numItems2,
      uint64_t byteStride1, uint64_t byteStride2);

   void* map() override;
   void unmap() override;
   void releasePublic() override;
   ~Object();
};

template<>
class Object<Array3D> : public DefaultObject<Array3D, ArrayObjectBase> {
public:
   const void* appMemory;
   ANARIMemoryDeleter deleter;
   const void* userdata;
   ANARIDataType elementType;
   uint64_t numItems1;
   uint64_t numItems2;
   uint64_t numItems3;
   uint64_t byteStride1;
   uint64_t byteStride2;
   uint64_t byteStride3;

   Object(ANARIDevice d, ANARIObject handle, const void* appMemory,
      ANARIMemoryDeleter deleter, const void* userdata, ANARIDataType type,
      uint64_t numItems1, uint64_t numItems2, uint64_t numItems3,
      uint64_t byteStride1, uint64_t byteStride2, uint64_t byteStride3);

   void* map() override;
   void unmap() override;
   void releasePublic() override;
   ~Object();
};

$end_namespaces
