MCPcopy Create free account
hub / github.com/cutdigital/mcut / mcCreateUserEvent

Function mcCreateUserEvent

source/mcut.cpp:286–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286MCAPI_ATTR McResult MCAPI_CALL mcCreateUserEvent(
287 McEvent* event,
288 McContext context)
289{
290 McResult return_value = McResult::MC_NO_ERROR;
291 per_thread_api_log_str.clear();
292
293 if (event == nullptr) {
294 per_thread_api_log_str = "event ptr (param0) undef (NULL)";
295 } else if (context == nullptr) {
296 per_thread_api_log_str = "context handle undefined (NULL)";
297 } else {
298 try {
299 create_user_event_impl(event, context);
300 }
301 CATCH_POSSIBLE_EXCEPTIONS(per_thread_api_log_str);
302 }
303
304 if (!per_thread_api_log_str.empty()) {
305 std::fprintf(stderr, "%s(...) -> %s\n", __FUNCTION__, per_thread_api_log_str.c_str());
306 if (return_value == McResult::MC_NO_ERROR) // i.e. problem with basic local parameter checks
307 {
308 return_value = McResult::MC_INVALID_VALUE;
309 }
310 }
311
312 return return_value;
313}
314
315MCAPI_ATTR McResult MCAPI_CALL mcSetUserEventStatus(
316 McEvent event,

Callers 1

UTEST_FFunction · 0.85

Calls 2

create_user_event_implFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected