]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/globals.h
Mac OS changes and switched to c++11.
[evaf] / src / libs / Common / globals.h
index 55c3b40ff14fbe47de06a59c593cd160d4003db2..ca360505dae81e817e298928978212e0a0961134 100644 (file)
@@ -3,7 +3,7 @@
  * @brief Global constants and macros for eVaf
  * @author Enar Vaikene
  *
- * Copyright (c) 2011 Enar Vaikene
+ * Copyright (c) 2011-2019 Enar Vaikene
  *
  * This file is part of the eVaf C++ cross-platform application development framework.
  *
@@ -71,7 +71,7 @@ namespace eVaf {
 namespace Common {
 
 /**
- * eVaf common library initialized
+ * eVaf common library initializer
  * @return True if ok; false if the initialization failed
  *
  * Call this function to initialize the common eVaf library after creating the Qt application
@@ -79,6 +79,14 @@ namespace Common {
  */
 extern bool COMMON_EXPORT init();
 
+/**
+ * eVaf common library finalizer
+ *
+ * Call this function to finalize the common eVaf library after destroying the Qt application
+ * object and unloading all the modules.
+ */
+extern void COMMON_EXPORT done();
+
 /**
  * Internal implementation of the common eVaf library.
  */
@@ -96,15 +104,15 @@ namespace Internal {
  */
 #define EVAF_TEST(cond) \
     if (!cond) \
-        EVAF_FATAL(#cond);
+        EVAF_FATAL_ERROR(#cond);
 
 /**
  * Tests that the condition is true with a custom error message.
  *
  * This macro tests for the condition and if not true, exist with a custom fatal error message.
  */
-#define EVAF_TEST_X(const, msg) \
+#define EVAF_TEST_X(cond, msg) \
     if (!cond) \
-        EVAF_FATAL(msg);
+        EVAF_FATAL_ERROR(msg);
 
 #endif // globals.h