h5cpp  0.5.1
A modern C++ wrapper for the HDF5 C library
hdf5::file::MemoryDriver Class Reference

memory file driver More...

#include <memory_driver.hpp>

Inheritance diagram for hdf5::file::MemoryDriver:
Collaboration diagram for hdf5::file::MemoryDriver:

Public Member Functions

 MemoryDriver () noexcept
 default constructor More...
 
 MemoryDriver (size_t increment, bool backing_store) noexcept
 constructor More...
 
 MemoryDriver (const MemoryDriver &)=default
 copy constructor More...
 
bool backing_store () const noexcept
 get backing store status More...
 
void backing_store (bool value) noexcept
 set backing store status More...
 
size_t increment () const noexcept
 get increment value More...
 
void increment (size_t value)
 set increment More...
 
virtual void operator() (const property::FileAccessList &fapl) const override
 set a driver More...
 
virtual DriverID id () const noexcept override
 get driver ID More...
 
- Public Member Functions inherited from hdf5::file::Driver
virtual ~Driver ()
 

Additional Inherited Members

- Public Types inherited from hdf5::file::Driver
using UniquePointer = std::unique_ptr< Driver >
 unique pointer type More...
 

Detailed Description

Using this driver HDF5 writes the file not to disk but in memory which can reduce the overhead from disk IO. If backing_store option is enabled the file will be written to disk with the same file name used to create the file in memory.

Constructor & Destructor Documentation

◆ MemoryDriver() [1/3]

hdf5::file::MemoryDriver::MemoryDriver ( )
noexcept

Sets the increment to 1MByte and backing store to false.

◆ MemoryDriver() [2/3]

hdf5::file::MemoryDriver::MemoryDriver ( size_t  increment,
bool  backing_store 
)
noexcept
Parameters
incrementnumber of bytes used to increment the memory buffer if it runs out of storage
backing_storeenable disk storage after file close

◆ MemoryDriver() [3/3]

hdf5::file::MemoryDriver::MemoryDriver ( const MemoryDriver )
default

Use the default implementation here.

Member Function Documentation

◆ backing_store() [1/2]

bool hdf5::file::MemoryDriver::backing_store ( ) const
noexcept

◆ backing_store() [2/2]

void hdf5::file::MemoryDriver::backing_store ( bool  value)
noexcept

◆ id()

virtual DriverID hdf5::file::MemoryDriver::id ( ) const
overridevirtualnoexcept

Return the ID of a particular driver.

Implements hdf5::file::Driver.

◆ increment() [1/2]

size_t hdf5::file::MemoryDriver::increment ( ) const
noexcept

◆ increment() [2/2]

void hdf5::file::MemoryDriver::increment ( size_t  value)

◆ operator()()

virtual void hdf5::file::MemoryDriver::operator() ( const property::FileAccessList fapl) const
overridevirtual

Sets a driver to a particular file access property list.

Implements hdf5::file::Driver.


The documentation for this class was generated from the following file: