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

Method open

LASlib/src/lasreader_ply.cpp:45–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43extern "C" FILE* fopen_compressed(const char* filename, const char* mode, bool* piped);
44
45BOOL LASreaderPLY::open(const CHAR* file_name, U8 point_type, BOOL populate_header)
46{
47 if (file_name == 0)
48 {
49 laserror("file name pointer is zero");
50 return FALSE;
51 }
52
53 FILE* file = fopen_compressed(file_name, "rb", &piped);
54 if (file == 0)
55 {
56 laserror("cannot open file '%s'", file_name);
57 return FALSE;
58 }
59
60 if (setvbuf(file, NULL, _IOFBF, 10*LAS_TOOLS_IO_IBUFFER_SIZE) != 0)
61 {
62 LASMessage(LAS_WARNING, "setvbuf() failed with buffer size %d", 10*LAS_TOOLS_IO_IBUFFER_SIZE);
63 }
64
65 return open(file, file_name, point_type, populate_header);
66}
67
68BOOL LASreaderPLY::open(FILE* file, const CHAR* file_name, U8 point_type, BOOL populate_header)
69{

Callers

nothing calls this directly

Calls 9

laserrorFunction · 0.85
fopen_compressedFunction · 0.85
LASMessageFunction · 0.85
parseFunction · 0.85
cleanFunction · 0.50
cleanMethod · 0.45
set_offsetMethod · 0.45
add_attributeMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected