Nektar++
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Friends | List of all members
Nektar::LibUtilities::H5::Attribute Class Reference

HDF5 Attribute Wrapper. More...

#include <H5.h>

Inheritance diagram for Nektar::LibUtilities::H5::Attribute:
[legend]

Public Member Functions

 ~Attribute () override
 
DataSpaceSharedPtr GetSpace () const
 
- Public Member Functions inherited from Nektar::LibUtilities::H5::Object
void Close ()
 
hid_t GetId () const
 
 operator hid_t () const
 

Protected Member Functions

void v_Close () override
 
- Protected Member Functions inherited from Nektar::LibUtilities::H5::Object
 Object ()
 
 Object (hid_t id)
 
virtual ~Object ()
 

Private Member Functions

 Attribute (hid_t id)
 

Static Private Member Functions

static AttributeSharedPtr Create (hid_t parent, const std::string &name, DataTypeSharedPtr type, DataSpaceSharedPtr space)
 
static AttributeSharedPtr Open (hid_t parent, const std::string &name)
 

Friends

class CanHaveAttributes
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::LibUtilities::H5::Object
hid_t m_Id
 

Detailed Description

HDF5 Attribute Wrapper.

Definition at line 453 of file H5.h.

Constructor & Destructor Documentation

◆ ~Attribute()

Nektar::LibUtilities::H5::Attribute::~Attribute ( )
override

Definition at line 620 of file H5.cpp.

621{
622 Close();
623}

References Nektar::LibUtilities::H5::Object::Close().

◆ Attribute()

Nektar::LibUtilities::H5::Attribute::Attribute ( hid_t  id)
inlineprivate

Definition at line 463 of file H5.h.

463 : Object(id)
464 {
465 }

Member Function Documentation

◆ Create()

AttributeSharedPtr Nektar::LibUtilities::H5::Attribute::Create ( hid_t  parent,
const std::string &  name,
DataTypeSharedPtr  type,
DataSpaceSharedPtr  space 
)
staticprivate

Definition at line 602 of file H5.cpp.

605{
606 hid_t id;
607 H5_CONSTRUCT(id, H5Acreate2,
608 (parent, name.c_str(), type->GetId(), space->GetId(),
609 H5P_DEFAULT, H5P_DEFAULT));
610 return AttributeSharedPtr(new Attribute(id));
611}
#define H5_CONSTRUCT(ans, func, args)
Definition H5.h:50
std::shared_ptr< Attribute > AttributeSharedPtr
Definition H5.h:82

References H5_CONSTRUCT.

Referenced by Nektar::LibUtilities::H5::CanHaveAttributes::CreateAttribute().

◆ GetSpace()

DataSpaceSharedPtr Nektar::LibUtilities::H5::Attribute::GetSpace ( ) const

Definition at line 630 of file H5.cpp.

631{
632 return DataSpaceSharedPtr(new DataSpace(H5Aget_space(m_Id)));
633}
std::shared_ptr< DataSpace > DataSpaceSharedPtr
Definition H5.h:78

References Nektar::LibUtilities::H5::Object::m_Id.

◆ Open()

AttributeSharedPtr Nektar::LibUtilities::H5::Attribute::Open ( hid_t  parent,
const std::string &  name 
)
staticprivate

Definition at line 613 of file H5.cpp.

614{
615 hid_t id;
616 H5_CONSTRUCT(id, H5Aopen, (parent, name.c_str(), H5P_DEFAULT));
617 return AttributeSharedPtr(new Attribute(id));
618}

References H5_CONSTRUCT.

Referenced by Nektar::LibUtilities::H5::CanHaveAttributes::OpenAttribute().

◆ v_Close()

void Nektar::LibUtilities::H5::Attribute::v_Close ( )
overrideprotectedvirtual

Implements Nektar::LibUtilities::H5::Object.

Definition at line 624 of file H5.cpp.

625{
626 H5_CALL(H5Aclose, (m_Id));
627 m_Id = H5I_INVALID_HID;
628}
#define H5_CALL(func, args)
Definition H5.h:58

References H5_CALL, and Nektar::LibUtilities::H5::Object::m_Id.

Friends And Related Symbol Documentation

◆ CanHaveAttributes

friend class CanHaveAttributes
friend

Definition at line 470 of file H5.h.