Safe Haskell | Safe-Inferred |
---|---|
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
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...
Arguments
:: ObjectId | Parent location |
-> ByteString | Attribute name |
-> IO Bool | Resulting attribute |
closeAttribute :: Attribute -> IO () Source #
Close an Attribute