1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-03 16:09:08 +01:00
GPXSee/src/map/IMG/netfile.h

50 lines
1.4 KiB
C
Raw Normal View History

2021-04-10 15:27:40 +02:00
#ifndef IMG_NETFILE_H
#define IMG_NETFILE_H
2019-05-10 18:56:19 +02:00
#include "subfile.h"
#include "nodfile.h"
2021-04-10 15:27:40 +02:00
namespace IMG {
class LBLFile;
class RGNFile;
class SubDiv;
class HuffmanTable;
2019-05-10 18:56:19 +02:00
class NETFile : public SubFile
{
public:
2021-04-10 15:27:40 +02:00
NETFile(const IMGData *img) : SubFile(img), _huffmanTable(0), _tp(0),
_offset(0), _size(0), _linksOffset(0), _linksSize(0), _shift(0),
_linksShift(0) {}
NETFile(const QString *path) : SubFile(path), _huffmanTable(0), _tp(0),
2020-09-18 20:56:00 +02:00
_offset(0), _size(0), _linksOffset(0), _linksSize(0), _shift(0),
_linksShift(0) {}
NETFile(const SubFile *gmp, quint32 offset) : SubFile(gmp, offset),
_huffmanTable(0), _tp(0), _offset(0), _size(0), _linksOffset(0),
_linksSize(0), _shift(0), _linksShift(0) {}
~NETFile();
bool load(Handle &hdl, const RGNFile *rgn, Handle &rgnHdl);
void clear();
2019-05-10 18:56:19 +02:00
bool lblOffset(Handle &hdl, quint32 netOffset, quint32 &lblOffset) const;
bool link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
const NODFile *nod, Handle &nodHdl, const LBLFile *lbl, Handle &lblHdl,
2020-10-21 21:21:35 +02:00
const NODFile::BlockInfo &blockInfo, quint8 linkId, quint8 lineId,
QList<MapData::Poly> *lines) const;
2019-05-10 18:56:19 +02:00
private:
bool linkLabel(Handle &hdl, quint32 offset, quint32 size,
const LBLFile *lbl, Handle &lblHdl, Label &label) const;
2019-05-10 18:56:19 +02:00
HuffmanTable *_huffmanTable;
const HuffmanTable *_tp;
quint32 _offset, _size, _linksOffset, _linksSize;
2020-09-18 20:56:00 +02:00
quint8 _shift, _linksShift;
2019-05-10 18:56:19 +02:00
};
2021-04-10 15:27:40 +02:00
}
#endif // IMG_NETFILE_H