mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-26 03:32:08 +00:00
0b8a16ef39
* include/abg-corpus.h (abigail::corpus::{translation_unit_sptr, translation_units): Do not define these typedefs here. Rather) (define them ... * include/abg-ir.h (abigail::{translation_units,translation_unit_sptr): ... here. This is because a translation unit can be manipulated independently from an abi corpus. * src/abg-corpus.cc (corpus::get_translation_units): Adjust return type to comply with the change above. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
78 lines
1.7 KiB
C++
78 lines
1.7 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/>.
|
|
|
|
/// @file
|
|
|
|
#ifndef __ABG_CORPUS_H__
|
|
#define __ABG_CORPUS_H__
|
|
|
|
#include <abg-ir.h>
|
|
|
|
namespace abigail
|
|
{
|
|
|
|
/// This is the abstraction of a set of translation units (themselves
|
|
/// seen as bundles of unitary abi artefacts like types and decls)
|
|
/// bundled together as a corpus. A corpus is thus the Application
|
|
/// binary interface of a program, a library or just a set of modules
|
|
/// put together.
|
|
class corpus
|
|
{
|
|
public:
|
|
struct impl;
|
|
typedef std::string string;
|
|
|
|
private:
|
|
shared_ptr<impl> m_priv;
|
|
|
|
corpus();
|
|
|
|
public:
|
|
|
|
corpus(const string&);
|
|
|
|
void
|
|
add(const translation_unit_sptr);
|
|
|
|
const translation_units&
|
|
get_translation_units() const;
|
|
|
|
void
|
|
drop_translation_units();
|
|
|
|
string&
|
|
get_path() const;
|
|
|
|
void
|
|
set_path(const string&);
|
|
|
|
bool
|
|
is_empty() const;
|
|
|
|
bool
|
|
write() const;
|
|
|
|
int
|
|
read();
|
|
|
|
};
|
|
}//end namespace abigail
|
|
#endif //__ABG_CORPUS_H__
|