4 * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
5 * See included license file for license details.
7 #if !defined(_BootImage_h_)
17 * \brief Abstract base class for all boot image format classes.
19 * Provides virtual methods for all of the common features between different
20 * boot image formats. These are the product and component version numbers
23 * Also provided is the virtual method writeToStream() that lets the caller
24 * stream out the boot image without knowing the underlying format type.
29 //! \brief Constructor.
32 //! \brief Destructor.
33 virtual ~BootImage() {}
37 virtual void setProductVersion(const version_t & version)=0;
38 virtual void setComponentVersion(const version_t & version)=0;
41 //! \brief Specify the drive tag to be set in the output file header.
42 virtual void setDriveTag(uint16_t tag)=0;
44 //! \brief Returns a string containing the preferred file extension for image format.
45 virtual std::string getFileExtension() const=0;
47 //! \brief Write the boot image to an output stream.
48 virtual void writeToStream(std::ostream & stream)=0;
51 }; // namespace elftosb
53 #endif // _BootImage_h_