16#ifndef LIEF_ABSTRACT_FUNCTION_H
17#define LIEF_ABSTRACT_FUNCTION_H
88 flags_ = (
FLAGS)((uint32_t)flags_ | (uint32_t)f);
94 return ((uint32_t)flags_ & (uint32_t)f) != 0;
void address(uint64_t address)
Definition Abstract/Function.hpp:103
~Function() override=default
bool has(FLAGS f) const
Check if the function has the given flag.
Definition Abstract/Function.hpp:93
Function(const std::string &name, uint64_t address)
Definition Abstract/Function.hpp:65
void accept(Visitor &visitor) const override
std::vector< FLAGS > flags_list() const
List of FLAGS.
FLAGS
Flags used to characterize the semantics of the function.
Definition Abstract/Function.hpp:32
@ DESTRUCTOR
The function acts as a destructor.
Definition Abstract/Function.hpp:44
@ CONSTRUCTOR
The function acts as a constructor.
Definition Abstract/Function.hpp:38
@ NONE
Definition Abstract/Function.hpp:33
@ IMPORTED
The function is imported by the binary and the address() should return 0.
Definition Abstract/Function.hpp:54
@ EXPORTED
The function is exported by the binary and the address() method returns its virtual address in the bi...
Definition Abstract/Function.hpp:51
@ DEBUG_INFO
The function is associated with Debug information.
Definition Abstract/Function.hpp:47
Function(const std::string &name)
Definition Abstract/Function.hpp:59
FLAGS flags() const
Definition Abstract/Function.hpp:82
friend std::ostream & operator<<(std::ostream &os, const Function &entry)
Function(uint64_t address)
Definition Abstract/Function.hpp:62
Function(const Function &)=default
Function & operator=(const Function &)=default
Function(const std::string &name, uint64_t address, FLAGS flags)
Definition Abstract/Function.hpp:68
uint64_t address() const
Address of the current function. For functions that are set with the FLAGS::IMPORTED flag,...
Definition Abstract/Function.hpp:99
Function & add(FLAGS f)
Add a flag to the current function.
Definition Abstract/Function.hpp:87
virtual const std::string & name() const
Return the symbol's name.
Definition Abstract/Symbol.hpp:54
Definition Visitor.hpp:210
#define ENABLE_BITMASK_OPERATORS(X)
Definition enums.hpp:24
LIEF namespace.
Definition Abstract/Binary.hpp:40
const char * to_string(Binary::VA_TYPES e)
#define LIEF_API
Definition visibility.h:41