le_print.h
Go to the documentation of this file.
1 
13 //--------------------------------------------------------------------------------------------------
22 #ifndef LEGATO_PRINT_INCLUDE_GUARD
23 #define LEGATO_PRINT_INCLUDE_GUARD
24 
25 //--------------------------------------------------------------------------------------------------
32 //--------------------------------------------------------------------------------------------------
33 #define LE_PRINT_VALUE(formatSpec, value) \
34  LE_DEBUG( STRINGIZE(value) "=" formatSpec, value)
35 
36 //--------------------------------------------------------------------------------------------------
44 //--------------------------------------------------------------------------------------------------
45 #define LE_PRINT_VALUE_IF(condition, formatSpec, value) \
46  if (condition) \
47  { LE_PRINT_VALUE(formatSpec, value); }
48 
49 //--------------------------------------------------------------------------------------------------
57 //--------------------------------------------------------------------------------------------------
58 #define LE_PRINT_ARRAY(formatSpec, size, array) \
59  { \
60  int i; \
61  LE_DEBUG( STRINGIZE(array) ); \
62  for (i=0; i<(size_t)size; i++) \
63  LE_DEBUG( "\t" STRINGIZE(array) "[%i]=" formatSpec, i, array[i]); \
64  }
65 
66 #endif // LEGATO_PRINT_INCLUDE_GUARD
67