C++

Exceptions

class exception : public exception

Subclassed by LIEF::bad_file, LIEF::builder_error, LIEF::conversion_error, LIEF::corrupted, LIEF::integrity_error, LIEF::not_found, LIEF::not_implemented, LIEF::not_supported, LIEF::parser_error, LIEF::pe_error, LIEF::read_out_of_bound, LIEF::type_error

Public Functions

exception(const exception &other)
exception(const std::string &msg)
exception(const char *msg)
const char *what(void) const
~exception()
class bad_file : public LIEF::exception

Subclassed by LIEF::bad_format

class bad_format : public LIEF::bad_file
class not_implemented : public LIEF::exception
class not_supported : public LIEF::exception
class integrity_error : public LIEF::exception
class read_out_of_bound : public LIEF::exception

Public Functions

read_out_of_bound(uint64_t offset, uint64_t size)
read_out_of_bound(uint64_t offset)
class not_found : public LIEF::exception
class corrupted : public LIEF::exception
class conversion_error : public LIEF::exception
class type_error : public LIEF::exception
class builder_error : public LIEF::exception
class parser_error : public LIEF::exception
class pe_error : public LIEF::exception

Subclassed by LIEF::pe_bad_section_name

class pe_bad_section_name : public LIEF::pe_error

Iterators

template<class T, class ITERATOR_T = typename decay_t<T>::iterator>
class ref_iterator : public std::iterator<std::bidirectional_iterator_tag, decay_t<T>::value_type, ptrdiff_t, std::remove_pointer<decay_t<T>::value_type>::type *, std::remove_pointer<decay_t<T>::value_type>::type&>

Public Types

template<>
using container_type = T
template<>
using DT = decay_t<T>
template<>
using ref_t = typename ref_iterator::reference
template<>
using pointer_t = typename ref_iterator::pointer

Public Functions

ref_iterator(T container)
ref_iterator(const ref_iterator &copy)
ref_iterator operator=(ref_iterator other)
void swap(ref_iterator &other)
ref_iterator &operator++(void)
ref_iterator operator++(int)
ref_iterator &operator--(void)
ref_iterator operator--(int)
ref_iterator &operator+=(const typename ref_iterator::difference_type &movement)
ref_iterator &operator-=(const typename ref_iterator::difference_type &movement)
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator[](size_t n)
add_const_t<ref_t> operator[](size_t n) const
ref_iterator operator+(typename ref_iterator::difference_type n) const
ref_iterator operator-(typename ref_iterator::difference_type n) const
ref_iterator::difference_type operator-(const ref_iterator &rhs) const
bool operator<(const ref_iterator &rhs) const
bool operator>(const ref_iterator &rhs) const
bool operator>=(const ref_iterator &rhs) const
bool operator<=(const ref_iterator &rhs) const
ref_iterator begin(void) const
ref_iterator cbegin(void) const
ref_iterator end(void) const
ref_iterator cend(void) const
bool operator==(const ref_iterator &other) const
bool operator!=(const ref_iterator &other) const
size_t size(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator*()
template<typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
template<typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type operator->()
add_const_t<pointer_t> operator->() const

Warning

doxygenclass: Cannot find class “LIEF::const_ref_iterator” in doxygen xml output for project “lief” from directory: /tmp/LIEF/LIEF/build/doc/doxygen/xml

template<class T, class ITERATOR_T = typename decay_t<T>::iterator>
class filter_iterator : public std::iterator<std::forward_iterator_tag, decay_t<T>::value_type, ptrdiff_t, std::remove_pointer<decay_t<T>::value_type>::type *, std::remove_pointer<decay_t<T>::value_type>::type&>

Public Types

template<>
using container_type = T
template<>
using DT = decay_t<T>
template<>
using ref_t = typename filter_iterator::reference
template<>
using pointer_t = typename filter_iterator::pointer
template<>
using filter_t = std::function<bool(const typename DT::value_type&)>

Public Functions

filter_iterator(T container, filter_t filter)
filter_iterator(T container, const std::vector<filter_t> &filters)
filter_iterator(T container)
filter_iterator(const filter_iterator &copy)
filter_iterator operator=(filter_iterator other)
void swap(filter_iterator &other)
filter_iterator &def(filter_t func)
filter_iterator &operator++()
filter_iterator operator++(int)
filter_iterator begin(void) const
filter_iterator cbegin(void) const
filter_iterator end(void) const
filter_iterator cend(void) const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator*()
template<typename U = typename DT::value_type>
std::enable_if<std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
template<typename U = typename DT::value_type>
std::enable_if<not std::is_pointer<U>::value, add_const_t<ref_t>>::type operator*() const
std::enable_if<not std::is_const<ref_t>::value, remove_const_t<ref_t>>::type operator[](size_t n)
add_const_t<ref_t> operator[](size_t n) const
std::enable_if<not std::is_const<pointer_t>::value, pointer_t>::type operator->()
add_const_t<pointer_t> operator->() const
size_t size(void) const
bool operator==(const filter_iterator &other) const
bool operator!=(const filter_iterator &other) const

Warning

doxygenclass: Cannot find class “LIEF::const_filter_iterator” in doxygen xml output for project “lief” from directory: /tmp/LIEF/LIEF/build/doc/doxygen/xml

Logging

class Logger

Public Functions

Logger(void)
Logger(const Logger&)
Logger &operator=(const Logger&)
~Logger(void)

Public Static Functions

void disable(void)

Disable the logging module.

void enable(void)

Enable the logging module.

void set_level(LOGGING_LEVEL level)

Change the logging level (hierarchical)

void set_verbose_level(uint32_t level)

Change the verbose level.

Logging levels

enum LIEF::LOGGING_LEVEL

Hierarchical logging level

From a given level set, all levels below this level are enabled

For example, if LOG_FATAL is enabled then LOG_ERROR, LOG_WARNING are also enabled

Values:

LOG_GLOBAL = 1
LOG_TRACE = 2
LOG_DEBUG = 4
LOG_FATAL = 8
LOG_ERROR = 16
LOG_WARNING = 32
LOG_INFO = 64
LOG_VERBOSE = 128
LOG_UNKNOWN = 1010