|
DUDS
|
Distributed Update of Data from Something
|
Provides an input iterator to a sequence of named bit-per-pixel images read from an input stream. More...
#include <BppImageArchiveSequence.hpp>
Classes | |
| class | iterator |
| An input iterator that will parse and supply image data from the stream. More... | |
Public Member Functions | |
| 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... | |
Static Public Member Functions | |
| static constexpr iterator | end () |
| Returns the end iterator. More... | |
Public Attributes | |
| friend | iterator |
Protected Member Functions | |
| BppImageArchiveSequence ()=default | |
| Only use when a derived class will set is. More... | |
Protected Attributes | |
| std::pair< std::string, BppImageSptr > | deref |
| Stores the last parsed image data. More... | |
| std::istream * | is |
| The stream which contains image data. More... | |
Provides an input iterator to a sequence of named bit-per-pixel images read from an input stream.
Definition at line 21 of file BppImageArchiveSequence.hpp.
|
protecteddefault |
Only use when a derived class will set is.
|
inline |
Constructs the sequence parser to use the stream str.
| str | The stream that will provide the image data. It must remain valid (useable object, not error-free) during the life span of this object. |
Definition at line 46 of file BppImageArchiveSequence.hpp.
| BppImageArchiveSequence::iterator duds::ui::graphics::BppImageArchiveSequence::begin | ( | ) |
Parses the first image in the stream and returns an iterator to that data.
This function must only be called once on a specific object. It does not parse any headers, like the one used for bit-per-pixel image archive files. To parse headers, call readHeaders() first.
| ImageArchiveStreamTruncatedError | The first image has incomplete data. |
Definition at line 16 of file BppImageArchiveSequence.cpp.
Referenced by duds::ui::graphics::BppImageArchive::load(), and duds::ui::graphics::BppFont::load().
|
inlinestatic |
Returns the end iterator.
Definition at line 140 of file BppImageArchiveSequence.hpp.
Referenced by duds::ui::graphics::BppImageArchive::load(), and duds::ui::graphics::BppFont::load().
| void duds::ui::graphics::BppImageArchiveSequence::readHeader | ( | ) |
Parses the headers used in BppImageArchive files.
The parsed data includes a version number that is currently ignored, but could be used in the future to allow the image data format to change.
| ImageNotArchiveStreamError | The stream does not have an image archive stream. |
| ImageArchiveStreamTruncatedError | The stream appears to have an incomplete copy of the archive stream. Any images fully read prior to the error will be available. |
| ImageArchiveUnsupportedVersionError | The software does not support the claimed archive version. |
Definition at line 74 of file BppImageArchiveSequence.cpp.
Referenced by duds::ui::graphics::BppImageArchiveFile::BppImageArchiveFile(), end(), duds::ui::graphics::BppImageArchive::load(), and duds::ui::graphics::BppFont::load().
|
protected |
Stores the last parsed image data.
It is placed here instead of the iterator to allow the iterator class to have a simple constructor, a trivial destructor, and only one small member. Without this, the end iterator cannot be a constexpr object.
Definition at line 34 of file BppImageArchiveSequence.hpp.
Referenced by duds::ui::graphics::BppImageArchiveSequence::iterator::image(), duds::ui::graphics::BppImageArchiveSequence::iterator::name(), duds::ui::graphics::BppImageArchiveSequence::iterator::operator*(), and duds::ui::graphics::BppImageArchiveSequence::iterator::operator->().
|
protected |
The stream which contains image data.
It might not be owned by this object.
Definition at line 27 of file BppImageArchiveSequence.hpp.
Referenced by duds::ui::graphics::BppImageArchiveFile::BppImageArchiveFile(), duds::ui::graphics::BppImageArchiveSequence::iterator::operator++(), and readHeader().
Definition at line 125 of file BppImageArchiveSequence.hpp.