X-Git-Url: https://vaikene.ee/gitweb/pswgen11.html?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Fglobals.h;h=bac62aef606ff8b72f147d0ac1b7351290c235d5;hb=32d6a193150b17fbbde109348ad5a8107bba5529;hp=e21aa867f13ebd049bef4c195a6f66098bc6034d;hpb=441d1b38e0900f56891f495a94a08dc8d48e0a32;p=evaf
diff --git a/src/libs/Common/globals.h b/src/libs/Common/globals.h
index e21aa86..bac62ae 100644
--- a/src/libs/Common/globals.h
+++ b/src/libs/Common/globals.h
@@ -21,10 +21,42 @@
# define __COMMON_GLOBALS_H
#include "libcommon.h"
+#include "ilogger.h"
/**
- * Common namespace for eVaf.
+ * @mainpage
+ * eVaf is a C++ cross-platform modular application development framework using Qt.
+ *
+ * The eVaf main executable is an empty container that needs to be filled with external modules to
+ * provide the required functionality. The eVaf main GUI executable, if run without external modules,
+ * shows just an empty window that can be closed to terminate the application. The eVaf main CLI
+ * executable runs until terminated with CTRL+C.
+ *
+ * eVaf modules are loadable libraries (.so or .dll files) that implement the features and
+ * functions of the application. By combining together different modules, an unique application can
+ * be made in very little time. Every module implements a specific function or feature and only when
+ * put together, the actual application is created.
+ *
+ * eVaf interfaces are the way how the functionality of eVaf modules is used. Every feature implemented
+ * by a module has an interface used to feed the module with data or request information from the module.
+ *
+ * eVaf events are used by modules to send out information that they have collected or processed.
+ * While interfaces are the way how to feed modules with data or requests, then events are mostly for
+ * spontaneous data.
+ *
+ * Events broadcast by modules can have data objects attached to them. To avoid unnecessary copying of
+ * data, these data objects are shared and reference-counted. When the data object is attached to the
+ * event, its internal reference counter is increased by one. When the eVaf event queue has delivered
+ * the event to all the subscribers, it destroys the event and decreases the reference-counter of the
+ * data object by one. If no other module kept the data object, then the data object's reference counter
+ * becomes zero and it is destroyed too.
*/
+
+/**
+ * Global eVaf namespace.
+ *
+ * eVaf is a C++ cross-platform modular application development framework using Qt.
+ */
namespace eVaf {
/**
@@ -40,15 +72,39 @@ namespace Common {
/**
* eVaf common library initialized
- * @param args List of arguments
* @return True if ok; false if the initialization failed
*
* Call this function to initialize the common eVaf library after creating the Qt application
* object and before loading any of the modules.
*/
-extern bool COMMON_EXPORT init(QStringList const & args);
+extern bool COMMON_EXPORT init();
+/**
+ * Internal implementation of the common eVaf library.
+ */
+namespace Internal {
+} // namespace eVaf::Common::Internal
} // namespace eVaf::Common
} // namespace eVaf
+/**
+ * Tests that the condition is true.
+ *
+ * This macro tests for the condition and if not true, exits with a fatal error.
+ * Use this macro to test for conditions that must be met in order for the application
+ * to continue.
+ */
+#define EVAF_TEST(cond) \
+ if (!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(cond, msg) \
+ if (!cond) \
+ EVAF_FATAL_ERROR(msg);
+
#endif // globals.h