useDynLib(h5mread)

import(methods)
importFrom(stats, setNames)
importFrom(tools, file_path_as_absolute)

### We import rhdf5filters only for the side effect of setting system
### environment variable HDF5_PLUGIN_PATH to rhdf5filters::hdf5_plugin_path().
### This is done by rhdf5filters:::.onLoad(). The only filter we actually
### care about at the moment is LZF.
import(rhdf5filters)
import(rhdf5)
import(BiocGenerics)
import(S4Vectors)
import(IRanges)
import(S4Arrays)
import(SparseArray)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 classes
###

exportClasses(
    H5FileID, H5File, character_OR_H5File,
    H5DSetDescriptor
)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S3 methods
###

S3method(close, H5FileID)
S3method(close, H5File)

S3method(open, H5FileID)
S3method(open, H5File)

### We also export them thru the export() directive so that (a) they can be
### called directly, (b) tab-completion on the name of the generic shows them,
### and (c) methods() doesn't asterisk them.

export(
    close.H5FileID,
    close.H5File,

    open.H5FileID,
    open.H5File
)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export S4 methods for generics not defined in h5mread
###

exportMethods(
    ## Methods for generics defined in the methods package:
    show,

    ## Methods for generics defined in the BiocGenerics package:
    path
)


### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Export non-generic functions
###

export(
    ## h5dim.R:
    h5exists, h5isdataset, h5isgroup, dim_as_integer, h5dim, h5chunkdim,

    ## H5File-class.R:
    H5FileID, H5File,

    ## h5ls.R:
    h5ls,

    ## H5DSetDescriptor-class.R:
    H5DSetDescriptor, destroy_H5DSetDescriptor,

    ## h5mread.R:
    get_h5mread_returned_type, h5mread,

    ## h5mread_from_reshaped.R:
    find_dims_to_collapse, h5mread_from_reshaped,

    ## h5writeDimnames.R:
    set_h5dimnames, get_h5dimnames, validate_lengths_of_h5dimnames,
    h5writeDimnames, h5readDimnames
)

