MCPcopy Create free account
hub / github.com/LAStools/LAStools / open

Method open

LASzip/src/laszipper.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#include "laswritepoint.hpp"
39
40bool LASzipper::open(FILE* outfile, const LASzip* laszip)
41{
42 if (!outfile) return return_error("FILE* outfile pointer is NULL");
43 if (!laszip) return return_error("const LASzip* laszip pointer is NULL");
44 count = 0;
45 if (writer) delete writer;
46 writer = new LASwritePoint();
47 if (!writer) return return_error("alloc of LASwritePoint failed");
48 if (!writer->setup(laszip->num_items, laszip->items, laszip)) return return_error("setup() of LASwritePoint failed");
49 if (stream) delete stream;
50 if (IS_LITTLE_ENDIAN())
51 stream = new ByteStreamOutFileLE(outfile);
52 else
53 stream = new ByteStreamOutFileBE(outfile);
54 if (!stream) return return_error("alloc of ByteStreamOutFile failed");
55 if (!writer->init(stream)) return return_error("init() of LASwritePoint failed");
56 return true;
57}
58
59bool LASzipper::open(ostream& outstream, const LASzip* laszip)
60{

Callers 5

OStreamMethod · 0.45
IStreamMethod · 0.45
make_zipperFunction · 0.45
make_unzipperFunction · 0.45
appendMethod · 0.45

Calls 2

setupMethod · 0.45
initMethod · 0.45

Tested by 4

OStreamMethod · 0.36
IStreamMethod · 0.36
make_zipperFunction · 0.36
make_unzipperFunction · 0.36