qxLib
Macros
names.h File Reference
#include <qx/macros/common.h>

Go to the source code of this file.

Macros

#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_METHOD_NAME(className, methodName)    ((void)sizeof(&className::methodName), QX_STRINGIFY(methodName)))
 Get a method name (without className::), while statically verifying that the method exists. More...
 
#define QX_FULL_METHOD_NAME(className, methodName)    ((void)sizeof(&className::methodName), QX_STRINGIFY(className) "::" QX_STRINGIFY(methodName)))
 Get a full method name (className::methodName), while statically verifying that the method exists. More...
 

Detailed Description

Author
Khrapov
Date
24.07.2025

Definition in file names.h.

Macro Definition Documentation

◆ QX_FULL_METHOD_NAME

#define QX_FULL_METHOD_NAME (   className,
  methodName 
)     ((void)sizeof(&className::methodName), QX_STRINGIFY(className) "::" QX_STRINGIFY(methodName)))

Get a full method name (className::methodName), while statically verifying that the method exists.

Parameters
className- class name
methodName- method name

Definition at line 42 of file names.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 27 of file names.h.

◆ QX_METHOD_NAME

#define QX_METHOD_NAME (   className,
  methodName 
)     ((void)sizeof(&className::methodName), QX_STRINGIFY(methodName)))

Get a method name (without className::), while statically verifying that the method exists.

Parameters
className- class name
methodName- method name

Definition at line 34 of file names.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 20 of file names.h.