31#include "moo_masklist.h"
58 return (moo_masklist *)cpl_calloc(1,
sizeof(moo_masklist));
73 cpl_ensure(size > 0, CPL_ERROR_NULL_INPUT, NULL);
77 res->list = cpl_calloc(size,
sizeof(moo_mask));
79 for (i = 0; i < size; i++) {
100 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, -1);
102 assert(self->size >= 0);
123 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
124 cpl_ensure(i >= 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
126 cpl_ensure(i < size, CPL_ERROR_ILLEGAL_INPUT, NULL);
128 return self->list[i];
152 cpl_ensure(self != NULL, CPL_ERROR_NULL_INPUT, NULL);
168 for (
int i = 0; i < self->size; i++) {
171 cpl_free(self->list);
enum _moo_detector_type_ moo_detector_type
The type code type.
cpl_mask * moo_mask_get(moo_mask *self, moo_detector_type type, int num)
Get the cpl_mask associated to given type,num.
void moo_mask_delete(moo_mask *self)
Delete a moo_mask.
moo_mask * moo_mask_new(void)
Create a new moo_mask
moo_mask * moo_masklist_get(moo_masklist *self, int i)
Get the MASK at the position i in the list.
cpl_mask * moo_masklist_get_mask(moo_masklist *self, int i, moo_detector_type type, int num)
Get the CPL_MASK at the position i,type,num in the list.
moo_masklist * moo_masklist_new(void)
Create a new moo_masklist
cpl_size moo_masklist_get_size(const moo_masklist *self)
Get the number of MASK in the masklist.
moo_masklist * moo_masklist_create(int size)
Create a new moo_masklist from the given MASK frameset.
void moo_masklist_delete(moo_masklist *self)
Free all memory used by a moo_masklist object including the MASK.