154 explicit operator hid_t()
const
156 return static_cast<hid_t
>(handle_);
169 size_t to_buffer(T &data)
const;
185 size_t to_buffer_reshape(T &data,
224 size_t databytesize = signed2unsigned<unsigned long long>(mem_space.
size()) * mem_type.
size();
229 s = H5Fget_file_image(
static_cast<hid_t
>(*
this),
dataspace::ptr(data), databytesize);
237 std::stringstream ss;
238 ss<<
"Failure retrieving the image buffer to non-integer dataspace";
241 return static_cast<hsize_t
>(s);
Wrapper for hid_t object identifiers.
Definition: object_handle.hpp:67
Unique ID of an HDF5 object.
Definition: object_id.hpp:51
dataspace base class
Definition: dataspace.hpp:41
virtual hssize_t size() const
number of elements in the dataspace
data type object holder
Definition: factory.hpp:54
const Datatype & get(const T &v=T{})
factory holder method for getting reference of data types
Definition: factory.hpp:74
base class for all data types
Definition: datatype.hpp:42
Class get_class() const
returns the datatypes class
virtual size_t size() const
get size of type in bytes
static Singleton & instance()
reference to singleton
Definition: error.hpp:59
void throw_with_stack(const std::string &message)
throws an exception, potentially nested with error stack
ObjectId id() const
return a unique id for the file object
File()=default
default constructor
File & operator=(const File &)=default
size_t to_buffer(T &data) const
retrieve a copy of the image of an existing, open file
Definition: file.hpp:212
File(ObjectHandle &&handle)
constructor
File(File &&)=default
move constructor
size_t count_open_objects(SearchFlags flag) const
count number of open objects
AccessFlags intent() const
get access flags for the file
ssize_t buffer_size() const
get the buffer size in bytes
bool is_valid() const
check validity of the instance
void close()
close the file
size_t to_buffer_reshape(T &data, const datatype::Datatype &mem_type, const dataspace::Dataspace &mem_space) const
retrieve a copy of the image of an existing, open file
Definition: file.hpp:220
size_t size() const
get the file size in bytes
node::Group root(const property::GroupAccessList &gapl=property::GroupAccessList()) const
get root group
size_t count_open_objects(SearchFlagsBase flags) const
void flush(Scope scope) const
flush the file
fs::path path() const
get path on file system
File(const File &)=default
copy constructor
Definition: group_access.hpp:35
void * ptr(T &value)
Definition: type_trait.hpp:111
TypeTrait< T >::DataspaceType create(const T &value)
factory function for dataspaces
Definition: type_trait.hpp:89
@ Integer
indicates an integer type
Scope
file scope
Definition: types.hpp:118
AccessFlags
flags controlling file opening and creation
Definition: types.hpp:40
std::underlying_type< SearchFlags >::type SearchFlagsBase
Definition: types.hpp:102
SearchFlags
flags controlling object search in a file
Definition: types.hpp:92
top-level namespace of the entire library
Definition: attribute.hpp:45
#define DLL_EXPORT
Definition: windows.hpp:29