framework/c/inc/le_print.h
Go to the documentation of this file.
00001 
00013 //--------------------------------------------------------------------------------------------------
00022 #ifndef LEGATO_PRINT_INCLUDE_GUARD
00023 #define LEGATO_PRINT_INCLUDE_GUARD
00024 
00025 //--------------------------------------------------------------------------------------------------
00032 //--------------------------------------------------------------------------------------------------
00033 #define LE_PRINT_VALUE(formatSpec, value)                                                           \
00034     LE_DEBUG( STRINGIZE(value) "=" formatSpec, value)
00035 
00036 //--------------------------------------------------------------------------------------------------
00044 //--------------------------------------------------------------------------------------------------
00045 #define LE_PRINT_VALUE_IF(condition, formatSpec, value)                                             \
00046     if (condition)                                                                                  \
00047         { LE_PRINT_VALUE(formatSpec, value); }
00048 
00049 //--------------------------------------------------------------------------------------------------
00057 //--------------------------------------------------------------------------------------------------
00058 #define LE_PRINT_ARRAY(formatSpec, size, array)                                                     \
00059     {                                                                                               \
00060         int i;                                                                                      \
00061         LE_DEBUG( STRINGIZE(array) );                                                               \
00062         for (i=0; i<(size_t)size; i++)                                                              \
00063             LE_DEBUG( "\t" STRINGIZE(array) "[%i]=" formatSpec, i, array[i]);                       \
00064     }
00065 
00066 #endif // LEGATO_PRINT_INCLUDE_GUARD
00067 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines