void serialize_64 (serialize_main_t * m, va_list * va) { u64 x = va_arg (*va, u64); u32 lo, hi; lo = x; hi = x >> 32; serialize_integer (m, lo, sizeof (lo)); serialize_integer (m, hi, sizeof (hi)); }
void serialize_8 (serialize_main_t * m, va_list * va) { u32 x = va_arg (*va, u32); serialize_integer (m, x, sizeof (u8)); }
/** * Serializes the document model according to the given document type * and creates a byte stream from it. * * @param p0 the destination (Hand over as reference!) * @param p1 the destination count * @param p2 the destination size * @param p3 the source * @param p4 the source count * @param p5 the type * @param p6 the type count */ void serialize(void* p0, void* p1, void* p2, const void* p3, const void* p4, const void* p5, const void* p6) { // The comparison result. int r = 0; if (r != 1) { compare_arrays(p5, p6, (void*) CYBOL_ABSTRACTION, (void*) CYBOL_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_xml(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) OPERATION_ABSTRACTION, (void*) OPERATION_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_string(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) STRING_ABSTRACTION, (void*) STRING_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_string(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) BOOLEAN_ABSTRACTION, (void*) BOOLEAN_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_boolean(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) INTEGER_ABSTRACTION, (void*) INTEGER_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_integer(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) VECTOR_ABSTRACTION, (void*) VECTOR_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_vector(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) DOUBLE_ABSTRACTION, (void*) DOUBLE_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_double(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) FRACTION_ABSTRACTION, (void*) FRACTION_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_fraction(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) COMPLEX_ABSTRACTION, (void*) COMPLEX_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_complex(p0, p1, p2, p3, p4); } } if (r != 1) { compare_arrays(p5, p6, (void*) TIME_ABSTRACTION, (void*) TIME_ABSTRACTION_COUNT, (void*) &r, (void*) CHARACTER_ARRAY); if (r == 1) { serialize_time(p0, p1, p2, p3, p4); } } // // CONFIGURATION_ABSTRACTION // // CAUTION! Parameters of the internals memory MUST NOT be written // to the configuration file which was given at command line! // The CYBOI configuration file can only be edited MANUALLY. // //?? Later, distinguish file types according to abstraction, //?? for example xml, html, sxi, txt, rtf, //?? adl (from OpenEHR), KIF, ODL etc.! //?? For now, only the cybol file format is considered. }