#ifndef GENERICITERATOR_H
#define GENERICITERATOR_H

#include "amcv.h"
#include "amiv.h"

typedef struct GenericIterator
{
  void* (*item)(struct GenericIterator* it);
  void (*next)(struct GenericIterator* it);
  bool (*isValid)(struct GenericIterator* it);
  void (*reset)(struct GenericIterator* it);
} GenericIterator;

typedef struct IvecArrayIterator
{
  GenericIterator genericIterator;
  ivec** ivecs;
  int numIvecs;
  int ivecNum;
} IvecArrayIterator;

typedef struct CVecArrayIterator
{
  GenericIterator genericIterator;
  cvec** cvecs;
  int numCvecs;
  int cvecNum;
} CvecArrayIterator;

void setGenericIteratorToIvecArrayIterator
(GenericIterator* genIt);

void setGenericIteratorToCvecArrayIterator
(GenericIterator* genIt);

#endif
