DUDS
Distributed Update of Data from Something
duds::ui::graphics::BppImageArchiveFile Class Reference

Provides an input iterator to a sequence of named bit-per-pixel images read from an archive file. More...

#include <BppImageArchiveSequence.hpp>

Inheritance diagram for duds::ui::graphics::BppImageArchiveFile:
Collaboration diagram for duds::ui::graphics::BppImageArchiveFile:

Public Member Functions

 BppImageArchiveFile (const std::string &path)
 Opens the given file and parses headers at the start. More...
 
- Public Member Functions inherited from duds::ui::graphics::BppImageArchiveSequence
 BppImageArchiveSequence (std::istream &str)
 Constructs the sequence parser to use the stream str. More...
 
iterator begin ()
 Parses the first image in the stream and returns an iterator to that data. More...
 
void readHeader ()
 Parses the headers used in BppImageArchive files. More...
 

Private Attributes

std::ifstream inf
 The input file stream. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from duds::ui::graphics::BppImageArchiveSequence
static constexpr iterator end ()
 Returns the end iterator. More...
 
- Public Attributes inherited from duds::ui::graphics::BppImageArchiveSequence
friend iterator
 
- Protected Member Functions inherited from duds::ui::graphics::BppImageArchiveSequence
 BppImageArchiveSequence ()=default
 Only use when a derived class will set is. More...
 
- Protected Attributes inherited from duds::ui::graphics::BppImageArchiveSequence
std::pair< std::string, BppImageSptrderef
 Stores the last parsed image data. More...
 
std::istream * is
 The stream which contains image data. More...
 

Detailed Description

Provides an input iterator to a sequence of named bit-per-pixel images read from an archive file.

Unlike BppImageArchiveSequence, this requires the presence of a header at the start of the file stream. The readHeader() function should not be called when using this class.

Author
Jeff Jackowski

Definition at line 166 of file BppImageArchiveSequence.hpp.

Constructor & Destructor Documentation

◆ BppImageArchiveFile()

duds::ui::graphics::BppImageArchiveFile::BppImageArchiveFile ( const std::string &  path)

Opens the given file and parses headers at the start.

readHeader() is called within this function and must not be called again.

Postcondition
If an exception wasn't thrown, begin() may be called.
Parameters
pathThe path of the image archive file to open.
Exceptions
ImageNotArchiveStreamErrorThe stream does not have an image archive stream.
ImageArchiveStreamTruncatedErrorThe stream appears to have an incomplete copy of the archive stream. Any images fully read prior to the error will be available.
ImageArchiveUnsupportedVersionErrorThe software does not support the claimed archive version.

Definition at line 100 of file BppImageArchiveSequence.cpp.

Member Data Documentation

◆ inf

std::ifstream duds::ui::graphics::BppImageArchiveFile::inf
private

The input file stream.

Definition at line 170 of file BppImageArchiveSequence.hpp.


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