StExecutableImage::AddressFilter Struct Reference

`#include <StExecutableImage.h>`

## Public Member Functions

| AddressFilter (AddressFilterAction action, uint32_t from, uint32_t to, unsigned priority=0)
| Constructor.
bool | matchesMemoryRegion (const MemoryRegion &region) const
| Test routine. More...
int | compare (const AddressFilter &other) const
| Compares two address filter objects. More...
| AddressFilter (AddressFilterAction action, uint32_t from, uint32_t to, unsigned priority=0)
| Constructor.
bool | matchesMemoryRegion (const MemoryRegion &region) const
| Test routine.
int | compare (const AddressFilter &other) const
| Compares two address filter objects.
Comparison operators
bool | operator< (const AddressFilter &other) const
bool | operator> (const AddressFilter &other) const
bool | operator== (const AddressFilter &other) const
bool | operator<= (const AddressFilter &other) const
bool | operator>= (const AddressFilter &other) const
bool | operator< (const AddressFilter &other) const
bool | operator> (const AddressFilter &other) const
bool | operator== (const AddressFilter &other) const
bool | operator<= (const AddressFilter &other) const
bool | operator>= (const AddressFilter &other) const

## Public Attributes

AddressFilterAction | m_action
| Action to be performed when the filter is matched.
uint32_t | m_fromAddress
| Start address of the filter. Should be lower than or equal to m_toAddress.
uint32_t | m_toAddress
| End address of the filter. Should be higher than or equal to m_fromAddress.
unsigned | m_priority
| Priority for this filter. Zero is the lowest priority.

## Detailed Description

An address filter consists of a single address range and an action. If a memory region overlaps the filter's range then the action will be performed. The possible filter actions are defined by the AddressFilterAction enumeration.

## Member Function Documentation

int StExecutableImage::AddressFilter::compare | ( | const AddressFilter & | other | ) | const

Compares two address filter objects.

The comparison does not take the action into account. It only looks at the priority and address ranges of each filter. Priority is considered only if the two filters overlap. Lower priority filters will come after higher priority ones.

Return values

  -1 | This filter is less than filter b.
  0 | This filter is equal to filter b.
  1 | This filter is greater than filter b.

bool StExecutableImage::AddressFilter::matchesMemoryRegion | ( | const MemoryRegion & | region | ) | const

Test routine.

Returns true if the address filter overlaps region.

The documentation for this struct was generated from the following files:

- apps/elftosb/common/StExecutableImage.h
- apps/elftosb/common/StExecutableImage.cpp