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

Function open_report_output

src/lasvalidate.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static void open_report_output(const LASwriteOpener& laswriteopener, FILE*& file_out, ValidateWriter*& writer, BOOL is_csv, BOOL consol_out) {
103 if (consol_out == FALSE) {
104 // open the text output file
105 file_out = LASfopen(laswriteopener.get_file_name(), "w");
106
107 if (file_out == nullptr) {
108 LASMessage(LAS_WARNING, "could not open output text file '%s'", laswriteopener.get_file_name());
109 file_out = stderr;
110 }
111 }
112
113 // output logging
114
115 writer = FormatWriterFactory::createWriter(laswriteopener.get_format(), file_out);
116
117 if (writer == nullptr) {
118 LASMessage(LAS_ERROR, "could not create writer to create validation report");
119 return;
120 }
121
122 if (file_out != nullptr && !is_csv) writer->open("LASvalidator");
123}
124
125static double taketime() {
126 return (double)(clock())/CLOCKS_PER_SEC;

Callers 1

mainFunction · 0.85

Calls 5

LASfopenFunction · 0.85
LASMessageFunction · 0.85
get_file_nameMethod · 0.45
get_formatMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected