BootImageGenerator.h
/*
* File: BootImageGenerator.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_BootImageGenerator_h_)
#define _BootImageGenerator_h_
#include "OutputSection.h"
#include "BootImage.h"
#include "OptionContext.h"
namespace elftosb
{
class BootImageGenerator
{
public:
BootImageGenerator() {}
virtual ~BootImageGenerator() {}
void addOutputSection(OutputSection *section) { m_sections.push_back(section); }
void setOptionContext(OptionContext *context) { m_options = context; }
virtual BootImage *generate() = 0;
protected:
typedef std::vector<OutputSection *> section_vector_t;
section_vector_t m_sections;
OptionContext *m_options;
void processVersionOptions(BootImage *image);
void processDriveTagOption(BootImage *image);
};
}; // namespace elftosb
#endif // _BootImageGenerator_h_
elftosb::BootImageGenerator::~BootImageGenerator
virtual ~BootImageGenerator()
Destructor.
Definition: BootImageGenerator.h:39
elftosb::BootImageGenerator::processDriveTagOption
void processDriveTagOption(BootImage *image)
Handle the common option which sets the system drive tag.
Definition: BootImageGenerator.cpp:65
elftosb::BootImageGenerator::addOutputSection
void addOutputSection(OutputSection *section)
Add another section to the output.
Definition: BootImageGenerator.h:41
elftosb::BootImageGenerator::section_vector_t
std::vector< OutputSection * > section_vector_t
Type for a list of model output sections.
Definition: BootImageGenerator.h:49
elftosb::BootImageGenerator::m_sections
section_vector_t m_sections
Requested output sections.
Definition: BootImageGenerator.h:51
elftosb
Definition: BootImage.h:13
elftosb::OptionContext
Pure abstract interface class to a table of options.
Definition: apps/elftosb/common/OptionContext.h:18
elftosb::BootImageGenerator::m_options
OptionContext * m_options
Global option context.
Definition: BootImageGenerator.h:52
elftosb::BootImageGenerator::processVersionOptions
void processVersionOptions(BootImage *image)
Handle common product and component version options.
Definition: BootImageGenerator.cpp:23
elftosb::BootImageGenerator::setOptionContext
void setOptionContext(OptionContext *context)
Set the global option context.
Definition: BootImageGenerator.h:43
elftosb::BootImage
Abstract base class for all boot image format classes.
Definition: BootImage.h:25
elftosb::BootImageGenerator::generate
virtual BootImage * generate()=0
Pure virtual method to generate the output BootImage from input sections.
elftosb::BootImageGenerator
Abstract base class for generators of specific boot image formats.
Definition: BootImageGenerator.h:33
elftosb::BootImageGenerator::BootImageGenerator
BootImageGenerator()
Constructor.
Definition: BootImageGenerator.h:37
elftosb::OutputSection
Base class for data model of sections of the output file.
Definition: OutputSection.h:20