Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
definitions.h
Go to the documentation of this file.
1
3#include "elementa/license.inc"
4#include "elementa/checks.inc"
5
6#ifndef ELEMENTA_BASE_DEFINITIONS_H
7#define ELEMENTA_BASE_DEFINITIONS_H
8
9namespace elementa
10{
11
12namespace base
13{
14
34/* *************************************************************************
35
36 Macro: ELE_PRE_TOSTR
37
38***************************************************************************/
39
40#define ELE_PRE_TOSTR_IMPL(x) #x
42
47#define ELE_PRE_TOSTR(x) ELE_PRE_TOSTR_IMPL(x)
48
49
50/* *************************************************************************
51
52 Macros: ELE_PRE_VER_MAJOR, ELE_PRE_VER_MINOR, ELE_PRE_VER_REV, ELE_PRE_NAME
53
54***************************************************************************/
55
57#define ELE_PRE_NAME "Elementa"
58
60#define ELE_PRE_VER_MAJOR 5
62#define ELE_PRE_VER_MINOR 0
64#define ELE_PRE_VER_REV 0
65
67#define ELE_PRE_VERSIONSTR ELE_PRE_TOSTR(ELE_PRE_VER_MAJOR) "." \
68 ELE_PRE_TOSTR(ELE_PRE_VER_MINOR) "." \
69 ELE_PRE_TOSTR(ELE_PRE_VER_REV)
70
71
72/* *************************************************************************
73
74 Const expressions: kYes, kNo, kYesNoCString
75
76***************************************************************************/
77
79constexpr bool kYes = true;
80
82constexpr bool kNo = false;
83
85constexpr const char * kYesNoCString(bool b) { return(b?"yes":"no"); }
86
87
88
89 // Definitions
91
92
93} // end namespace base
94
95} // end namespace elementa
96
97#endif
98
constexpr bool kNo
Constant for "no".
Definition: definitions.h:82
constexpr bool kYes
Constant for "yes".
Definition: definitions.h:79
constexpr const char * kYesNoCString(bool b)
User-friendly yes/no output.
Definition: definitions.h:85