libpressio 0.93.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
libpressio_io_plugin Struct Referenceabstract

#include <io.h>

Inheritance diagram for libpressio_io_plugin:
Inheritance graph
[legend]
Collaboration diagram for libpressio_io_plugin:
Collaboration graph
[legend]

Public Member Functions

struct pressio_dataread (struct pressio_data *data)
 
template<class ContigIterator >
int read_many (ContigIterator data_begin, ContigIterator data_end)
 
int write (struct pressio_data const *data)
 
template<class ContigIterator >
int write_many (ContigIterator data_begin, ContigIterator data_end)
 
int check_options (struct pressio_options const &) override final
 
int set_options (struct pressio_options const &options) override final
 
struct pressio_options get_documentation () const override final
 
struct pressio_options get_configuration () const override final
 
struct pressio_options get_options () const override final
 
virtual std::shared_ptr< libpressio_io_pluginclone ()=0
 
void set_name (std::string const &new_name) final
 
- Public Member Functions inherited from pressio_configurable
virtual const char * prefix () const =0
 
std::string const & get_name () const
 
virtual void set_name (std::string const &new_name)
 
virtual void set_name_impl (std::string const &new_name)
 
virtual struct pressio_options get_configuration () const
 
virtual struct pressio_options get_documentation () const
 
virtual int check_options (struct pressio_options const &)
 
virtual struct pressio_options get_options () const
 
virtual int set_options (struct pressio_options const &options)
 
int cast_options (pressio_options const &early_config, pressio_options const &config)
 
- Public Member Functions inherited from pressio_errorable
const char * error_msg () const
 
int error_code () const
 
- Public Member Functions inherited from pressio_versionable
virtual ~pressio_versionable ()=default
 
virtual const char * version () const =0
 
virtual uint64_t epoch_version () const
 
virtual int major_version () const
 
virtual int minor_version () const
 
virtual int patch_version () const
 

Protected Member Functions

virtual int check_options_impl (struct pressio_options const &)
 
virtual pressio_dataread_impl (struct pressio_data *data)=0
 
virtual int write_impl (struct pressio_data const *data)=0
 
virtual int read_many_impl (compat::span< struct pressio_data * > const &data)
 
virtual int write_many_impl (compat::span< struct pressio_data const * > const &data)
 
virtual struct pressio_options get_documentation_impl () const =0
 
virtual struct pressio_options get_configuration_impl () const =0
 
virtual int set_options_impl (struct pressio_options const &options)=0
 
virtual struct pressio_options get_options_impl () const =0
 
- Protected Member Functions inherited from pressio_configurable
template<class StringType >
void set (pressio_options &options, StringType const &key, pressio_option const &value) const
 
template<class StringType >
void set_type (pressio_options &options, StringType const &key, pressio_option_type type) const
 
template<class StringType , class PointerType >
enum pressio_options_key_status get (pressio_options const &options, StringType &&key, PointerType value) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta (pressio_options &options, StringType &&key, std::string const &current_id, Wrapper const &current_value, Args &&... args) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_docs (pressio_options &options, StringType &&key, std::string const &docstring, Wrapper const &current_value, Args &&... args) const
 
template<class StringType , class Wrapper , class Registry , class... Args>
void set_meta_configuration (pressio_options &options, StringType &&key, Registry const &registry, Wrapper const &current_value) const
 
template<class StringType , class Wrapper , class Registry , class... Args>
void set_meta_many_configuration (pressio_options &options, StringType &&key, Registry const &registry, std::vector< Wrapper > const &current_values) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_many_docs (pressio_options &options, StringType &&key, std::string const &docstring, std::vector< Wrapper > const &current_values, Args &&... args) const
 
template<class StringType , class Wrapper , class... Args>
void set_meta_many (pressio_options &options, StringType &&key, std::vector< std::string > const &current_ids, std::vector< Wrapper > const &current_values, Args &&... args) const
 
template<class StringType , class Registry , class Wrapper >
pressio_options_key_status get_meta (pressio_options const &options, StringType &&key, Registry const &registry, std::string &current_id, Wrapper &current_value)
 
template<class StringType , class Registry , class Wrapper >
pressio_options_key_status get_meta_many (pressio_options const &options, StringType &&key, Registry const &registry, std::vector< std::string > &current_ids, std::vector< Wrapper > &current_values)
 
template<class T >
void set_names_many (std::string const &name, std::vector< T > &plugins, std::vector< std::string > const &names) const
 
std::string get_metrics_key_name () const
 
- Protected Member Functions inherited from pressio_errorable
int set_error (int code, std::string const &msg)
 
void clear_error ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from pressio_configurable
static pressio_thread_safety get_threadsafe (pressio_configurable const &c)
 
- Protected Attributes inherited from pressio_configurable
std::string name
 

Detailed Description

plugin extension base class for io modules

Member Function Documentation

◆ check_options()

int libpressio_io_plugin::check_options ( struct pressio_options const &  )
finaloverridevirtual

checks for extra arguments set for the io module. Modules should override check_options_impl instead. the default verison just checks for unknown options passed in.

See also
pressio_io_check_options for semantics this function obeys

Reimplemented from pressio_configurable.

◆ check_options_impl()

virtual int libpressio_io_plugin::check_options_impl ( struct pressio_options const &  )
protectedvirtual

checks for extra arguments set for the io module. the default verison just checks for unknown options passed in.

See also
pressio_io_check_options for semantics this function obeys

◆ clone()

virtual std::shared_ptr< libpressio_io_plugin > libpressio_io_plugin::clone ( )
pure virtual
Returns
the prefered name of the io_module clones an io module
a new reference to an io plugin.

◆ get_configuration()

