ome-files  0.5.0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ome::files::tiff::IFDIterator< Value > Class Template Reference

Iterator for IFDs contained within a TIFF. More...

#include <ome/files/tiff/TIFF.h>

+ Inheritance diagram for ome::files::tiff::IFDIterator< Value >:
+ Collaboration diagram for ome::files::tiff::IFDIterator< Value >:

Public Member Functions

 IFDIterator ()
 Default constructor. More...
 
 IFDIterator (std::shared_ptr< IFD > &ifd)
 Construct with an initial starting position. More...
 
template<class OtherValue >
 IFDIterator (const IFDIterator< OtherValue > &rhs)
 Construct from an existing iterator. More...
 

Private Member Functions

void increment ()
 Increment the iterator by one position. More...
 
bool equal (IFDIterator const &rhs) const
 Check for equality. More...
 
std::shared_ptr< Value > & dereference () const
 Dereference the iterator. More...
 
template<>
void increment ()
 Increment the iterator by one position. More...
 
template<>
void increment ()
 Increment the iterator by one position. More...
 

Private Attributes

std::shared_ptr< Valuepos
 The current position. More...
 

Friends

class boost::iterator_core_access
 IFD iterator internals uses internal TIFF state.
 
template<class >
class IFDIterator
 IFD iterator uses internal TIFF state.
 

Detailed Description

template<typename Value>
class ome::files::tiff::IFDIterator< Value >

Iterator for IFDs contained within a TIFF.

Constructor & Destructor Documentation

◆ IFDIterator() [1/3]

template<typename Value>
ome::files::tiff::IFDIterator< Value >::IFDIterator ( )
inline

Default constructor.

The position will be null.

◆ IFDIterator() [2/3]

template<typename Value>
ome::files::tiff::IFDIterator< Value >::IFDIterator ( std::shared_ptr< IFD > &  ifd)
inline

Construct with an initial starting position.

The position will be the provided descriptor.

Parameters
ifdthe descriptor to point to.

◆ IFDIterator() [3/3]

template<typename Value>
template<class OtherValue >
ome::files::tiff::IFDIterator< Value >::IFDIterator ( const IFDIterator< OtherValue > &  rhs)
inline

Construct from an existing iterator.

Parameters
rhsthe iterator to copy.

Member Function Documentation

◆ dereference()

template<typename Value>
std::shared_ptr<Value>& ome::files::tiff::IFDIterator< Value >::dereference ( ) const
inlineprivate

Dereference the iterator.

Returns
a reference to currently referenced descriptor.

References ome::files::tiff::IFDIterator< Value >::pos.

◆ equal()

template<typename Value>
bool ome::files::tiff::IFDIterator< Value >::equal ( IFDIterator< Value > const &  rhs) const
inlineprivate

Check for equality.

Parameters
rhsthe iterator to compare.
Returns
true if equal, false otherwise.

References ome::files::tiff::IFDIterator< Value >::pos.

◆ increment() [1/3]

template<>
void ome::files::tiff::IFDIterator< IFD >::increment ( )
private

Increment the iterator by one position.

Note
This isn't inlined because it requires access to the IFD declarations, which can't be included here to avoid dependency loops.

◆ increment() [2/3]

template<>
void ome::files::tiff::IFDIterator< const IFD >::increment ( )
private

Increment the iterator by one position.

Note
This isn't inlined because it requires access to the IFD declarations, which can't be included here to avoid dependency loops.

◆ increment() [3/3]

template<typename Value>
void ome::files::tiff::IFDIterator< Value >::increment ( )
private

Increment the iterator by one position.

Note
This isn't inlined because it requires access to the IFD declarations, which can't be included here to avoid dependency loops.

Member Data Documentation

◆ pos

template<typename Value>
std::shared_ptr<Value> ome::files::tiff::IFDIterator< Value >::pos
mutableprivate

The current position.

It's mutable to allow const and non-const access to the underlying descriptor via const and non-const iterators.

Referenced by ome::files::tiff::IFDIterator< Value >::dereference(), and ome::files::tiff::IFDIterator< Value >::equal().


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