libabigail/include
Dodji Seketeli b438c0648e Allow setting options to instances of xml_writer::write_context
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>
2017-11-02 12:54:34 +01:00
..
abg-comp-filter.h Initial implementation of a --leaf-changes-only option to abidiff 2017-10-08 18:51:35 +02:00
abg-comparison.h Initial implementation of a --leaf-changes-only option to abidiff 2017-10-08 18:51:35 +02:00
abg-config.h Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-corpus.h Create a Corpus Group API extension 2017-07-03 17:45:36 +02:00
abg-diff-utils.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-dwarf-reader.h Bug 21644 - abipkgdiff does not emit diagnostics about comparison errors 2017-07-06 15:20:47 +02:00
abg-fwd.h Initial implementation of a --leaf-changes-only option to abidiff 2017-10-08 18:51:35 +02:00
abg-hash.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-ini.h Fix more clang build warnings 2017-06-02 23:12:14 +02:00
abg-interned-str.h Cleanup namespace importing in abg-interned-str.h 2016-10-10 12:57:47 +02:00
abg-ir.h Initial implementation of a --leaf-changes-only option to abidiff 2017-10-08 18:51:35 +02:00
abg-libxml-utils.h Initial support of de-serializing the KMI of a Linux Kernel Tree 2017-07-03 17:45:41 +02:00
abg-libzip-utils.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-reader.h Initial support of de-serializing the KMI of a Linux Kernel Tree 2017-07-03 17:45:41 +02:00
abg-reporter.h Initial implementation of a --leaf-changes-only option to abidiff 2017-10-08 18:51:35 +02:00
abg-sptr-utils.h Setup per-corpus type maps indexed by type names 2016-11-29 16:16:43 +01:00
abg-suppression.h Make abipkgdiff compare two kernel packages 2017-07-03 17:45:36 +02:00
abg-tools-utils.h Bug 21730 - Make abipkgdiff compare Linux Kernel packages as expected 2017-07-17 16:41:07 +02:00
abg-traverse.h Canonicalize types either early or late after TU reading 2015-02-18 21:32:37 +01:00
abg-version.h.in Add --version option to several libabigail tools 2015-11-16 12:54:10 +01:00
abg-viz-common.h Update copyright years 2015-01-07 17:52:10 +01:00
abg-viz-dot.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-viz-svg.h cppcheck: mitigate performance warnings 2017-04-14 04:41:44 -04:00
abg-workers.h Several fixes and enhancements to abigail::workers 2017-02-27 09:48:08 +01:00
abg-writer.h Allow setting options to instances of xml_writer::write_context 2017-11-02 12:54:34 +01:00
Makefile.am Allow several kinds of reports to be emitted 2017-10-06 12:33:50 +02:00