1#ifndef ROSE_BinaryAnalysis_RelativeVirtualAddress_H 
    2#define ROSE_BinaryAnalysis_RelativeVirtualAddress_H 
    3#include <featureTests.h> 
    4#ifdef ROSE_ENABLE_BINARY_ANALYSIS 
    5#include <Rose/BinaryAnalysis/Address.h> 
    7#include <ROSE_DEPRECATED.h> 
    8#include <Cxx_GrammarDeclarations.h> 
   10#include <Sawyer/Optional.h> 
   13namespace BinaryAnalysis {
 
   31#ifdef ROSE_ENABLE_BOOST_SERIALIZATION 
   33    friend class boost::serialization::access;
 
   36    void serialize(S &s, 
const unsigned ) {
 
   37        s & BOOST_SERIALIZATION_NVP(rva_);
 
   38        s & BOOST_SERIALIZATION_NVP(section_);
 
  120    bool is_bound() const ROSE_DEPRECATED("use 
isBound instead");
 
  121    Address get_rva() const ROSE_DEPRECATED("use 
rva instead");
 
  126    Address get_va() const ROSE_DEPRECATED("use 
va instead");
 
  129    std::
string to_string() const ROSE_DEPRECATED("use 
toString instead");
 
 
Optionally bound relative virtual address.
 
RelativeVirtualAddress(const Address rva, SgAsmGenericSection *=nullptr)
Conversion from numeric RVA.
 
static RelativeVirtualAddress sectionRelative(SgAsmGenericSection *, Address sectionOffset)
Constructs a new instance from a section and offset.
 
RelativeVirtualAddress(const RelativeVirtualAddress &)
Copy constructor.
 
Address rva() const
Returns the offset.
 
std::string toString() const
Convert to a string representation.
 
RelativeVirtualAddress & rva(Address rva)
Assign a new RVA without adjusting the bound section.
 
void increment(Address amount)
Increment the address by the specified amount, keeping it attached to the same (if any) section.
 
Sawyer::Optional< Address > va() const
Return the absolute address if known.
 
Address offsetFrom(SgAsmGenericSection *) const
Returns an offset relative to the specified section.
 
RelativeVirtualAddress & bindBestSection(SgAsmGenericHeader *)
Binds this RVA to the best available section from the specified file header.
 
bool isBound() const
Determines whether this instance is associated with a file section.
 
RelativeVirtualAddress & bindSection(SgAsmGenericSection *)
Changes the section binding.
 
Sawyer::Optional< Address > boundOffset() const
Returns an offset from the currently bound section.
 
RelativeVirtualAddress()
Create a zero RVA not linked to any section.
 
RelativeVirtualAddress operator=(const RelativeVirtualAddress &)
Assignment operator.
 
SgAsmGenericSection * boundSection() const
Returns the section to which this RVA is bound.
 
Holds a value or nothing.
 
Contiguous region of a file.
 
std::uint64_t Address
Address.