mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-23 18:22:08 +00:00
7350cfd893
* include/abg-libxml-utils.h (new_reader_from_istream): Declare new public entry point. * src/abg-libxml-utils.cc (xml_istream_input_read) (xml_istream_input_close): New static functions. (new_reader_from_istream): Define new public input function. * include/abg-reader.h (read_translation_unit_from_istream): Declare new entry points. * src/abg-reader.cc (read_translation_unit_from_istream): Define new entry points. * tools/bilint.cc (options::{read_from_stdin, noout}): New members. (display_usage): Document --stdin and --noout. (parse_command_line): Adjust to consider that no option on the command line means reading from stdin, just like --stdin. Support the --noout option as well. (main): Support Read the abi instr from stdin; in that case, what was read is just serialized back to stdout, unless --noout was supplied. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
79 lines
2.0 KiB
C++
79 lines
2.0 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 from an ABI
|
|
/// Instrumentation file in libabigail native XML format.
|
|
|
|
#ifndef __ABG_READER_H__
|
|
#define __ABG_READER_H__
|
|
|
|
#include <istream>
|
|
#include "abg-corpus.h"
|
|
|
|
namespace abigail
|
|
{
|
|
class translation_unit;
|
|
|
|
namespace xml_reader
|
|
{
|
|
|
|
translation_unit_sptr
|
|
read_translation_unit_from_file(const std::string& file_path);
|
|
|
|
bool
|
|
read_translation_unit_from_file(const string& input_file,
|
|
translation_unit& tu);
|
|
|
|
bool
|
|
read_translation_unit_from_file(translation_unit& tu);
|
|
|
|
translation_unit_sptr
|
|
read_translation_unit_from_buffer(const std::string& file_path);
|
|
|
|
bool
|
|
read_translation_unit_from_buffer(const string& buffer,
|
|
translation_unit& tu);
|
|
|
|
bool
|
|
read_translation_unit_from_istream(std::istream* in,
|
|
translation_unit& tu);
|
|
|
|
translation_unit_sptr
|
|
read_translation_unit_from_istream(std::istream* in);
|
|
|
|
abigail::corpus_sptr
|
|
read_corpus_from_file(const string& path);
|
|
|
|
int
|
|
read_corpus_from_file(corpus& corp, const string& path);
|
|
|
|
int
|
|
read_corpus_from_file(corpus& corp);
|
|
|
|
}//end xml_reader
|
|
}//end namespace abigail
|
|
|
|
#endif // __ABG_READER_H__
|