apps/elftosb/common/DataSourceImager.h
/*
* File: DataSourceImager.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_DataSourceImager_h_)
#define _DataSourceImager_h_
#include "Blob.h"
#include "DataSource.h"
namespace elftosb
{
class DataSourceImager : public Blob
{
public:
DataSourceImager();
void setBaseAddress(uint32_t address);
void setFillPattern(uint8_t pattern);
void reset();
uint32_t getBaseAddress() { return m_baseAddress; }
void addDataSource(DataSource *source);
void addDataSegment(DataSource::Segment *segment);
protected:
uint8_t m_fill;
uint32_t m_baseAddress;
bool m_isBaseAddressSet;
};
};
#endif // _DataSourceImager_h_
elftosb::DataSource
Abstract base class for data sources.
Definition: apps/elftosb/common/DataSource.h:33
elftosb::DataSourceImager::DataSourceImager
DataSourceImager()
Constructor.
Definition: apps/elftosb/common/DataSourceImager.cpp:14
elftosb
Definition: BootImage.h:13
elftosb::DataSource::Segment
Discrete, contiguous part of the source&#39;s data.
Definition: apps/elftosb/common/DataSource.h:42
Blob
Manages a binary object of arbitrary length.
Definition: apps/elftosb/common/Blob.h:18
elftosb::DataSourceImager::addDataSource
void addDataSource(DataSource *source)
Adds all of the segments of which dataSource is composed.
Definition: apps/elftosb/common/DataSourceImager.cpp:44
elftosb::DataSourceImager::addDataSegment
void addDataSegment(DataSource::Segment *segment)
Adds the data from one data segment.
Definition: apps/elftosb/common/DataSourceImager.cpp:56
elftosb::DataSourceImager
Converts a DataSource into a single binary buffer.
Definition: apps/elftosb/common/DataSourceImager.h:18