static int MU_C2()

in v2/src/log_context_property_basic_types.c [17:63]


    static int MU_C2(type_name,_log_context_property_type_to_string)(const void* property_value, char* buffer, size_t buffer_length) \
    { \
        int result; \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_001: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int64_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_011: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint64_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_021: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int32_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_031: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint32_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_041: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int16_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_051: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint16_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_061: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int8_t).to_string shall fail and return a negative value. ]*/ \
        /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_071: [ If property_value is NULL, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint8_t).to_string shall fail and return a negative value. ]*/ \
        if (property_value == NULL) \
        { \
            (void)printf("Invalid arguments: const void* property_value=%p, char* buffer=%p, size_t buffer_length=%zu\r\n", \
                property_value, buffer, buffer_length); \
            result = -1; \
        } \
        else \
        { \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_002: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int64_t).to_string shall call snprintf with buffer, buffer_length and format string PRId64 and pass in the values list the int64_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_003: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int64_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_004: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int64_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_012: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint64_t).to_string shall call snprintf with buffer, buffer_length and format string PRId64 and pass in the values list the uint64_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_013: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint64_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_014: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint64_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_022: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int32_t).to_string shall call snprintf with buffer, buffer_length and format string PRId32 and pass in the values list the int32_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_023: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int32_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_024: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int32_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_032: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint32_t).to_string shall call snprintf with buffer, buffer_length and format string PRId32 and pass in the values list the uint32_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_033: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint32_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_034: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint32_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_042: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int16_t).to_string shall call snprintf with buffer, buffer_length and format string PRId16 and pass in the values list the int16_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_043: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int16_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_044: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int16_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_052: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint16_t).to_string shall call snprintf with buffer, buffer_length and format string PRId16 and pass in the values list the uint16_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_053: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint16_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_054: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint16_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_062: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int8_t).to_string shall call snprintf with buffer, buffer_length and format string PRId8 and pass in the values list the int8_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_063: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int8_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_064: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(int8_t).to_string shall fail and return a negative value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_072: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint8_t).to_string shall call snprintf with buffer, buffer_length and format string PRId8 and pass in the values list the uint8_t value pointed to be property_value. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_073: [ LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint8_t).to_string shall succeed and return the result of snprintf. ]*/ \
            /* Codes_SRS_LOG_CONTEXT_PROPERTY_BASIC_TYPES_01_074: [ If any error is encountered, LOG_CONTEXT_PROPERTY_TYPE_IF_IMPL(uint8_t).to_string shall fail and return a negative value. ]*/ \
            result = snprintf(buffer, buffer_length, "%" print_format_string "", *(type_name*)property_value); \
        } \
        return result; \
    } \