/*
 * This file defines the atc_slice C struct and the supporting atc_reduction C enum.
 * Furthermore, two slice-related constants, ATC_SLICE_UNDEFINED and ATC_SLICE_DEFAULT are also declared here.
 */

#pragma once

#include <stdint.h>
#include <stddef.h>

/// C equivalent of `atc::Reduction`.
typedef enum {ATC_DOWNSAMPLING = 0, ATC_BOX = 1, ATC_LANCZOS = 2} atc_reduction;

/**
 * C equivalent of `atc::Slice`.
 * If ``description`` is `NULL`, the ``atc::Slice`` object will be constructed from the parameters ``start``, ``stop``, ``step`` and ``reduction``.
 * Otherwise, it will be constructed from the ``description`` string.
 */
typedef struct atc_slice {
	int64_t start;
	int64_t stop;
	int64_t step;
	atc_reduction reduction;
	char* description;
} atc_slice;

#ifdef __cplusplus
extern "C" {
#endif
	
	/// C equivalent of `atc::Slice::UNDEFINED`.
	extern const int64_t ATC_SLICE_UNDEFINED;
	/// Constant which serves as a prototype for new `atc_slice` structs, with all fields initialized to the default values corresponding to those of a default `atc::Slice` object.
	extern const atc_slice ATC_SLICE_DEFAULT;
	
#ifdef __cplusplus
}
#endif
