The Omni framework has a compendium of macros and compiler options that are used both internally (helper macro's)
and externally (via compiler options). Certain macro's and options will change how certain portions of the framework
will be used (underlying structures/logic, etc.), this granular control allows a developer to customize the framework to
better suit their developmental needs.
Compiler Options
The following is a list of compiler options that can effect how the framework is built and/or operates.
The following is a list of compiler options that can effect how the framework is built and/or operates.
OMNI_APLNL- If defined, uses the \r new line instead of \n.OMNI_CLOCK_GETRES_REALTIME- Changes the behavior of theclock_getres
OMNI_COMPILE_FLAGS- If defined, builds in the omni/defs/compile_flags.hpp header
OMNI_DISPOSE_EVENT- If defined, classes within the framework will have a disposing event.OMNI_ENABLE_CXX- Enable a set of C++11 features.OMNI_ENV_WORDEXP- If defined,wordexpfunctionality is used inomni::environment::expand_varsOMNI_EXCEPTION_TERMINATE- The error call that is made when an exception happens within an omni::execption.OMNI_FW_VER_USE_TIME- The framework will use the build time in framework version string.OMNI_LITE- Enables certain flags that trim portions of code.OMNI_MUTEX_OWNER- A framework macro/optionOMNI_NO_BASE_SETLOCALE- A framework macro/optionOMNI_NO_CLINK- A framework macro/optionOMNI_NO_CSTRING_IMPL- If defined, specifies that the omni/cstring_impl will have to be built in by the user.OMNI_NO_DISPOSE_EVENT- A framework macro/optionOMNI_NO_EXCEPT- A framework macro/optionOMNI_NO_EXTERN_CONSTS- If defined, Omni constants will not have external linkageOMNI_NO_FW_VER- Disables the framework version header from being baked into the framework.OMNI_NO_MUTEX_OWNER- A framework macro/optionOMNI_NO_NON_PORTABLE- A framework macro/optionOMNI_NO_OBJECT_NAME- A framework macro/optionOMNI_NO_PRINTL- Disables the definedprintlnmacro.OMNI_NO_PROC_SYS- Does not use theprocfile system for system path.OMNI_NO_SAFE_APPLICATION- A framework macro/optionOMNI_NO_SAFE_BASIC_THREAD- A framework macro/optionOMNI_NO_SAFE_CONDITIONAL- A framework macro/optionOMNI_NO_SAFE_DELEGATES- A framework macro/optionOMNI_NO_SAFE_EVENTS- A framework macro/optionOMNI_NO_SAFE_FRAMEWORK- A framework macro/optionOMNI_NO_SAFE_MUTEX- A framework macro/optionOMNI_NO_SAFE_PROP- A framework macro/optionOMNI_NO_SAFE_RUNNABLE_THREAD- A framework macro/optionOMNI_NO_SAFE_SEMAPHORE- A framework macro/optionOMNI_NO_SAFE_THREAD- A framework macro/optionOMNI_NO_SAFE_TIMER- A framework macro/optionOMNI_NO_SINGLE_FILE- A framework macro/optionOMNI_NO_TERMINATE- A framework macro/optionOMNI_NO_THROW- Disables exceptions (throw keyword) in the framework.OMNI_NO_TYPE_INFO- A framework macro/optionOMNI_NO_WIN_API- Use the Microsoft C Runtime Library where applicable.
OMNI_NO_WIN_LEAN- A framework macro/optionOMNI_NO_WSTRING_IMPL- If defined, specifies that the omni/wstring_impl will have to be built in by the user.OMNI_NON_PORTABLE- If defined, the framework will enable non-portable code.OMNI_NULL_MACRO- The timestamp used for the framework version information.
OMNI_NULL_PTR- The timestamp used for the framework version information.
OMNI_OBJECT_NAME- A framework macro/optionOMNI_SAFE_APPLICATION- A framework macro/optionOMNI_SAFE_ASYNC_TIMER- A framework macro/optionOMNI_SAFE_BASIC_THREAD- A framework macro/optionOMNI_SAFE_DELEGATES- A framework macro/optionOMNI_SAFE_DROP_TIMER- A framework macro/optionOMNI_SAFE_EVENTS- A framework macro/optionOMNI_SAFE_FRAMEWORK- A framework macro/optionOMNI_SAFE_LOCKS- A framework macro/optionOMNI_SAFE_MUTEX- A framework macro/optionOMNI_SAFE_PROP- A framework macro/optionOMNI_SAFE_QUEUE_TIMER- A framework macro/optionOMNI_SAFE_RUNNABLE_THREAD- A framework macro/optionOMNI_SAFE_SEMAPHORE- A framework macro/optionOMNI_SAFE_SYNC_TIMER- A framework macro/optionOMNI_SAFE_THREAD- A framework macro/optionOMNI_SAFE_THREADS- A framework macro/optionOMNI_SAFE_TIMER- A framework macro/optionOMNI_SAFE_TIMERS- A framework macro/optionOMNI_SHOW_DEBUG- Display framework debug output.OMNI_SHOW_DEBUG_ERR- A framework macro/optionOMNI_SHOW_DEBUG_FILE- Displays the file as part of the debug output.OMNI_SHOW_DEBUG_FUNC- Displays the function as part of the debug output.OMNI_SHOW_DEBUG_LINE- Displays the line number as part of the debug output.OMNI_SIGCALL- Defines the underlying signal call (e.g. __cdecl).
OMNI_TERMINATE- A framework macro/optionOMNI_THREAD_CDECL- A framework macro/optionOMNI_THREAD_FASTCALL- A framework macro/optionOMNI_THREAD_LIB- A framework macro/optionOMNI_THREAD_STDCALL- A framework macro/optionOMNI_THROW- A framework macro/optionOMNI_TIMER_LIB- A framework macro/optionOMNI_TYPE_INFO- Defines if theomni::typeclass should be used in other classes.OMNI_USE_NULL- A framework macro/optionOMNI_USE_NULLPTR- A framework macro/optionOMNI_WIN_API- Defines whether to use straight Windows API or CRT functionsOMNI_WIN_MONO_TICK_COUNT- A framework macro/optionOMNI_WIN_MONO_TICK_COUNT64- A framework macro/optionOMNI_WIN_MONO_TICK_QPC- A framework macro/optionOMNI_WIN_USE_EVENT_CONDITIONAL- Defines whether to use an event or condition type on Windows
Helper Macros
The following is a list of helper macros used by the framework that can be utilized in user code.
The following is a list of helper macros used by the framework that can be utilized in user code.
OMNI_B2S- Converts a bool to string equivalent
OMNI_B2WS- Converts a bool to its wide string equivalent
OMNI_BIND- A helper macro for binding to theomni::delegate
OMNI_BIND_CONST- A helper macro for binding theomni::delegateto const membersOMNI_BIND_CONST_EX- A helper macro for binding theomni::delegateto const membersOMNI_BIND_EX- A helper macro for binding theomni::delegate
OMNI_BOOL2STR- Convert a bool value to a string.
OMNI_BOOL2WSTR- Convert a bool value to a wide string.
OMNI_DEF2STR- Stringizes the value passed inOMNI_DEFCONCAT- Concatenate 2 #define values.OMNI_DWSTR- Widens a string-ized macro
OMNI_INFINITE_TIMEOUT- A framework macro/option
OMNI_IS_N_BIT_SET- A framework macro/option
OMNI_NEW_LINE- Defines the new line constant used based on system.OMNI_NULL- The timestamp used for the framework version information.OMNI_OSTREAM_OPERATOR- A framework macro/option
OMNI_SET_N_BIT- A framework macro/option
OMNI_SIZEOF_BITS- A framework macro/option
OMNI_SLEEP- A framework macro/option
OMNI_SLEEP_INIT- A framework macro/option
OMNI_SLEEP_WAIT- A framework macro/option
OMNI_SLEEP1- A framework macro/option
OMNI_STR_WIDEN- A helper macro used to 'widen' strings.OMNI_STRW- A shortened form of theOMNI_STR_WIDENmacro.OMNI_THREAD_YIELD- A framework macro/option
OMNI_UNICODE- Defined if a Unicode build is detected.OMNI_UNSET_N_BIT- A framework macro/option
OMNI_UNUSED- Can be used to avoid 'unused' warnings in user code.OMNI_VAL_HAS_FLAG_BIT- A framework macro/option
OMNI_VAL_SET_FLAG_BIT- A framework macro/option
OMNI_VAL_SET_FLAG_BOOL- A framework macro/option
OMNI_VAL_UNSET_FLAG_BIT- A framework macro/option
OMNI_WINCODE- Defined when a Windows Unicode environment detected.OMNI_WOSTREAM_OPERATOR- A framework macro/option
OMNI_WSTR- Widens an input string (defined asL##v)OMNI_XOR_SWAP- A framework macro/option
Framework Macros
The following is a list of macros used internally by the framework.
The following is a list of macros used internally by the framework.
OMNI_CHAR_T- Defines the underlying char type.
OMNI_CLOCK_FREQ_T- Defines the underlying clock frequency variable type.OMNI_CLOCK_TICK_T- Defines the underlying clock tick type.
OMNI_COND_T- Defines the underlying condition variable type.OMNI_DATE- Defines the build date for the framework.
OMNI_DBG_L1- Defined when debug level > 0.
OMNI_DBG_L2- Defined when debug level > 1.
OMNI_DBG_L3- Defined when debug level > 2.
OMNI_DBG_L4- Defined when debug level > 3.
OMNI_DBG_L5- Defined when debug level > 4.
OMNI_DBGE- A helper macro used for debug error output.
OMNI_DBGEV- A helper macro used for debug error output.
OMNI_DEBUG- Defined when any debug values are defined.
OMNI_FW_VER_MAJ- Defines the current framework major version.
OMNI_FW_VER_MIN- Defines the current framework minor version.
OMNI_FW_VER_STR- Defines the current framework full version string.
OMNI_FW_VER_SUB- Defines the current framework sub version.
OMNI_GLE- Defines the system 'get last error' API used based on OS detected.
OMNI_GLE_PRNT- Can be used in print statements to output the last error code.
OMNI_ISTREAM_T- A framework macro/optionOMNI_MUTEX_T- Defines the underlying mutex handle type based on system.OMNI_OS_AEGIS- Defines Aegis environment was detected.OMNI_OS_AIX- Defines AIX environment was detected.OMNI_OS_AMIGA- Defines Amiga environment was detected.OMNI_OS_ANDROID- Defines Android environment was detected.OMNI_OS_APPLE- Defines Apple environment was detected.OMNI_OS_APPOLO- Defines Appolo environment was detected.OMNI_OS_BEOS- Defines BeOS environment was detected.OMNI_OS_BLUEGENE- Defines Blue Gene environment was detected.OMNI_OS_BSD- Defines BSD environment was detected.OMNI_OS_BSDI- Defines BSD/OS environment was detected.OMNI_OS_CONVEX- Defines ConvexOS environment was detected.OMNI_OS_CRAY- Defines UNICOS/mp environment was detected.OMNI_OS_CYGWIN- Defines Cygwin environment was detected.OMNI_OS_DGUX- Defines DG/UX environment was detected.OMNI_OS_DRAGONFLYBSD- Defines DragnFly BSD environment was detected.OMNI_OS_DYNIX- Defines DYNIX/ptx environment was detected.OMNI_OS_ECOS- Defines eCos environment was detected.OMNI_OS_EMX- Defines EMX environment was detected.OMNI_OS_FREEBSD- Defines FreeBSD environment was detected.OMNI_OS_GNU_FREEBSD- Defines GNU/kFreeBSD environment was detected.OMNI_OS_GNU_HURD- Defines GNU aka GNU/Hurd environment was detected.OMNI_OS_GNU_LINUX- Defines GNU/Linux environment was detected.OMNI_OS_HIUXMPP- Defines HI-UX MPP environment was detected.OMNI_OS_HPUX- Defines HP-UX environment was detected.OMNI_OS_IGNORE- Do not attempt to guess the OS type based on compiler macros.OMNI_OS_INTEGRITY- Defines INTEGRITY environment was detected.OMNI_OS_INTERIX- Defines Interix environment was detected.OMNI_OS_IRIX- Defines IRIX environment was detected.OMNI_OS_LINUX- Defines Linux environment was detected.OMNI_OS_LYNXOS- Defines LynxOS environment was detected.OMNI_OS_MICROWARE_OS9- Defines Microware OS-9 environment was detected.OMNI_OS_MINGW- Defines a MinGW environment was detected.OMNI_OS_MINIX- Defines MINIX environment was detected.OMNI_OS_MORPHOS- Defines MorphOS environment was detected.OMNI_OS_MPEIX- Defines MPE/iX environment was detected.OMNI_OS_MSDOS- Defines MSDOS environment was detected.OMNI_OS_NETBSD- Defines NetBSD environment was detected.OMNI_OS_NONSTOP- Defines NonStop environment was detected.OMNI_OS_NUCLEUS- Defines Nucleus RTOS environment was detected.OMNI_OS_OPENBSD- Defines OpenBSD environment was detected.OMNI_OS_OS2- Defines OS/2 environment was detected.OMNI_OS_OS400- Defines IBM OS/400 environment was detected.OMNI_OS_OSF1- Defines Tru64 (OSF/1) environment was detected.OMNI_OS_PALMOS- Defines Palm OS environment was detected.OMNI_OS_PYRAMID- Defines Pyramid DC/OSx environment was detected.OMNI_OS_QNX- Defines QNX environment was detected.OMNI_OS_RELIANT_UNIX- Defines Reliant UNIX environment was detected.OMNI_OS_SCO_OPENSERVER- Defines SCO OpenServer environment was detected.OMNI_OS_SOLARIS- Defines Solaris environment was detected.OMNI_OS_SUNOS- Defines SunOS environment was detected.OMNI_OS_SVR- Defines SVR4 environment was detected.OMNI_OS_SYLLABLE- Defines Syllable environment was detected.OMNI_OS_SYMBIAN- Defines Symbian OS environment was detected.OMNI_OS_ULTRIX- Defines Ultrix environment was detected.OMNI_OS_UNICOS- Defines UNICOS environment was detected.OMNI_OS_UNIX- Defines Unix environment was detected.OMNI_OS_UNIXWARE- Defines UnixWare environment was detected.OMNI_OS_UTS- Defines Amdahl UTS environment was detected.OMNI_OS_UWIN- Defines U/Win environment was detected.OMNI_OS_VMS- Defines VMS environment was detected.OMNI_OS_VOS- Defines Stratus VOS environment was detected.OMNI_OS_WIN- Defines Windows environment was detected.OMNI_OS_WIN8- A framework macro/optionOMNI_OS_WINCE- Defines WindowsCE environment was detected.OMNI_OS_WINDU- Defines Wind/U environment was detected.OMNI_OS_ZOS- Defines z/OS environment was detected.OMNI_OSTREAM_T- A framework macro/optionOMNI_SEM_T- Defines the underlying semaphore type based on system.OMNI_SEQ_H- Defines the sequence container header used by the framework (list/deque/vector).
OMNI_SEQ_T- A framework macro/option
OMNI_SEQCONT_TYPE- Defines the sequence container type (list/deque/vector) used by the framework.
OMNI_SPIN_LOCK_T- A framework macro/optionOMNI_SSTREAM_T- Defines the underlying string stream type for the framework/types.OMNI_STRING_T- Defines the underlying string type.OMNI_THREAD_CALL_T- Defines the thread function call type for Windows systems.OMNI_THREAD_FNPTR_T- A framework macro/optionOMNI_THREAD_HANDLE_T- A framework macro/optionOMNI_THREAD_RET_T- A framework macro/optionOMNI_THREAD_T- A framework macro/optionOMNI_TIME- The timestamp used for the framework version information.
Constant Macros
The following is a list of macro constants and options used by the framework.
The following is a list of macro constants and options used by the framework.
OMNI_APP_RUNNING_STR- Defines a framework string constant
OMNI_B_STR- Defines a framework string constant
OMNI_BYTE_STR- Defines a framework string constant
OMNI_COMMA_CHAR- Defines a character constant
OMNI_EIB_STR- Defines a framework string constant
OMNI_EIBI_STR- Defines a framework string constant
OMNI_EOB_STR- Defines a framework string constant
OMNI_ERR_ACQUIRE_STR- Defines a framework string constant
OMNI_ERR_APPEX_STR- Defines a framework string constant
OMNI_ERR_COND_OBJ_STR- Defines a framework string constant
OMNI_ERR_ENVEX_STR- Defines a framework string constant
OMNI_ERR_GET_TIME_STR- Defines a framework string constant
OMNI_ERR_MALLOC_STR- Defines a framework string constant
OMNI_ERR_MTX_OWNER_STR- Defines a framework string constant
OMNI_ERR_MTX_STATE_STR- Defines a framework string constant
OMNI_ERR_MTX_UNLOCKED_STR- Defines a framework string constant
OMNI_ERR_MUTEX_STR- Defines a framework string constant
OMNI_ERR_NAME_STR- Defines a framework string constant
OMNI_ERR_PIPE_STR- Defines a framework string constant
OMNI_ERR_PROC_PRI_STR- Defines a framework string constant
OMNI_ERR_PROC_STR- Defines a framework string constant
OMNI_ERR_RELEASE_STR- Defines a framework string constant
OMNI_ERR_SEM_STATE_STR- Defines a framework string constant
OMNI_ERR_SEMAPHORE_STR- Defines a framework string constant
OMNI_ERR_SET_PRI_STR- Defines a framework string constant
OMNI_ERR_SIZE_STR- Defines a framework string constant
OMNI_ERR_SPIN_OBJ_STR- Defines a framework string constant
OMNI_ERR_STATE_STR- Defines a framework string constant
OMNI_ERR_STOPWATCH_STR- Defines a framework string constant
OMNI_ERR_STROBJ_STR- Defines a framework string constant
OMNI_ERR_THREAD_STR- Defines a framework string constant
OMNI_ERR_THREADPOOL_STR- Defines a framework string constant
OMNI_ERR_WAIT_STR- Defines a framework string constant
OMNI_EXA_STR- Defines a framework string constant
OMNI_FILE_NOT_ACCESSIBLE_STR- Defines a framework string constant
OMNI_FILE_NOT_FOUND_STR- Defines a framework string constant
OMNI_GB_IVAL- A framework macro/optionOMNI_GENERAL_EXCEPTION_STR- Defines a framework string constant
OMNI_GIB_IVAL- A framework macro/optionOMNI_GIB_STR- Defines a framework string constant
OMNI_GIBI_STR- Defines a framework string constant
OMNI_GIGA_STR- Defines a framework string constant
OMNI_GOB_STR- Defines a framework string constant
OMNI_INDEX_OOR_STR- Defines a framework string constant
OMNI_INVALID_BASE_STR- Defines a framework string constant
OMNI_INVALID_CAST_STR- Defines a framework string constant
OMNI_INVALID_CHAR_STR- Defines a framework string constant
OMNI_INVALID_DELEGATE_FUNC_STR- Defines a framework string constant
OMNI_INVALID_DELEGATE_STR- Defines a framework string constant
OMNI_INVALID_OPTION_STR- Defines a framework string constant
OMNI_INVALID_SEEK_DIR_STR- Defines a framework string constant
OMNI_INVALID_SETTING_STR- Defines a framework string constant
OMNI_INVALID_SIZE_STR- Defines a framework string constant
OMNI_INVALID_TEMPLATE_STR- Defines a framework string constant
OMNI_INVALID_THREAD_HANDLE_STR- Defines a framework string constant
OMNI_INVALID_THREAD_PRIORITY_STR- Defines a framework string constant
OMNI_INVALID_THREAD_START_TYPE_STR- Defines a framework string constant
OMNI_INVALID_THREAD_STATE_STR- Defines a framework string constant
OMNI_INVALID_VERSION_STR- Defines a framework string constant
OMNI_KB_IVAL- A framework macro/optionOMNI_KIB_IVAL- A framework macro/optionOMNI_KIB_STR- Defines a framework string constant
OMNI_KIBI_STR- Defines a framework string constant
OMNI_KILO_STR- Defines a framework string constant
OMNI_KOB_STR- Defines a framework string constant
OMNI_MB_IVAL- A framework macro/optionOMNI_MEGA_STR- Defines a framework string constant
OMNI_MIB_IVAL- A framework macro/optionOMNI_MIB_STR- Defines a framework string constant
OMNI_MIBI_STR- Defines a framework string constant
OMNI_MINUS_CHAR- A framework macro/optionOMNI_MOB_STR- Defines a framework string constant
OMNI_NCHAR_CHAR- A framework macro/optionOMNI_NO_DELEGATE_STR- Defines a framework string constant
OMNI_NULL_PTR_STR- Defines a framework string constant
OMNI_NULL_REF_STR- Defines a framework string constant
OMNI_PATH_NOT_ACCESSIBLE_STR- Defines a framework string constant
OMNI_PERIOD_CHAR- A framework macro/optionOMNI_PETA_STR- Defines a framework string constant
OMNI_PIB_STR- Defines a framework string constant
OMNI_PIBI_STR- Defines a framework string constant
OMNI_PLUS_CHAR- A framework macro/optionOMNI_POB_STR- A framework macro/optionOMNI_SET_PRI_UNSUPPORTED_STR- Defines a framework string constant
OMNI_STRING_COUNT_GT0_STR- Defines a framework string constant
OMNI_STRING_INVALID_FORMAT_STR- Defines a framework string constant
OMNI_STRING_INVALID_SIZE_STR- Defines a framework string constant
OMNI_STRING_NOT_NUMERIC_STR- Defines a framework string constant
OMNI_SUCCESS_STR- Defines a framework string constant
OMNI_TERA_STR- A framework macro/optionOMNI_THREAD_STARTED_STR- Defines a framework string constant
OMNI_TIB_STR- Defines a framework string constant
OMNI_TIBI_STR- Defines a framework string constant
OMNI_TOB_STR- Defines a framework string constant
OMNI_UNKNOWN_STR- Defines a framework string constant
OMNI_YIB_STR- Defines a framework string constant
OMNI_YIBI_STR- Defines a framework string constant
OMNI_YOB_STR- Defines a framework string constant
OMNI_YOTTA_STR- Defines a framework string constant
OMNI_ZETTA_STR- Defines a framework string constant
OMNI_ZIB_STR- Defines a framework string constant
OMNI_ZIBI_STR- Defines a framework string constant
OMNI_ZOB_STR- Defines a framework string constant