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

#include "$prefixDeviceObject.h"
#include "$prefixSpecializations.h"

#include <cstdlib>
#include <cstring>
#include <cstdint>

$begin_namespaces

Object<Device>::Object(ANARIDevice d, ANARIObject handle)
    : DefaultObject(d, handle)
{}

int Object<Device>::getProperty(const char *propname,
  ANARIDataType type,
  void *mem,
  uint64_t size,
  ANARIWaitMask mask)
{
  if(type == ANARI_INT32 && size >= sizeof(int32_t) && std::strncmp("version", propname, 7) == 0) {
    int32_t version = 0; // use actual version number
    std::memcpy(mem, &version, sizeof(version));
    return 1;
  } else if(type == ANARI_UINT64 && size >= sizeof(uint64_t) && std::strncmp("geometryMaxIndex", propname, 16) == 0) {
    uint64_t geometryMaxIndex = INT32_MAX; // use actual value
    std::memcpy(mem, &geometryMaxIndex, sizeof(geometryMaxIndex));
    return 1;
  } else {
    return 0;
  }
}


$end_namespaces
