Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
helpers.h File Reference

Compile time helpers. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ROC_ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
 Get number of elements in a static array. 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...
 

Detailed Description

Compile time helpers.

Definition in file helpers.h.

Macro Definition Documentation

#define ROC_ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Get number of elements in a static array.

Definition at line 16 of file 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 19 of file helpers.h.

#define ROC_STRINGIZE (   s)    ROC_STRINGIZE_(s)

Stringize macro.

Definition at line 26 of file helpers.h.

#define ROC_STRINGIZE_ (   s)    #s

Stringize macro helper.

Definition at line 23 of file helpers.h.