hdf5-1.8.15: Haskell interface to the HDF5 scientific data storage library.

Safe Haskell | None
Language | Haskell2010

Bindings.HDF5.Attribute

Description

Typesafe wrappers around HDF5 functions from the H5A API.

Feature coverage is as follows:

h5a_open h5a_close h5a_read

Synopsis

- data Attribute
- openAttribute :: ObjectId -> ByteString -> IO Attribute
- getAttributeType :: Attribute -> IO Datatype
- getAttributeInfo :: Attribute -> IO AttributeInfo
- getAttributeSpace :: Attribute -> IO Dataspace
- readAttribute :: NativeType t => Attribute -> IO (Vector t)
- readAttributeStringASCII :: Attribute -> IO ByteString
- doesAttributeExist :: ObjectId -> ByteString -> IO Bool
- closeAttribute :: Attribute -> IO ()
- iterateAttributes :: ObjectId -> IndexType -> IterOrder -> Maybe HSize -> (Group -> ByteString -> AttributeInfo -> IO HErr_t) -> IO HSize
- iterateAttributesByName :: ObjectId -> ByteString -> IndexType -> IterOrder -> Maybe HSize -> Maybe LAPL -> (Group -> ByteString -> AttributeInfo -> IO HErr_t) -> IO HSize

# Documentation

data Attribute Source #

#### Instances

Instances details

Eq Attribute Source # |
Instance details Defined in Bindings.HDF5.Attribute Methods (==) :: Attribute -> Attribute -> Bool Source # (/=) :: Attribute -> Attribute -> Bool Source #
HDFResultType Attribute Source # |
Instance details Defined in Bindings.HDF5.Attribute Methods isError :: Attribute -> Bool Source #
FromHId Attribute Source # |
Instance details Defined in Bindings.HDF5.Attribute Methods uncheckedFromHId :: HId_t -> Attribute Source #
HId Attribute Source # |
Instance details Defined in Bindings.HDF5.Attribute Methods hid :: Attribute -> HId_t Source #

openAttribute Source #

Arguments

:: ObjectId | Parent location
-> ByteString | Attribute name
-> IO Attribute | Resulting attribute

Open an existing attribute

getAttributeType :: Attribute -> IO Datatype Source #

getAttributeInfo :: Attribute -> IO AttributeInfo Source #

getAttributeSpace :: Attribute -> IO Dataspace Source #

readAttribute :: NativeType t => Attribute -> IO (Vector t) Source #

Read in data from an attribute

Parameters:

`attr_id :: HId_t`
  Attribute to read
`dtype_id :: HId_t`
  Memory datatype of buffer
`buf :: OutArray a`
  Buffer for data to read

Returns non-negative on success / negative on failure

This function reads a complete attribute from disk.

    herr_t  H5Aread(hid_t attr_id, hid_t type_id, void *buf);

readAttributeStringASCII :: Attribute -> IO ByteString Source #

for now this method read only Bytestring this part is a bit fragile... | we should check thaht the attr type is compatible with the string type. | TODO fnd a better way to deal with all kind of attribute type...

doesAttributeExist Source #

Arguments

:: ObjectId | Parent location
-> ByteString | Attribute name
-> IO Bool | Resulting attribute

closeAttribute :: Attribute -> IO () Source #

Close an Attribute

iterateAttributes :: ObjectId -> IndexType -> IterOrder -> Maybe HSize -> (Group -> ByteString -> AttributeInfo -> IO HErr_t) -> IO HSize Source #

iterateAttributesByName :: ObjectId -> ByteString -> IndexType -> IterOrder -> Maybe HSize -> Maybe LAPL -> (Group -> ByteString -> AttributeInfo -> IO HErr_t) -> IO HSize Source #