1 #ifndef OSMSCOUT_FILESCANNER_H 2 #define OSMSCOUT_FILESCANNER_H 30 #include <osmscout/CoreFeatures.h> 76 mutable bool hasError;
85 size_t byteBufferSize;
88 #if defined(__WIN32__) || defined(WIN32) 93 void AssureByteBufferSize(
size_t size);
108 char* ReadInternal(
size_t bytes);
121 GeoCoord CreateCoord(
const uint32_t &latDat,
122 const uint32_t &lonDat)
128 throw IOException(filename,
"Cannot read coordinate",
"Coordinate is not normalised");
147 void SetCoord(
const uint32_t &latDat,
148 const uint32_t &lonDat,
155 throw IOException(filename,
"Cannot read coordinate",
"Coordinate is not normalised");
173 bool ConvertBool(
const char &value)
176 if (value != 0 && value != 1){
178 throw IOException(filename,
"Cannot read bool",
"Bool value is not normalised");
188 void Open(
const std::string& filename,
192 void CloseFailsafe();
196 return file!=
nullptr;
203 return file==
nullptr || hasError;
206 std::string GetFilename()
const;
212 void Read(
char* buffer,
size_t bytes);
214 std::string ReadString();
224 uint16_t ReadUInt16();
225 uint32_t ReadUInt32();
226 uint64_t ReadUInt64();
228 uint16_t Read(
size_t bytes);
229 uint32_t ReadUInt32(
size_t bytes);
230 uint64_t ReadUInt64(
size_t bytes);
232 ObjectFileRef ReadObjectFileRef();
239 int16_t ReadInt16Number();
240 int32_t ReadInt32Number();
241 int64_t ReadInt64Number();
243 uint16_t ReadUInt16Number();
244 uint32_t ReadUInt32Number();
245 uint64_t ReadUInt64Number();
247 GeoCoord ReadCoord();
248 std::tuple<GeoCoord,bool> ReadConditionalCoord();
258 void Read(std::vector<Point>& nodes,
259 std::vector<SegmentGeoBox> &segments,
265 TypeId ReadTypeId(uint8_t maxBytes);
267 std::vector<ObjectFileRef> ReadObjectFileRefs(
size_t count);
284 void Read(ObjectFileRef& ref);
constexpr uint32_t maxRawCoordValue
Definition: GeoCoord.h:56
Mode
Definition: FileScanner.h:65
Definition: FileScanner.h:67
uint16_t TypeId
Definition: OSMScoutTypes.h:53
Definition: Exception.h:72
#define CLASS_FINAL
Definition: Compiler.h:26
#define OSMSCOUT_API
Definition: CoreImportExport.h:45
OSMSCOUT_API const double latConversionFactor
bool IsOpen() const
Definition: FileScanner.h:194
OSMSCOUT_API const double lonConversionFactor
Definition: FileScanner.h:69
uint64_t FileOffset
Definition: OSMScoutTypes.h:47
Definition: FileScanner.h:68
Definition: FileScanner.h:273
bool HasError() const
Definition: FileScanner.h:201