GTIRB  v2.1.0
GrammaTech Intermediate Representation for Binaries: C++ API
Public Member Functions | List of all members
gtirb::AddrRange Class Reference

A range of addresses. More...

#include <Addr.hpp>

Public Member Functions

constexpr AddrRange (Addr Lower, Addr Upper) noexcept
 Construct a range starting at Lower, extending up to, but not including, Upper. More...
 
constexpr AddrRange (Addr Lower, uint64_t Count) noexcept
 Construct a range starting at Lower and containing a total of Count addresses. More...
 
constexpr Addr lower () const noexcept
 Inclusive lower bound of the address range. More...
 
constexpr bool operator!= (const AddrRange &RHS) const noexcept
 Inequality operator for AddrRange. More...
 
constexpr bool operator== (const AddrRange &RHS) const noexcept
 Equality operator for AddrRange. More...
 
constexpr uint64_t size () const noexcept
 Number of addresses in the range. More...
 
constexpr Addr upper () const noexcept
 Exclusive upper bound of the address range. More...
 

Detailed Description

A range of addresses.

Constructor & Destructor Documentation

◆ AddrRange() [1/2]

constexpr gtirb::AddrRange::AddrRange ( Addr  Lower,
Addr  Upper 
)
inlineexplicitconstexprnoexcept

Construct a range starting at Lower, extending up to, but not including, Upper.

Ranges cannot have negative size, so AddrRange(Addr(20), Addr(10)) creates a range starting at Addr(20) with size 0.

Parameters
Lowerfirst address in the range.
Upperaddress after the last address contained in the range.

◆ AddrRange() [2/2]

constexpr gtirb::AddrRange::AddrRange ( Addr  Lower,
uint64_t  Count 
)
inlineexplicitconstexprnoexcept

Construct a range starting at Lower and containing a total of Count addresses.

Parameters
Lowerfirst address in the range.
Countnumber of addresses in the range.

Member Function Documentation

◆ lower()

constexpr Addr gtirb::AddrRange::lower ( ) const
inlineconstexprnoexcept

Inclusive lower bound of the address range.

◆ operator!=()

constexpr bool gtirb::AddrRange::operator!= ( const AddrRange RHS) const
inlineconstexprnoexcept

Inequality operator for AddrRange.

◆ operator==()

constexpr bool gtirb::AddrRange::operator== ( const AddrRange RHS) const
inlineconstexprnoexcept

Equality operator for AddrRange.

◆ size()

constexpr uint64_t gtirb::AddrRange::size ( ) const
inlineconstexprnoexcept

Number of addresses in the range.

◆ upper()

constexpr Addr gtirb::AddrRange::upper ( ) const
inlineconstexprnoexcept

Exclusive upper bound of the address range.


The documentation for this class was generated from the following file: