3 // Copyright (C) 2013-2019 Red Hat, Inc.
5 // This file is part of the GNU Application Binary Interface Generic
6 // Analysis and Instrumentation Library (libabigail). This library is
7 // free software; you can redistribute it and/or modify it under the
8 // terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option) any
12 // This library is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Lesser Public License for more details.
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this program; see the file COPYING-LGPLV3. If
19 // not, see <http://www.gnu.org/licenses/>.
21 // Author: Dodji Seketeli
25 /// This file contains the declarations of the entry points to
26 /// de-serialize an instance of @ref abigail::translation_unit to an
27 /// ABI Instrumentation file in libabigail native XML format.
29 #ifndef __ABG_WRITER_H__
30 #define __ABG_WRITER_H__
39 using namespace abigail::ir;
43 /// A convenience typedef for a shared pointer to write_context.
44 typedef shared_ptr<write_context> write_context_sptr;
47 create_write_context(const environment *env,
48 ostream& output_stream);
51 set_show_locs(write_context& ctxt, bool flag);
54 set_annotate(write_context& ctxt, bool flag);
57 write_translation_unit(write_context& ctxt,
58 const translation_unit& tu,
59 const unsigned indent);
62 write_translation_unit(const translation_unit& tu,
65 const bool annotate = false);
68 write_translation_unit(const translation_unit& tu,
71 const bool annotate = false);
74 write_corpus_to_archive(const corpus& corp,
76 const bool annotate = false);
79 write_corpus_to_archive(const corpus& corp,
80 const bool annotate = false);
83 write_corpus_to_archive(const corpus_sptr corp,
84 const bool annotate = false);
87 write_corpus(write_context& ctxt, const corpus_sptr& corpus, unsigned indent);
90 write_corpus(const corpus_sptr& corpus, unsigned indent, write_context& ctxt);
93 write_corpus(const corpus_sptr corpus,
96 const bool annotate = false);
99 write_corpus(const corpus_sptr corpus,
102 const bool annotate = false);
105 write_corpus_group(write_context& ctx,
106 const corpus_group_sptr& group,
110 write_corpus_group(const corpus_group_sptr& group,
112 write_context& ctxt);
115 write_corpus_group(const corpus_group_sptr& group,
118 const bool annotate = false);
121 write_corpus_group(const corpus_group_sptr& group,
124 const bool annotate = false);
126 }// end namespace xml_writer
127 }// end namespace abigail
129 #endif // __ABG_WRITER_H__