00001
#ifndef _PEAK_GROUP_ITERATOR_H_
00002
#define _PEAK_GROUP_ITERATOR_H_
00003
00004
#include "fpeakformat.h"
00005
00006
typedef struct
00007
{
00008
unsigned int state: 2;
00009
00010 FPeakFormat fformat;
00011 FILE *pFile;
00012 fpos_t datastart;
00013 fpos_t curr_pos;
00014
00015
int curve;
00016
00017 } PEAK_GROUP_ITERATOR;
00018
00019
typedef PEAK_GROUP_ITERATOR PeakGroupIterator;
00020
00021
00022
00023
00024
#define HEADER_FOUND 0x01
00025
#define DATA_FOUND 0x0E
00026
#define MEMORY_ALLOCATED 0x02
00027
#define MEMORY_NOT_ALLOCATED 0x0D
00028
00029
#ifndef HEADER_START
00030
#define HEADER_START "PEAK_GROUP"
00031
#else
00032
#undef HEADER_START
00033
#define HEADER_START "PEAK_GROUP"
00034
#endif
00035
00036
void PeakGroupIterator_init(PeakGroupIterator* iter);
00037
00038
00039
int PeakGroupIterator_loadHeader(PeakGroupIterator* iter, PeakGroupFile* header);
00040
int PeakGroupIterator_getNextPeakGroup(PeakGroupIterator* iter,
00041
PeakGroup* peakgroup,
00042
FPeak2i* array);
00043
00044
int PeakGroupIterator_getNextPeakGroupMultiple(PeakGroupIterator* iter,
00045
PeakGroup* peakgroup,
00046
FPeak2i* array1,
00047 Map2DPosition* array2);
00048
00049
00050
int PeakGroupIterator_loadHeader2(PeakGroupIterator* iter, PeakGroupFile* header);
00051
int PeakGroupIterator_getNextPeakGroup2(PeakGroupIterator* iter,
00052
PeakGroup* peakgroup,
00053
FPeak2i* array1,
00054 Map2DPosition* array2);
00055
#endif
00056
00057
00058
00059