LIEF: Library to Instrument Executable Formats Version 2.0.0
Loading...
Searching...
No Matches
SymbolVersionAux.hpp
Go to the documentation of this file.
1/* Copyright 2017 - 2026 R. Thomas
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15#ifndef LIEF_ELF_SYMBOL_VERSION_AUX_H
16#define LIEF_ELF_SYMBOL_VERSION_AUX_H
17
18#include <string_view>
19#include <ostream>
20#include <string>
21
22#include "LIEF/Object.hpp"
24#include "LIEF/visibility.h"
25
26
27namespace LIEF::ELF {
28class Parser;
29
32 friend class Parser;
33
34 public:
35 SymbolVersionAux(std::string name) :
36 name_(std::move(name)) {}
37 SymbolVersionAux() = default;
38 ~SymbolVersionAux() override = default;
39
42
44 std::string_view name() const LIEF_LIFETIMEBOUND {
45 return name_;
46 }
47
48 void name(std::string name) {
49 name_ = std::move(name);
50 }
51
52 void accept(Visitor& visitor) const override;
53
54 LIEF_API friend std::ostream& operator<<(std::ostream& os,
55 const SymbolVersionAux& aux) {
56 os << aux.name();
57 return os;
58 }
59
60 protected:
61 std::string name_;
62};
63
64}
65
66#endif
Class which parses and transforms an ELF file into a ELF::Binary object.
Definition ELF/Parser.hpp:46
~SymbolVersionAux() override=default
void name(std::string name)
Definition SymbolVersionAux.hpp:48
friend std::ostream & operator<<(std::ostream &os, const SymbolVersionAux &aux)
Definition SymbolVersionAux.hpp:54
SymbolVersionAux & operator=(const SymbolVersionAux &)=default
void accept(Visitor &visitor) const override
std::string_view name() const
Symbol's aux name (e.g. GLIBC_2.2.5).
Definition SymbolVersionAux.hpp:44
SymbolVersionAux(const SymbolVersionAux &)=default
friend class Parser
Definition SymbolVersionAux.hpp:32
SymbolVersionAux(std::string name)
Definition SymbolVersionAux.hpp:35
Definition Visitor.hpp:211
#define LIEF_LIFETIMEBOUND
Definition compiler_attributes.hpp:72
Namespace related to the LIEF's ELF module.
Definition Abstract/Header.hpp:27
#define LIEF_API
Definition visibility.h:44