libabigail
Loading...
Searching...
No Matches
abg-config.cc
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2// -*- Mode: C++ -*-
3//
4// Copyright (C) 2013-2024 Red Hat, Inc.
5
6/// @file
7
8#include "abg-internal.h"
9// <headers defining libabigail's API go under here>
10ABG_BEGIN_EXPORT_DECLARATIONS
11
12#include "abg-config.h"
13#include "abg-version.h"
14
15ABG_END_EXPORT_DECLARATIONS
16// </headers defining libabigail's API>
17
18namespace abigail
19{
20config::config()
21 : m_format_minor(ABIGAIL_ABIXML_VERSION_MINOR),
22 m_format_major(ABIGAIL_ABIXML_VERSION_MAJOR),
23 m_xml_element_indent(2),
24 m_tu_instr_suffix(".bi"),
25 m_tu_instr_archive_suffix(".abi")
26{
27}
28
29const std::string&
30config::get_format_minor_version_number() const
31{return m_format_minor;}
32
33void
34config::set_format_minor_version_number(const std::string& v)
35{m_format_minor = v;}
36
37const std::string&
38config::get_format_major_version_number() const
39{return m_format_major;}
40
41void
42config::set_format_major_version_number(const std::string& v)
43{m_format_major= v;}
44
45unsigned
46config::get_xml_element_indent() const
47{ return m_xml_element_indent; }
48
49void
50config::set_xml_element_indent(unsigned indent)
51{m_xml_element_indent = indent;}
52
53const std::string&
54config::get_tu_instr_suffix() const
55{return m_tu_instr_suffix;}
56
57void
58config::set_tu_instr_suffix(const std::string& s)
59{m_tu_instr_suffix = s;}
60
61const std::string&
62config::get_tu_instr_archive_suffix() const
63{return m_tu_instr_archive_suffix;}
64
65void
66config::set_tu_instr_archive_suffix(const std::string& s)
67{m_tu_instr_archive_suffix = s; }
68
69extern "C"
70{
71/// Return the relevant version numbers of the library.
72///
73/// @param maj the major version number of the library.
74///
75/// @param min the minor version number of the library.
76///
77/// @param rev the revision version number of the library.
78///
79/// @param suf the version suffix of the library.
80void
81abigail_get_library_version(std::string& major,
82 std::string& minor,
83 std::string& revision,
84 std::string& suffix)
85{
86 major = ABIGAIL_VERSION_MAJOR;
87 minor = ABIGAIL_VERSION_MINOR;
88 revision = ABIGAIL_VERSION_REVISION;
89 suffix = ABIGAIL_VERSION_SUFFIX;
90}
91
92/// Return the version numbers for the ABIXML format.
93///
94/// @param maj the major version number of the ABIXML format.
95///
96/// @param min the minor version number of the ABIXML format.
97void
98abigail_get_abixml_version(std::string& major,
99 std::string& minor)
100{
101 major = ABIGAIL_ABIXML_VERSION_MAJOR;
102 minor = ABIGAIL_ABIXML_VERSION_MINOR;
103}
104
105}
106}//end namespace abigail
Toplevel namespace for libabigail.
void abigail_get_library_version(std::string &major, std::string &minor, std::string &revision, std::string &suffix)
Return the relevant version numbers of the library.
Definition abg-config.cc:81
void abigail_get_abixml_version(std::string &major, std::string &minor)
Return the version numbers for the ABIXML format.
Definition abg-config.cc:98