h5cpp  0.6.1
A modern C++ wrapper for the HDF5 C library
hdf5::node::NodeView Class Reference

#include <node_view.hpp>

Inheritance diagram for hdf5::node::NodeView:
Collaboration diagram for hdf5::node::NodeView:

Public Types

using value_type = Node
 
using const_iterator = NodeIterator
 

Public Member Functions

 NodeView ()=delete
 
 NodeView (const NodeView &)=default
 
 NodeView (Group &node)
 
 ~NodeView () override
 
Node operator[] (size_t index) const
 
bool exists (const std::string &name, const property::LinkAccessList &lapl=property::LinkAccessList()) const
 checks existence of a node More...
 
Node operator[] (const std::string &name) const
 get object by name More...
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from hdf5::node::GroupView
 GroupView ()=delete
 
 GroupView (const GroupView &)=default
 
 GroupView (Group &parent_group)
 constructor More...
 
virtual ~GroupView ()
 
size_t size () const
 get number of links More...
 
const Groupgroup () const noexcept
 return reference to the parent group More...
 

Member Typedef Documentation

◆ const_iterator

◆ value_type

Constructor & Destructor Documentation

◆ NodeView() [1/3]

hdf5::node::NodeView::NodeView ( )
delete

◆ NodeView() [2/3]

hdf5::node::NodeView::NodeView ( const NodeView )
default

◆ NodeView() [3/3]

hdf5::node::NodeView::NodeView ( Group node)

◆ ~NodeView()

hdf5::node::NodeView::~NodeView ( )
override

Member Function Documentation

◆ begin()

const_iterator hdf5::node::NodeView::begin ( ) const

◆ end()

const_iterator hdf5::node::NodeView::end ( ) const

◆ exists()

bool hdf5::node::NodeView::exists ( const std::string &  name,
const property::LinkAccessList lapl = property::LinkAccessList() 
) const

The name must be a valid child name (not a path). This function checks whether a link of a particular name can be resolved into an object.

◆ operator[]() [1/2]

Node hdf5::node::NodeView::operator[] ( const std::string &  name) const

Here the index is the name of the child node. A name can contain any character but the '.', '..' and '/'. Thus, unlike in the C-API we cannot access object relative to the group a view belongs to but only its direct children. This emphasizes the notion of an associative container which is connected with a gruop.

Exceptions
std::runtime_errorin case of a failure
Parameters
namethe name of the child to access
Returns
instance of Node

◆ operator[]() [2/2]

Node hdf5::node::NodeView::operator[] ( size_t  index) const

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