HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Examples

H5::Attribute Class Reference

#include <H5Attribute.h>

Inheritance diagram for H5::Attribute:

H5::AbstractDs H5::H5Object H5::IdComponent List of all members.

Public Member Functions

ssize_t getName (size_t buf_size, string &attr_name) const
 Gets the name of this attribute, returning its length.
string getName (size_t buf_size) const
 This is an overloaded member function, provided for convenience. It differs from the above function in that it returns the attribute's name, not the length.
string getName () const
 This is an overloaded member function, provided for convenience. It differs from the above functions in that it doesn't take any arguments and returns the attribute's name.
virtual DataSpace getSpace () const
 Gets a copy of the dataspace for this attribute.
virtual hsize_t getStorageSize () const
 Returns the amount of storage size required for this attribute.
void read (const DataType &mem_type, void *buf) const
 Reads data from this attribute.
void read (const DataType &mem_type, string &strg) const
 This is an overloaded member function, provided for convenience. It reads a std::string from this attribute.
void write (const DataType &mem_type, const void *buf) const
 Writes data to this attribute.
void write (const DataType &mem_type, const string &strg) const
 This is an overloaded member function, provided for convenience. It writes a std::string to this attribute.
virtual string fromClass () const
 Attribute (const hid_t attr_id)
 Creates an Attribute object using the id of an existing attribute.
 Attribute (const Attribute &original)
 Copy constructor: makes a copy of the original Attribute object.
 Attribute ()
 Default constructor: Creates a stub attribute.
virtual void close ()
 Closes this attribute.
virtual ~Attribute ()
 Properly terminates access to this attribute.

Constructor & Destructor Documentation

H5::Attribute::Attribute const hid_t  existing_id  ) 
 

Creates an Attribute object using the id of an existing attribute.

Parameters:
existing_id - IN: Id of an existing attribute
Exceptions:
H5::AttributeIException 

H5::Attribute::Attribute const Attribute original  ) 
 

Copy constructor: makes a copy of the original Attribute object.

Parameters:
original - IN: Original Attribute object to copy

H5::Attribute::Attribute  ) 
 

Default constructor: Creates a stub attribute.

H5::Attribute::~Attribute  )  [virtual]
 

Properly terminates access to this attribute.


Member Function Documentation

ssize_t H5::Attribute::getName size_t  buf_size,
string &  attr_name
const
 

Gets the name of this attribute, returning its length.

Parameters:
buf_size - IN: Desired length of the name
attr_name - OUT: Buffer for the name string
Returns:
Length of the attribute name
Exceptions:
H5::AttributeIException 

string H5::Attribute::getName size_t  buf_size  )  const
 

This is an overloaded member function, provided for convenience. It differs from the above function in that it returns the attribute's name, not the length.

Returns:
Name of the attribute
Parameters:
buf_size - IN: Desired length of the name
Exceptions:
H5::AttributeIException 

string H5::Attribute::getName  )  const
 

This is an overloaded member function, provided for convenience. It differs from the above functions in that it doesn't take any arguments and returns the attribute's name.

Returns:
Name of the attribute
Exceptions:
H5::AttributeIException 

DataSpace H5::Attribute::getSpace  )  const [virtual]
 

Gets a copy of the dataspace for this attribute.

Returns:
Dataspace instance
Exceptions:
H5::AttributeIException 

Implements H5::AbstractDs.

hsize_t H5::Attribute::getStorageSize  )  const [virtual]
 

Returns the amount of storage size required for this attribute.

Returns:
Size of the storage or 0, for no data
Exceptions:
H5::AttributeIException 

Implements H5::AbstractDs.

void H5::Attribute::read const DataType mem_type,
void *  buf
const
 

Reads data from this attribute.

Parameters:
mem_type - IN: Attribute datatype (in memory)
buf - OUT: Buffer for read data
Exceptions:
H5::AttributeIException 

void H5::Attribute::read const DataType mem_type,
string &  strg
const
 

This is an overloaded member function, provided for convenience. It reads a std::string from this attribute.

Parameters:
mem_type - IN: Attribute datatype (in memory)
strg - IN: Buffer for read string
Exceptions:
H5::AttributeIException 

void H5::Attribute::write const DataType mem_type,
const void *  buf
const
 

Writes data to this attribute.

Parameters:
mem_type - IN: Attribute datatype (in memory)
buf - IN: Data to be written
Exceptions:
H5::AttributeIException 

void H5::Attribute::write const DataType mem_type,
const string &  strg
const
 

This is an overloaded member function, provided for convenience. It writes a std::string to this attribute.

Parameters:
mem_type - IN: Attribute datatype (in memory)
strg - IN: Data to be written
Exceptions:
H5::AttributeIException 

virtual string H5::Attribute::fromClass  )  const [inline, virtual]
 

Reimplemented from H5::IdComponent.

void H5::Attribute::close  )  [virtual]
 

Closes this attribute.

Exceptions:
H5::AttributeIException 


Generated on Mon Oct 31 04:59:48 2005 by  doxygen 1.4.2