11 #include <boost/noncopyable.hpp> 34 std::pair<std::string, BppImageSptr>
deref;
75 return (bias == i.
bias);
81 return (bias != i.
bias);
102 const std::pair<std::string, BppImageSptr> &
operator*()
const {
109 const std::pair<std::string, BppImageSptr> *
operator->()
const {
110 return &(bias->
deref);
115 const std::string &
name()
const {
116 return bias->
deref.first;
122 return bias->
deref.second;
std::ifstream inf
The input file stream.
iterator begin()
Parses the first image in the stream and returns an iterator to that data.
iterator operator++(int)
Post-increment operator; involves making a copy of this iterator.
std::pair< std::string, BppImageSptr > deref
Stores the last parsed image data.
iterator(BppImageArchiveSequence *parent)
Makes a new iterator, but does not prepare the BppImageArchiveSequence object to use the iterator...
An input iterator that will parse and supply image data from the stream.
static constexpr iterator end()
Returns the end iterator.
bool operator!=(const iterator &i) const
Inequality operator.
void readHeader()
Parses the headers used in BppImageArchive files.
Provides an input iterator to a sequence of named bit-per-pixel images read from an archive file...
std::shared_ptr< BppImage > BppImageSptr
const std::pair< std::string, BppImageSptr > & operator*() const
Provides a std::pair with the name of the image and the image itself.
BppImageArchiveSequence()=default
Only use when a derived class will set is.
std::istream * is
The stream which contains image data.
BppImageArchiveSequence(std::istream &str)
Constructs the sequence parser to use the stream str.
constexpr iterator()
Equivalent to the end iterator.
iterator & operator++()
Pre-increment operator; parses the next image.
Provides an input iterator to a sequence of named bit-per-pixel images read from an input stream...
bool operator==(const iterator &i) const
Equality operator.
const BppImageSptr & image() const
Returns the image.
General graphics related code.
const std::string & name() const
Returns the name of the image.
const std::pair< std::string, BppImageSptr > * operator->() const
Provides a pointer to a std::pair with the name of the image and the image itself.
BppImageArchiveSequence * bias
The object containing the data required for this iterator to work.