Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public 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:
Inheritance graph
[legend]
Collaboration diagram for Nektar::LibUtilities::H5::Attribute:
Collaboration graph
[legend]

Public Member Functions

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

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 Member Functions inherited from Nektar::LibUtilities::H5::Object
 Object ()
 
 Object (hid_t id)
 
virtual ~Object ()
 
- Protected Attributes inherited from Nektar::LibUtilities::H5::Object
hid_t m_Id
 

Detailed Description

HDF5 Attribute Wrapper.

Definition at line 402 of file H5.h.

Constructor & Destructor Documentation

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

Definition at line 537 of file H5.cpp.

References Close().

538 {
539  Close();
540 }
Nektar::LibUtilities::H5::Attribute::Attribute ( hid_t  id)
inlineprivate

Definition at line 410 of file H5.h.

Referenced by Create(), and Open().

410  : Object(id)
411  {
412  }

Member Function Documentation

void Nektar::LibUtilities::H5::Attribute::Close ( )
virtual

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

Definition at line 541 of file H5.cpp.

References H5_CALL.

Referenced by ~Attribute().

542 {
543  H5_CALL(H5Aclose, (m_Id));
544  m_Id = H5I_INVALID_HID;
545 }
#define H5_CALL(func, args)
Definition: H5.h:68
AttributeSharedPtr Nektar::LibUtilities::H5::Attribute::Create ( hid_t  parent,
const std::string &  name,
DataTypeSharedPtr  type,
DataSpaceSharedPtr  space 
)
staticprivate

Definition at line 520 of file H5.cpp.

References Attribute(), and H5_CONSTRUCT.

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

523 {
524  hid_t id;
525  H5_CONSTRUCT(id, H5Acreate2, (parent, name.c_str(), type->GetId(),
526  space->GetId(), H5P_DEFAULT, H5P_DEFAULT));
527  return AttributeSharedPtr(new Attribute(id));
528 }
#define H5_CONSTRUCT(ans, func, args)
Definition: H5.h:57
boost::shared_ptr< Attribute > AttributeSharedPtr
Definition: H5.h:92
DataSpaceSharedPtr Nektar::LibUtilities::H5::Attribute::GetSpace ( ) const

Definition at line 547 of file H5.cpp.

548 {
549  return DataSpaceSharedPtr(new DataSpace(H5Aget_space(m_Id)));
550 }
boost::shared_ptr< DataSpace > DataSpaceSharedPtr
Definition: H5.h:88
AttributeSharedPtr Nektar::LibUtilities::H5::Attribute::Open ( hid_t  parent,
const std::string &  name 
)
staticprivate

Definition at line 530 of file H5.cpp.

References Attribute(), and H5_CONSTRUCT.

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

531 {
532  hid_t id;
533  H5_CONSTRUCT(id, H5Aopen, (parent, name.c_str(), H5P_DEFAULT));
534  return AttributeSharedPtr(new Attribute(id));
535 }
#define H5_CONSTRUCT(ans, func, args)
Definition: H5.h:57
boost::shared_ptr< Attribute > AttributeSharedPtr
Definition: H5.h:92

Friends And Related Function Documentation

friend class CanHaveAttributes
friend

Definition at line 418 of file H5.h.