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

Function las_default_message_handler

LASzip/src/lasmessage.cpp:259–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void las_default_message_handler(LAS_MESSAGE_TYPE type, const char* msg, void* user_data) {
260 std::string prefix;
261 std::string message(msg);
262 switch (type) {
263 case LAS_DEBUG:
264 // prefix = ""; //add possible prefix
265 break;
266 case LAS_VERY_VERBOSE:
267 // prefix = ""; //add possible prefix
268 break;
269 case LAS_VERBOSE:
270 // prefix = ""; //add possible prefix
271 break;
272 case LAS_INFO:
273 // prefix = ""; //add possible prefix
274 break;
275 case LAS_WARNING:
276 prefix = "WARNING: ";
277 break;
278 case LAS_SERIOUS_WARNING:
279 prefix = "SERIOUS WARNING: ";
280 break;
281 case LAS_ERROR:
282 prefix = "ERROR: ";
283 break;
284 case LAS_FATAL_ERROR:
285 prefix = "FATAL ERROR: ";
286 break;
287 case LAS_QUIET:
288 break;
289 }
290
291 if (!prefix.empty()) {
292 format_message(message, (unsigned)prefix.size());
293 fprintf(stderr, "%s", prefix.c_str());
294 fprintf(stderr, "%s", message.c_str());
295 } else {
296 fprintf(stderr, "%s\n", message.c_str());
297 }
298}
299
300LASMessageStream& LASMessageStream::operator<<(std::ostream& (*func)(std::ostream&)) {
301 usedStream << func;

Callers

nothing calls this directly

Calls 3

format_messageFunction · 0.85
emptyMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected