libpressio 0.93.0
|
a generic io interface for libpressio More...
#include <stddef.h>
Go to the source code of this file.
a generic io interface for libpressio
struct pressio_io * pressio_get_io | ( | struct pressio * | library, |
const char * | io_module | ||
) |
[in] | library | the name of the io module |
[in] | io_module | the name of the io module |
int pressio_io_check_options | ( | struct pressio_io * | io, |
struct pressio_options const * | options | ||
) |
Validates that only defined options have been set. This can be useful for programmer errors. This function should NOT be used with any option structure which contains options for multiple io modules. Other checks MAY be preformed implementing io modules.
[in] | io | which io to validate the options struct against |
[in] | options | which options set to check against. It should ONLY contain options returned by pressio_io_get_options |
struct pressio_io * pressio_io_clone | ( | struct pressio_io * | io | ) |
Creates a new reference to an io module with the same configuration
[in] | io | the io module to clone |
int pressio_io_error_code | ( | struct pressio_io const * | io | ) |
[in] | io | the io module to query |
const char * pressio_io_error_msg | ( | struct pressio_io const * | io | ) |
[in] | io | the io module to query |
void pressio_io_free | ( | struct pressio_io * | io | ) |
[in] | io | deallocates a reference to a io module. |
struct pressio_options * pressio_io_get_configuration | ( | struct pressio_io const * | io | ) |
[in] | io | which io to get compile-time configuration for |
struct pressio_options * pressio_io_get_documentation | ( | struct pressio_io const * | io | ) |
[in] | io | which io to get documentation for |
const char * pressio_io_get_name | ( | struct pressio_io const * | io | ) |
Get the name of a io
[in] | io | the io to get the name of |
struct pressio_options * pressio_io_get_options | ( | struct pressio_io const * | io | ) |
[in] | io | which io to get options for |
int pressio_io_major_version | ( | struct pressio_io const * | io | ) |
[in] | io | the io module to query |
int pressio_io_minor_version | ( | struct pressio_io const * | io | ) |
[in] | io | the io module to query |
int pressio_io_patch_version | ( | struct pressio_io const * | io | ) |
[in] | io | the io module to query |
struct pressio_data * pressio_io_read | ( | struct pressio_io * | io, |
struct pressio_data * | data | ||
) |
reads a pressio_data buffer from some persistent storage
[in] | io | the object to preform the read |
[in] | data | data object to populate, or nullptr to allocate it from the file if supported by the plugin. Data passed to this call should be considered "moved" in a c++11 sense. |
int pressio_io_read_many | ( | struct pressio_io * | io, |
struct pressio_data ** | data_begin, | ||
size_t | num_data | ||
) |
read multiple buffers
[in] | io | the io to use to read |
[in,out] | data_begin | pointer to an array of data objects, these can be nullptr on input and are replaced with the read data |
[in] | num_data | the number of buffers to write |
void pressio_io_set_name | ( | struct pressio_io * | io, |
const char * | new_name | ||
) |
Assign a new name to a io. Names are used to prefix options in meta-ios.
sub-ios will be renamed either by the of the sub-ios prefix or by the $prefix:name configuration option
i.e. for some new_name and a io with prefix foo and subios with prefixs "abc", "def", "ghi" respectively
[in] | io | the io to get the name of |
[in] | new_name | the name to set |
int pressio_io_set_options | ( | struct pressio_io * | io, |
struct pressio_options const * | options | ||
) |
sets the options for the pressio_io. io modules MAY choose to ignore some subset of options passed in if there valid but conflicting settings (i.e. two settings that adjust the same underlying configuration). io modules SHOULD return an error value if configuration failed due to a missing required setting or an invalid one. Users MAY call pressio_io_error_msg() to get more information about the warnings or errors io modules MUST ignore any and all options set that they do not support.
[in] | io | which io to get options for |
[in] | options | the options to set |
const char * pressio_io_version | ( | struct pressio_io const * | io | ) |
Get the version and feature information. The version string may include more information than major/minor/patch provide.
[in] | io | the io to query |
int pressio_io_write | ( | struct pressio_io * | io, |
struct pressio_data const * | data | ||
) |
write a pressio_data buffer from some persistent storage
[in] | io | the object to preform the write |
[in] | data | data object to write |
int pressio_io_write_many | ( | struct pressio_io * | io, |
const struct pressio_data ** | data_begin, | ||
size_t | num_data | ||
) |
write multiple buffers
[in] | io | the io to use to write |
[in] | data_begin | pointer to an array of data objects |
[in] | num_data | the number of buffers to write |
const char * pressio_supported_io_modules | ( | ) |