Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
Base definitions

Description


Diverse basic definitions for Elementa.
Author
Juan-Antonio Fernandez-Madrigal. http://jafma.net
Date
2018-2019
Collaboration diagram for Base definitions:

Macros

#define ELE_PRE_TOSTR_IMPL(x)   #x
 
#define ELE_PRE_TOSTR(x)   ELE_PRE_TOSTR_IMPL(x)
 Convert another macro result or token into a string. More...
 
#define ELE_PRE_NAME   "Elementa"
 Elementa library name. More...
 
#define ELE_PRE_VER_MAJOR   5
 Elementa version major number. More...
 
#define ELE_PRE_VER_MINOR   0
 Elementa version minor number. More...
 
#define ELE_PRE_VER_REV   0
 Elementa version revision number. More...
 
#define ELE_PRE_VERSIONSTR
 Elementa whole version string. More...
 

Functions

constexpr const char * elementa::base::kYesNoCString (bool b)
 User-friendly yes/no output. More...
 

Variables

constexpr bool elementa::base::kYes = true
 Constant for "yes". More...
 
constexpr bool elementa::base::kNo = false
 Constant for "no". More...
 

Macro Definition Documentation

◆ ELE_PRE_TOSTR_IMPL

#define ELE_PRE_TOSTR_IMPL (   x)    #x

#include <elementa/base/definitions.h>

Definition at line 40 of file definitions.h.

◆ ELE_PRE_TOSTR

#define ELE_PRE_TOSTR (   x)    ELE_PRE_TOSTR_IMPL(x)

#include <elementa/base/definitions.h>

Convert another macro result or token into a string.

Note
- Must be done in a two-level fashion: this first one substitutes x; then that is passed to the second level, which converts it into a string. Otherwise, the result of this macro when x is another define would be the string of that define name.

Definition at line 47 of file definitions.h.

◆ ELE_PRE_NAME

#define ELE_PRE_NAME   "Elementa"

#include <elementa/base/definitions.h>

Elementa library name.

Definition at line 57 of file definitions.h.

◆ ELE_PRE_VER_MAJOR

#define ELE_PRE_VER_MAJOR   5

#include <elementa/base/definitions.h>

Elementa version major number.

Definition at line 60 of file definitions.h.

◆ ELE_PRE_VER_MINOR

#define ELE_PRE_VER_MINOR   0

#include <elementa/base/definitions.h>

Elementa version minor number.

Definition at line 62 of file definitions.h.

◆ ELE_PRE_VER_REV

#define ELE_PRE_VER_REV   0

#include <elementa/base/definitions.h>

Elementa version revision number.

Definition at line 64 of file definitions.h.

◆ ELE_PRE_VERSIONSTR

#define ELE_PRE_VERSIONSTR

#include <elementa/base/definitions.h>

Value:
ELE_PRE_TOSTR(ELE_PRE_VER_MINOR) "." \
ELE_PRE_TOSTR(ELE_PRE_VER_REV)
#define ELE_PRE_VER_REV
Elementa version revision number.
Definition: definitions.h:64
#define ELE_PRE_VER_MINOR
Elementa version minor number.
Definition: definitions.h:62
#define ELE_PRE_VER_MAJOR
Elementa version major number.
Definition: definitions.h:60
#define ELE_PRE_TOSTR(x)
Convert another macro result or token into a string.
Definition: definitions.h:47

Elementa whole version string.

Definition at line 67 of file definitions.h.

Function Documentation

◆ kYesNoCString()

constexpr const char * elementa::base::kYesNoCString ( bool  b)
constexpr

Variable Documentation

◆ kYes

constexpr bool elementa::base::kYes = true
constexpr

#include <elementa/base/definitions.h>

Constant for "yes".

Definition at line 79 of file definitions.h.

◆ kNo

constexpr bool elementa::base::kNo = false
constexpr

#include <elementa/base/definitions.h>

Constant for "no".

Definition at line 82 of file definitions.h.