elftosb::NaturalDataTarget Class Reference

Target address that is the "natural" location of whatever the source data is. More...

`#include <DataTarget.h>`

Inheritance diagram for elftosb::NaturalDataTarget:
[legend]
Collaboration diagram for elftosb::NaturalDataTarget:
[legend]

## Public Member Functions

| NaturalDataTarget ()
| Default constructor.
virtual bool | isBounded ()
| Natural data targets are bounded by their source's segment lengths.
virtual DataTarget::AddressRange | getRangeForSegment (DataSource &source, DataSource::Segment &segment)
| Return the address range for a segment of a data source. More...
Public Member Functions inherited from elftosb::DataTarget
| DataTarget ()
| Default constructor.
virtual | ~DataTarget ()
| Destructor.
virtual uint32_t | getBeginAddress ()
virtual uint32_t | getEndAddress ()
void | setSource (DataSource *source)
DataSource * | getSource () const

## Additional Inherited Members

Protected Attributes inherited from elftosb::DataTarget
DataSource * | m_source
| Corresponding data source for this target.

## Detailed Description

Target address that is the "natural" location of whatever the source data is.

The data source used with the target must have a natural location. If getRangeForSegment() is called with a segment that does not have a natural location, a semantic_error will be thrown.

## Member Function Documentation

DataTarget::AddressRange NaturalDataTarget::getRangeForSegment | ( | DataSource & | source,
|  | DataSource::Segment & | segment
| ) |  |

virtual

Return the address range for a segment of a data source.

If the segment has a natural location, the returned address range extends from the segment's base address to its base address plus its length.

Exceptions

  elftosb::semantic_error | This exception is thrown if the segment does not have a natural location associated with it.

Implements elftosb::DataTarget.

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

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