Tawara  0.1.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
tawara::FileCluster::IteratorBase< BlockType > Class Template Reference

#include <tawara/file_cluster.h>

Inheritance diagram for tawara::FileCluster::IteratorBase< BlockType >:
Inheritance graph
[legend]
Collaboration diagram for tawara::FileCluster::IteratorBase< BlockType >:
Collaboration graph
[legend]

Public Member Functions

 IteratorBase ()
 Base constructor. More...
 
 IteratorBase (FileCluster const *cluster, std::istream &stream, std::streampos pos)
 Base constructor. More...
 
template<typename OtherType >
 IteratorBase (IteratorBase< OtherType > const &other)
 Templated base constructor. More...
 

Protected Member Functions

void load_block (std::streampos pos)
 
void increment ()
 Increment the iterator to the next block. More...
 
template<typename OtherType >
bool equal (IteratorBase< OtherType > const &other) const
 Test for equality with another iterator. More...
 
BlockType & dereference () const
 Dereference the iterator to get a pointer to the block. More...
 

Protected Attributes

FileCluster const * cluster_
 
std::istream * stream_
 
boost::shared_ptr< BlockType > block_
 

Friends

class boost::iterator_core_access
 
class FileCluster
 

Detailed Description

template<typename BlockType>
class tawara::FileCluster::IteratorBase< BlockType >

Definition at line 81 of file file_cluster.h.

Constructor & Destructor Documentation

template<typename BlockType>
tawara::FileCluster::IteratorBase< BlockType >::IteratorBase ( )
inline

Base constructor.

Constructs an empty iterator.

Definition at line 94 of file file_cluster.h.

template<typename BlockType>
tawara::FileCluster::IteratorBase< BlockType >::IteratorBase ( FileCluster const *  cluster,
std::istream &  stream,
std::streampos  pos 
)
inline

Base constructor.

Parameters
[in]clusterThe cluster containing the blocks.
[in]streamThe stream to read blocks from.
[in]posThe position in the file of the first block to read.

Definition at line 106 of file file_cluster.h.

template<typename BlockType>
template<typename OtherType >
tawara::FileCluster::IteratorBase< BlockType >::IteratorBase ( IteratorBase< OtherType > const &  other)
inline

Templated base constructor.

Used to provide interoperability with compatible iterators.

Definition at line 120 of file file_cluster.h.

Member Function Documentation

template<typename BlockType>
BlockType& tawara::FileCluster::IteratorBase< BlockType >::dereference ( ) const
inlineprotected

Dereference the iterator to get a pointer to the block.

Definition at line 225 of file file_cluster.h.

template<typename BlockType>
template<typename OtherType >
bool tawara::FileCluster::IteratorBase< BlockType >::equal ( IteratorBase< OtherType > const &  other) const
inlineprotected

Test for equality with another iterator.

Parameters
[in]otherThe other iterator.

Definition at line 197 of file file_cluster.h.

template<typename BlockType>
void tawara::FileCluster::IteratorBase< BlockType >::increment ( )
inlineprotected

Increment the iterator to the next block.

Definition at line 182 of file file_cluster.h.

template<typename BlockType>
void tawara::FileCluster::IteratorBase< BlockType >::load_block ( std::streampos  pos)
inlineprotected

Definition at line 137 of file file_cluster.h.

Friends And Related Function Documentation

template<typename BlockType>
friend class boost::iterator_core_access
friend

Definition at line 128 of file file_cluster.h.

template<typename BlockType>
friend class FileCluster
friend

Definition at line 131 of file file_cluster.h.

Member Data Documentation

template<typename BlockType>
boost::shared_ptr<BlockType> tawara::FileCluster::IteratorBase< BlockType >::block_
protected

Definition at line 135 of file file_cluster.h.

template<typename BlockType>
FileCluster const* tawara::FileCluster::IteratorBase< BlockType >::cluster_
protected

Definition at line 133 of file file_cluster.h.

template<typename BlockType>
std::istream* tawara::FileCluster::IteratorBase< BlockType >::stream_
protected

Definition at line 134 of file file_cluster.h.


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