h5cpp  0.5.0
A modern C++ wrapper for the HDF5 C library
hdf5::node::RecursiveLinkIterator Class Reference

recursive Link iterator More...

#include <recursive_link_iterator.hpp>

Public Types

using value_type = Link
 
using pointer = value_type *
 
using reference = value_type &
 
using difference_type = ssize_t
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 RecursiveLinkIterator ()=delete
 default constructor More...
 
Link operator* () const
 
Linkoperator-> ()
 
RecursiveLinkIteratoroperator++ ()
 
RecursiveLinkIterator operator++ (int)
 
bool operator== (const RecursiveLinkIterator &rhs) const
 
bool operator!= (const RecursiveLinkIterator &rhs) const
 

Static Public Member Functions

static RecursiveLinkIterator begin (const Group &current_group)
 create iterator to the first element More...
 
static RecursiveLinkIterator end (const Group &current_group)
 create iterator to the last+1 element More...
 

Detailed Description

Iterator which recursively iterates over all Links of a particular group. All relevant constructors are private. To construct an instance of this iterator use the two static factory functions begin() and end().

Group top = ...;
while(iter != end)
{
//do something here
++iter;
}
// or with STL
std::for_each(RecursiveLinkIterator::begin(top),
[](const Link &link) { ...do something ... ; });

Unlike LinkIterator, RecursiveLinkIterator is a simple forward iterator.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

using hdf5::node::RecursiveLinkIterator::iterator_category = std::forward_iterator_tag

◆ pointer

◆ reference

◆ value_type

Constructor & Destructor Documentation

◆ RecursiveLinkIterator()

hdf5::node::RecursiveLinkIterator::RecursiveLinkIterator ( )
delete

There is no default constructors -> would not make too much sense.

Member Function Documentation

◆ begin()

static RecursiveLinkIterator hdf5::node::RecursiveLinkIterator::begin ( const Group current_group)
static

Static factory function returning an instance of RecursiveLinkIterator on the first element of the top group.

Parameters
current_groupthe top level group where to start with recursive iteration
Returns
instance of RecursiveLinkIterator

◆ end()

static RecursiveLinkIterator hdf5::node::RecursiveLinkIterator::end ( const Group current_group)
static

Static factory function returning an instance of RecursiveLinkIterator on the last+1 element of top group.

Parameters
current_groupthe top level group at which to start the recursive iteration.
Returns
instance of RecursiveLinkIterator

◆ operator!=()

bool hdf5::node::RecursiveLinkIterator::operator!= ( const RecursiveLinkIterator rhs) const

◆ operator*()

Link hdf5::node::RecursiveLinkIterator::operator* ( ) const

◆ operator++() [1/2]

RecursiveLinkIterator& hdf5::node::RecursiveLinkIterator::operator++ ( )

◆ operator++() [2/2]

RecursiveLinkIterator hdf5::node::RecursiveLinkIterator::operator++ ( int  )

◆ operator->()

Link* hdf5::node::RecursiveLinkIterator::operator-> ( )

◆ operator==()

bool hdf5::node::RecursiveLinkIterator::operator== ( const RecursiveLinkIterator rhs) const

The documentation for this class was generated from the following file:
hdf5::node::RecursiveLinkIterator::begin
static RecursiveLinkIterator begin(const Group &current_group)
create iterator to the first element
hdf5::node::RecursiveLinkIterator::end
static RecursiveLinkIterator end(const Group &current_group)
create iterator to the last+1 element
hdf5::file::SearchFlags::Group
@ Group
hdf5::node::link
void link(const Node &target, const Group &link_base, const Path &link_path, const property::LinkCreationList &lcpl=property::LinkCreationList(), const property::LinkAccessList &lapl=property::LinkAccessList())
Create a soft or external link.