qxLib
Macros
common.h File Reference
#include <qx/containers/string/string_setup.h>
#include <qx/meta/qualifiers.h>

Go to the source code of this file.

Macros

#define QX_EMPTY_MACRO   ((void*)0)
 Placeholder for disabled macros. More...
 
#define QX_STRINGIFY(name)   #name
 Macro can be used to turn any text in your code into a string, but only the exact text between the parentheses There are no variable dereferencing or macro substitutions or any other sort of thing done. More...
 
#define QX_LINE_NAME(prefix)   _QX_JOIN(prefix, __LINE__)
 Do magic! Creates a unique name using the line number. More...
 
#define QX_SHORT_FILE   qx::details::last_slash(QX_TEXT(__FILE__))
 Cuts full absolute path to the file name only ex: "C:\folder1\foler2\file.h" => "file.h".
 
#define QX_SINGLE_ARGUMENT(...)   __VA_ARGS__
 Let macro param containing commas work fine "#define FOO(type, name) type name" FOO(QX_SINGLE_ARGUMENT(std::map<int, int>), map_var);. More...
 

Detailed Description

Author
Khrapov
Date
17.06.2019

Definition in file common.h.

Macro Definition Documentation

◆ QX_EMPTY_MACRO

#define QX_EMPTY_MACRO   ((void*)0)

Placeholder for disabled macros.

Has no effect and work correctly with "if else"

Definition at line 19 of file common.h.

◆ QX_LINE_NAME

#define QX_LINE_NAME (   prefix)    _QX_JOIN(prefix, __LINE__)

Do magic! Creates a unique name using the line number.

Parameters
prefix- name prefix

Definition at line 35 of file common.h.

◆ QX_SINGLE_ARGUMENT

#define QX_SINGLE_ARGUMENT (   ...)    __VA_ARGS__

Let macro param containing commas work fine "#define FOO(type, name) type name" FOO(QX_SINGLE_ARGUMENT(std::map<int, int>), map_var);.

Parameters
...- param containing commas

Definition at line 71 of file common.h.

◆ QX_STRINGIFY

#define QX_STRINGIFY (   name)    #name

Macro can be used to turn any text in your code into a string, but only the exact text between the parentheses There are no variable dereferencing or macro substitutions or any other sort of thing done.

Parameters
name- name to convert to the string

Definition at line 28 of file common.h.