blob: fcdea15c014242e197c0cd696335317093d861cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
// Copyright (C) 1999-2018
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"
#ifndef __fitsmapincr_h__
#define __fitsmapincr_h__
#include "file.h"
class FitsMapIncr : public FitsFile {
protected:
char* mapdata_; // mmap segment ptr
size_t mapsize_; // mmap segment size
int page_; // flag to indicate paging mode
size_t filesize_; // size of the total segment
size_t seek_; // offset into segment
size_t dseek_; // offset to data segment
size_t nseek_; // offset into next page data segment
FitsHead* headRead();
void dataSkip(size_t);
void dataSkipBlock(size_t);
void found();
void error();
public:
FitsMapIncr();
virtual ~FitsMapIncr();
char* page(char*, size_t);
void resetpage();
size_t filesize() {return filesize_;}
size_t seek() {return seek_;}
};
class FitsFitsMapIncr : public virtual FitsMapIncr {
protected:
void processExact();
void processRelax();
public:
FitsFitsMapIncr(ScanMode);
};
class FitsFitsNextMapIncr : public FitsMapIncr {
public:
FitsFitsNextMapIncr(FitsFile* prev);
};
class FitsArrMapIncr : public virtual FitsMapIncr {
public:
FitsArrMapIncr();
};
class FitsMosaicMapIncr : public virtual FitsMapIncr {
public:
FitsMosaicMapIncr();
};
class FitsMosaicNextMapIncr : public FitsMapIncr {
public:
FitsMosaicNextMapIncr(FitsFile* prev);
};
#endif
|