struct pressio_options libpressio_io_plugin::get_configuration ( ) const
finaloverridevirtual

get the compile time configuration of a io module. Modules should override get_configuration_impl instead

See also
pressio_io_get_configuration for the semantics this function should obey

Reimplemented from pressio_configurable.

◆ get_configuration_impl()

virtual struct pressio_options libpressio_io_plugin::get_configuration_impl ( ) const
protectedpure virtual

get the compile time configuration of a io module

See also
pressio_io_get_configuration for the semantics this function should obey

◆ get_documentation()

struct pressio_options libpressio_io_plugin::get_documentation ( ) const
finaloverridevirtual

get the documentation for an io module. Modules should override get_documentation_impl instead

See also
pressio_io_get_configuration for the semantics this function should obey

Reimplemented from pressio_configurable.

◆ get_documentation_impl()

virtual struct pressio_options libpressio_io_plugin::get_documentation_impl ( ) const
protectedpure virtual

get the compile time documentation of an io module

See also
pressio_io_get_documentation for the semantics this function should obey

◆ get_options()

struct pressio_options libpressio_io_plugin::get_options ( ) const
finaloverridevirtual

get a set of options available for the io module. Modules should override get_options_impl instead

The io module should set a value if they have been set as default The io module should set a "reset" value if they are required to be set, but don't have a meaningful default

See also
pressio_options.h for how to configure options

Reimplemented from pressio_configurable.

◆ get_options_impl()

virtual struct pressio_options libpressio_io_plugin::get_options_impl ( ) const
protectedpure virtual

get a set of options available for the io module

The io module should set a value if they have been set as default The io module should set a "reset" value if they are required to be set, but don't have a meaningful default

See also
pressio_options.h for how to configure options

◆ read()

struct pressio_data * libpressio_io_plugin::read ( struct pressio_data data)

reads a pressio_data buffer from some persistent storage. Modules should override read_impl instead.

Parameters
[in]datadata object to populate, or nullptr to allocate it from the file if supported. callers should treat this buffer as if it is moved in a C++11 sense
Returns
a new read pressio data buffer containing the read information
See also
pressio_io_read for the semantics this function should obey

◆ read_impl()

virtual pressio_data * libpressio_io_plugin::read_impl ( struct pressio_data data)
protectedpure virtual

reads a pressio_data buffer from some persistent storage

Parameters
[in]datadata object to populate, or nullptr to allocate it from the file if supported
See also
pressio_io_read for the semantics this function should obey

◆ read_many()

template<class ContigIterator >
int libpressio_io_plugin::read_many ( ContigIterator  data_begin,
ContigIterator  data_end 
)
inline

reads a multiple pressio_data buffers from some persistent storage. Modules should override read_many_impl instead.

Parameters
[in,out]data_begincontiguous iterator to the beginning of the data objects. Pointed to objects are replaced with the read data, freeing the input if required.
[in,out]data_endcontiguous iterator past the end of the data objects. Pointed to objects are replaced with the read data, freeing the output if required.
Returns
0 if successful, positive values on errors, negative values on warnings
See also
pressio_io_read for the semantics this function should obey
read for the value_type the iterator points to

◆ read_many_impl()

virtual int libpressio_io_plugin::read_many_impl ( compat::span< struct pressio_data * > const &  data)
inlineprotectedvirtual

reads multiple pressio_data buffers from some persistent storage

Parameters
[in]datadata object to populate, or nullptr to allocate it from the file if supported
See also
pressio_io_read for the semantics this function should obey

◆ set_name()

void libpressio_io_plugin::set_name ( std::string const &  new_name)
finalvirtual

prevent child classes from overriding set_name, override set_name_impl instead

Parameters
[in]new_namethe new name to assign

Reimplemented from pressio_configurable.

◆ set_options()

int libpressio_io_plugin::set_options ( struct pressio_options const &  options)
finaloverridevirtual

sets a set of options for the io_module

Parameters
[in]optionsto set for configuration of the io_module
See also
pressio_io_set_options for the semantics this function should obey

Reimplemented from pressio_configurable.

◆ set_options_impl()

virtual int libpressio_io_plugin::set_options_impl ( struct pressio_options const &  options)
protectedpure virtual

sets a set of options for the io_module

Parameters
[in]optionsto set for configuration of the io_module
See also
pressio_io_set_options for the semantics this function should obey

◆ write()

int libpressio_io_plugin::write ( struct pressio_data const *  data)

writes a pressio_data buffer to some persistent storage. Modules should override write_impl instead.

Parameters
[in]datadata to write
See also
pressio_io_write for the semantics this function should obey

◆ write_impl()

virtual int libpressio_io_plugin::write_impl ( struct pressio_data const *  data)
protectedpure virtual

writes a pressio_data buffer to some persistent storage

Parameters
[in]datadata to write
See also
pressio_io_write for the semantics this function should obey

◆ write_many()

template<class ContigIterator >
int libpressio_io_plugin::write_many ( ContigIterator  data_begin,
ContigIterator  data_end 
)
inline

writes a multiple pressio_data buffers to some persistent storage. Modules should override write_many_impl instead.

Parameters
[in,out]data_begincontiguous iterator to the beginning of the data objects.
[in,out]data_endcontiguous iterator past the end of the data objects.
Returns
0 if successful, positive values on errors, negative values on warnings
See also
pressio_io_read for the semantics this function should obey
read for the value_type the iterator points to

◆ write_many_impl()

virtual int libpressio_io_plugin::write_many_impl ( compat::span< struct pressio_data const * > const &  data)
inlineprotectedvirtual

writes multiple pressio_data buffers to some persistent storage

Parameters
[in]datadata to write
See also
pressio_io_write for the semantics this function should obey

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