Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Helper macros. More...
#include "roc_core/stddefs.h"
Go to the source code of this file.
Macros | |
#define | ROC_MIN(a, b) ((a) < (b) ? (a) : (b)) |
Select minum value. More... | |
#define | ROC_MAX(a, b) ((a) > (b) ? (a) : (b)) |
Select minum value. More... | |
#define | ROC_ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) |
Get number of elements in a static array. More... | |
#define | ROC_MIN_OF(type) |
Get minimum value of signed or unsigned integer type. More... | |
#define | ROC_MAX_OF(type) |
Get maximum value of signed or unsigned integer type. More... | |
#define | ROC_CONTAINER_OF(ptr, type, member) (reinterpret_cast<type*>((char*)(ptr)-offsetof(type, member))) |
Cast a member of a structure out to the containing structure. More... | |
#define | ROC_STRINGIZE_(s) #s |
Stringize macro helper. More... | |
#define | ROC_STRINGIZE(s) ROC_STRINGIZE_(s) |
Stringize macro. More... | |
Helper macros.
Definition in file macro_helpers.h.
#define ROC_ARRAY_SIZE | ( | a | ) | (sizeof(a) / sizeof((a)[0])) |
Get number of elements in a static array.
Definition at line 24 of file macro_helpers.h.
#define ROC_CONTAINER_OF | ( | ptr, | |
type, | |||
member | |||
) | (reinterpret_cast<type*>((char*)(ptr)-offsetof(type, member))) |
Cast a member of a structure out to the containing structure.
Definition at line 37 of file macro_helpers.h.
#define ROC_MAX | ( | a, | |
b | |||
) | ((a) > (b) ? (a) : (b)) |
Select minum value.
Definition at line 21 of file macro_helpers.h.
#define ROC_MAX_OF | ( | type | ) |
Get maximum value of signed or unsigned integer type.
Definition at line 32 of file macro_helpers.h.
#define ROC_MIN | ( | a, | |
b | |||
) | ((a) < (b) ? (a) : (b)) |
Select minum value.
Definition at line 18 of file macro_helpers.h.
#define ROC_MIN_OF | ( | type | ) |
Get minimum value of signed or unsigned integer type.
Definition at line 27 of file macro_helpers.h.
#define ROC_STRINGIZE | ( | s | ) | ROC_STRINGIZE_(s) |
Stringize macro.
Definition at line 44 of file macro_helpers.h.
#define ROC_STRINGIZE_ | ( | s | ) | #s |
Stringize macro helper.
Definition at line 41 of file macro_helpers.h.