mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-20 00:40:05 +00:00
6258b5f824
* include/abg-reader.h: New file with abigail::xml_reader APIs. * include/abg-writer.h: New file with abigail::xml_writer APIs. * include/Makefile.am: Add the new files above to the source distribution. * src/abg-reader.cc: Update top-file comments. (namespace xml_reader): Rename namespace reader into this. (read_to_translation_unit, read_corpus_from_archive): New static functions. (read_translation_unit_from_file) (read_translation_unit_from_file, read_corpus_from_file): New entry points. (struct array_deleter): New functor. (translation_unit::read): Remove this. * src/abg-writer.cc: Update top file comments. (namespace xml_writer): Rename namespace writer into this. (struct archive_write_ctxt): New internal type. (create_archive_write_context, write_translation_unit_to_archive) (write_translation_unit, write_corpus_to_archive): New low level static functions overloads. (write_corpus_to_archive, write_translation_unit): Public higher level overloads. (translation_unit::write): Remove. (dump): Update for new xml_writer namespace. * include/abg-ir.h (translation_unit::{read, write}): Remove these serialization methods. * include/abg-corpus.h (corpus_sptr): New convenience typedef. (corpus::{read, write}): Remove these methods. * src/abg-corpus.cc (corpus::{read, write}) (corpus::impl::{serialized_tus, archive}): Remove these members. (corpus::impl::{get_archive, close_archive, write_tu_to_archive, read_to_translation_unit}): Remove these methods. * tests/test-bidiff.cc (main): Update for usage of the new xml_reader API. * tests/test-read-write.cc (main): Likewise. Update for the usage of the new xml_writer API, too. * tests/test-walker.cc (main): Update for the usage of the new xml_reader API. * tests/test-write-read-archive.cc (main): Likewise. And for the xml_writer API, too. * tools/biar.cc (add_tus_to_archive, extract_tus_from_archive): Likewise. * tools/bidiff.cc (main): Likewise, for xml_reader APIs. * tools/bilint.cc (main): Likewise, for xml_writer APIs, too. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
60 lines
1.6 KiB
C++
60 lines
1.6 KiB
C++
// -*- Mode: C++ -*-
|
|
//
|
|
// Copyright (C) 2013 Red Hat, Inc.
|
|
//
|
|
// This file is part of the GNU Application Binary Interface Generic
|
|
// Analysis and Instrumentation Library (libabigail). This library is
|
|
// free software; you can redistribute it and/or modify it under the
|
|
// terms of the GNU Lesser General Public License as published by the
|
|
// Free Software Foundation; either version 3, or (at your option) any
|
|
// later version.
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// General Lesser Public License for more details.
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
// License along with this program; see the file COPYING-LGPLV3. If
|
|
// not, see <http://www.gnu.org/licenses/>.
|
|
//
|
|
// Author: Dodji Seketeli
|
|
|
|
/// @file
|
|
///
|
|
/// This file contains the declarations of the entry points to
|
|
/// de-serialize an instance of @ref translation_unit to an ABI
|
|
/// Instrumentation file in libabigail native XML format.
|
|
|
|
#ifndef __ABG_WRITER_H__
|
|
#define __ABG_WRITER_H__
|
|
|
|
namespace abigail
|
|
{
|
|
namespace xml_writer
|
|
{
|
|
bool
|
|
write_translation_unit(const translation_unit& tu,
|
|
unsigned indent,
|
|
std::ostream& out);
|
|
|
|
bool
|
|
write_translation_unit(const translation_unit& tu,
|
|
unsigned indent,
|
|
const string& path);
|
|
|
|
bool
|
|
write_corpus_to_archive(const corpus& corp,
|
|
const string& path);
|
|
|
|
bool
|
|
write_corpus_to_archive(const corpus& corp);
|
|
|
|
bool
|
|
write_corpus_to_archive(const corpus_sptr corp);
|
|
|
|
}// end namespace xml_writer
|
|
}// end namespace abigail
|
|
|
|
#endif // __ABG_WRITER_H__
|