Public Member Functions | Protected Member Functions

H5::Attribute Class Reference

List of all members.

Public Member Functions

Protected Member Functions


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

Member Function Documentation

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

Closes this attribute.

Exceptions:
H5::AttributeIException 

Implements H5::IdComponent.

Referenced by p_setId(), and ~Attribute().

H5std_string H5::Attribute::getFileName (  )  const

Gets the name of the file, in which this attribute belongs.

Returns:
File name
Exceptions:
H5::IdComponentException 
size_t H5::Attribute::getInMemDataSize (  )  const [virtual]

Gets the size in memory of the attribute's data.

Returns:
Size of data (in memory)
Exceptions:
H5::AttributeIException 

Implements H5::AbstractDs.

H5std_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 
H5std_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 
ssize_t H5::Attribute::getName ( size_t  buf_size,
H5std_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 
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::p_setId ( const hid_t  new_id  )  [protected, virtual]

Sets the identifier of this object to a new value.

Exceptions:
H5::IdComponentException when the attempt to close the HDF5 object fails

Implements H5::IdComponent.

References close(), and H5::Exception::getDetailMsg().

void H5::Attribute::read ( const DataType mem_type,
H5std_string &  strg 
) const

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

Parameters:
mem_type - IN: Attribute datatype (in memory)
strg - IN: Buffer for read string
Exceptions:
H5::AttributeIException 
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::write ( const DataType mem_type,
const H5std_string &  strg 
) const

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

Parameters:
mem_type - IN: Attribute datatype (in memory)
strg - IN: Data to be written
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