Go to the documentation of this file.
15#ifndef LIEF_ASM_X86_OPERAND_H
16#define LIEF_ASM_X86_OPERAND_H
38 class Iterator final :
41 public iterator_facade_base<Iterator, std::forward_iterator_tag, std::unique_ptr<Operand>,
42 std::ptrdiff_t, Operand*, std::unique_ptr<Operand>>
45 using implementation = details::OperandIt;
54 LIEF_API Iterator& operator=(Iterator&&) noexcept;
60 friend
LIEF_API bool operator==(const Iterator& LHS, const Iterator& RHS);
62 friend
bool operator!=(const Iterator& LHS, const Iterator& RHS) {
69 std::unique_ptr<details::OperandIt> impl_;
85 static_assert(std::is_base_of<Operand, T>::value,
86 "Require Operand inheritance");
87 if (T::classof(
this)) {
88 return static_cast<const T*
>(
this);
97 create(std::unique_ptr<details::Operand> impl);
98 LIEF_LOCAL const details::Operand& impl()
const {
101 assert(impl_ !=
nullptr);
107 assert(impl_ !=
nullptr);
117 LIEF_LOCAL Operand(std::unique_ptr<details::Operand> impl);
118 std::unique_ptr<details::Operand> impl_;
Iterator(Iterator &&) noexcept
Iterator(const Iterator &)
std::unique_ptr< Operand > operator*() const
Iterator(std::unique_ptr< details::OperandIt > impl)
Iterator & operator=(const Iterator &)
This class represents an operand for an x86/x86-64 instruction.
Definition x86/Operand.hpp:36
friend std::ostream & operator<<(std::ostream &os, const Operand &op)
Definition x86/Operand.hpp:111
std::string to_string() const
Pretty representation of the operand.
const T * as() const
This function can be used to down cast an Operand instance:
Definition x86/Operand.hpp:84
Definition x86/Operand.hpp:30
x86/x86-64 architecture-related namespace
Definition x86/Instruction.hpp:27
Namespace related to assembly/disassembly support.
Definition Abstract/Binary.hpp:43
LIEF namespace.
Definition Abstract/Binary.hpp:36
#define LIEF_API
Definition visibility.h:41
#define LIEF_LOCAL
Definition visibility.h:42