Nektar++
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Nektar::LibUtilities::H5TagWriter Class Reference

#include <FieldIOHdf5.h>

Inheritance diagram for Nektar::LibUtilities::H5TagWriter:
[legend]

Public Member Functions

 H5TagWriter (H5::GroupSharedPtr grp)
 Default constructor. More...
 
- Public Member Functions inherited from Nektar::LibUtilities::TagWriter
std::shared_ptr< TagWriterAddChild (const std::string &name)
 Create a child node. More...
 
void SetAttr (const std::string &key, const std::string &val)
 Set an attribute on the node. More...
 

Protected Member Functions

TagWriterSharedPtr v_AddChild (const std::string &name) override
 Add a child node. More...
 
void v_SetAttr (const std::string &key, const std::string &val) override
 Set an attribute key/value pair on this tag. More...
 
- Protected Member Functions inherited from Nektar::LibUtilities::TagWriter
virtual ~TagWriter ()
 
virtual std::shared_ptr< TagWriterv_AddChild (const std::string &name)=0
 
virtual void v_SetAttr (const std::string &key, const std::string &val)=0
 

Private Attributes

H5::GroupSharedPtr m_Group
 HDF5 group for this tag. More...
 

Detailed Description

Definition at line 91 of file FieldIOHdf5.h.

Constructor & Destructor Documentation

◆ H5TagWriter()

Nektar::LibUtilities::H5TagWriter::H5TagWriter ( H5::GroupSharedPtr  grp)
inline

Default constructor.

Definition at line 95 of file FieldIOHdf5.h.

95 : m_Group(grp)
96 {
97 }
H5::GroupSharedPtr m_Group
HDF5 group for this tag.
Definition: FieldIOHdf5.h:115

Referenced by v_AddChild().

Member Function Documentation

◆ v_AddChild()

TagWriterSharedPtr Nektar::LibUtilities::H5TagWriter::v_AddChild ( const std::string &  name)
inlineoverrideprotectedvirtual

Add a child node.

Implements Nektar::LibUtilities::TagWriter.

Definition at line 101 of file FieldIOHdf5.h.

102 {
103 H5::GroupSharedPtr child = m_Group->CreateGroup(name);
104 return TagWriterSharedPtr(new H5TagWriter(child));
105 }
H5TagWriter(H5::GroupSharedPtr grp)
Default constructor.
Definition: FieldIOHdf5.h:95
std::shared_ptr< Group > GroupSharedPtr
Definition: FieldIOHdf5.h:48
std::shared_ptr< TagWriter > TagWriterSharedPtr
Definition: FieldIO.h:78

References H5TagWriter(), m_Group, and CellMLToNektar.pycml::name.

◆ v_SetAttr()

void Nektar::LibUtilities::H5TagWriter::v_SetAttr ( const std::string &  key,
const std::string &  val 
)
inlineoverrideprotectedvirtual

Set an attribute key/value pair on this tag.

Implements Nektar::LibUtilities::TagWriter.

Definition at line 108 of file FieldIOHdf5.h.

109 {
110 m_Group->SetAttribute(key, val);
111 }

References m_Group.

Member Data Documentation

◆ m_Group

H5::GroupSharedPtr Nektar::LibUtilities::H5TagWriter::m_Group
private

HDF5 group for this tag.

Definition at line 115 of file FieldIOHdf5.h.

Referenced by v_AddChild(), and v_SetAttr().