gem5  v20.1.0.0
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
BmpWriter Class Reference

#include <bmpwriter.hh>

Inheritance diagram for BmpWriter:
ImgWriter

Classes

struct  BmpPixel32
 
struct  CompleteV1Header
 
struct  FileHeader
 
struct  InfoHeaderV1
 

Public Member Functions

 BmpWriter (const FrameBuffer *fb)
 Create a bitmap that takes data in a given mode & size and outputs to an ostream. More...
 
 ~BmpWriter ()
 
const char * getImgExtension () const override
 
void write (std::ostream &bmp) const override
 Write the frame buffer data into the provided ostream. More...
 
- Public Member Functions inherited from ImgWriter
 ImgWriter (const FrameBuffer *_fb)
 
virtual ~ImgWriter ()
 

Private Types

typedef BmpPixel32 PixelType
 

Private Member Functions

const CompleteV1Header getCompleteHeader () const
 

Private Attributes

struct BmpWriter::FileHeader M5_ATTR_PACKED
 
struct BmpWriter::InfoHeaderV1 M5_ATTR_PACKED
 
struct BmpWriter::CompleteV1Header M5_ATTR_PACKED
 
struct BmpWriter::BmpPixel32 M5_ATTR_PACKED
 

Static Private Attributes

static const char * _imgExtension = "bmp"
 

Additional Inherited Members

- Protected Attributes inherited from ImgWriter
const FrameBufferfb
 

Detailed Description

Definition at line 51 of file bmpwriter.hh.

Member Typedef Documentation

◆ PixelType

Definition at line 120 of file bmpwriter.hh.

Constructor & Destructor Documentation

◆ BmpWriter()

BmpWriter::BmpWriter ( const FrameBuffer fb)

Create a bitmap that takes data in a given mode & size and outputs to an ostream.

Definition at line 47 of file bmpwriter.cc.

◆ ~BmpWriter()

BmpWriter::~BmpWriter ( )
inline

Definition at line 60 of file bmpwriter.hh.

Member Function Documentation

◆ getCompleteHeader()

const BmpWriter::CompleteV1Header BmpWriter::getCompleteHeader ( ) const
private

Definition at line 53 of file bmpwriter.cc.

References FrameBuffer::area(), ImgWriter::fb, header, FrameBuffer::height(), and FrameBuffer::width().

Referenced by write().

◆ getImgExtension()

const char* BmpWriter::getImgExtension ( ) const
inlineoverridevirtual

Implements ImgWriter.

Definition at line 67 of file bmpwriter.hh.

References _imgExtension.

◆ write()

void BmpWriter::write ( std::ostream &  bmp) const
overridevirtual

Write the frame buffer data into the provided ostream.

Parameters
bmpstream to write to

Implements ImgWriter.

Definition at line 86 of file bmpwriter.cc.

References ImgWriter::fb, getCompleteHeader(), header, FrameBuffer::height(), FrameBuffer::pixel(), FrameBuffer::width(), and RiscvISA::x.

Referenced by Pl111::dmaDone().

Member Data Documentation

◆ _imgExtension

const char * BmpWriter::_imgExtension = "bmp"
staticprivate

Definition at line 122 of file bmpwriter.hh.

Referenced by getImgExtension().

◆ M5_ATTR_PACKED [1/4]

struct BmpWriter::FileHeader BmpWriter::M5_ATTR_PACKED
private

◆ M5_ATTR_PACKED [2/4]

struct BmpWriter::InfoHeaderV1 BmpWriter::M5_ATTR_PACKED
private

◆ M5_ATTR_PACKED [3/4]

struct BmpWriter::CompleteV1Header BmpWriter::M5_ATTR_PACKED
private

◆ M5_ATTR_PACKED [4/4]

struct BmpWriter::BmpPixel32 BmpWriter::M5_ATTR_PACKED
private

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

Generated on Wed Sep 30 2020 14:02:22 for gem5 by doxygen 1.8.17