mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 07:24:34 +00:00
b438c0648e
Up to know, it wasn't possible to set options to instances of xml_writer::write_context. So it wasn't possible to, say, make abidw stop emitting source locations in the abixml. This patch does the work necessary to set two options: annotate and show locations. Note that the patch doesn't yet enable abidw to stop emitting source locations. That will be done in a subsequent patch. * include/abg-writer.h (create_write_context, set_show_locs) (set_annotate): Declare new functions. (write_corpus, write_corpus_group): Remove the output stream and the annotate parameters as these can be retrieved from the context. * src/abg-writer.cc (write_context::m_show_locs): New data member. (write_context::write_context): Initialize it. (write_context::{get_show_locs, set_show_locs}): Add new member functions. (write_location): Take a write_context, rather than an output stream. From the context, we detect if the user did set the "show loc" option and act accordingly. Write the second overload in terms of the first one. (create_write_context, set_show_locs, set_annotate): Define new functions. (write_type_decl, write_qualified_type_def) (write_pointer_type_def, write_reference_type_def) (write_array_type_def, write_enum_type_decl, write_typedef_decl) (write_var_decl, write_function_decl) (write_class_decl_opening_tag, write_union_decl_opening_tag) (write_type_tparameter, write_non_type_tparameter) (write_function_tdecl, write_class_tdecl): Adjust the invocation of write_location. (write_corpus, write_corpus_group): Remove the output stream and the annotate parameters as these can be retrieved from the context. Adjust. * tools/abidw.c: (load_corpus_and_write_abixml): Create a write_context object, set the 'annotate' option to it and use that object to actually write out the corpus. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-reporter.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |