The templatex basis class of all IO plug-ins. More...
#include <mia/core/ioplugin.hh>
Public Types | |
typedef D::type | Data |
type of the data handled by this plug-in More... | |
typedef std::shared_ptr< Data > | PData |
shared pointer of the data handled by this plug-in More... | |
typedef std::set< EPixelType > | PixelTypeSet |
the type for the supported pixel types of this IO handler More... | |
typedef std::set< std::string > | SuffixSet |
Public Types inherited from TPlugin< D, io_plugin_type > | |
typedef D | PlugData |
Typedef for the data type descriptor handled by this plug-in. More... | |
typedef io_plugin_type | PlugType |
Typedef for the plugin type descriptor handled by this plug-in. More... | |
Public Member Functions | |
void | add_suffixes (std::multimap< std::string, std::string > &map) const |
const std::string | get_preferred_suffix () const |
PData | load (const std::string &fname) const |
bool | save (const std::string &fname, const Data &data) const |
const PixelTypeSet & | supported_pixel_types () const |
TIOPlugin (const char *name) | |
Public Member Functions inherited from TPlugin< D, io_plugin_type > | |
virtual void | get_help (std::ostream &os) const |
const std::string | get_long_name () const |
TPlugin (const char *name) | |
Public Member Functions inherited from CPluginBase | |
void | add_dependend_handlers (HandlerHelpMap &handler_map) |
void | add_property (const char *property) |
void | append_interface (CPluginBase *plugin) |
CPluginBase (const char *name) | |
PPluginModule | get_module () const |
unsigned | get_priority () const |
bool | has_property (const char *property) const |
CPluginBase * | next_interface () |
void | set_module (const PPluginModule &module) |
void | set_priority (unsigned p) |
virtual | ~CPluginBase () |
Public Member Functions inherited from CParamTranslator | |
void | add_parameter (const std::string &name, CParameter *param) |
void | check_parameters () |
CParamTranslator (const char *name) | |
const std::string | get_descr () const |
void | get_help (std::ostream &os) const |
void | get_help_xml (CXMLElement &root) const |
const char * | get_name () const |
void | get_short_help (std::ostream &os) const |
void | set_parameters (const CParsedOptions &options) |
virtual | ~CParamTranslator () |
Protected Member Functions | |
void | add_suffix (const std::string &suffix) |
void | add_supported_type (EPixelType t) |
add pixel type t to the list of supported types More... | |
const SuffixSet & | get_suffixes () const |
Protected Member Functions inherited from CParamTranslator | |
CParamList & | get_parameters () |
Additional Inherited Members | |
Static Public Member Functions inherited from TPlugin< D, io_plugin_type > | |
static const char * | get_data_path_part () |
static const char * | get_type_path_part () |
The templatex basis class of all IO plug-ins.
The basis of all IO plug-ins. The type D must provied a typedef type the referes to the data type to be handled and it must provied a string value that describes the type of the io data and also corresponds to the last part of the directory name, where the plug-in will be located after installation of the package. The type D must be derived from CIOData, to supply functions to store and acquire the file format used to load the data.
D | the data type for witch the IO is implemented |
Definition at line 57 of file ioplugin.hh.
type of the data handled by this plug-in
Definition at line 61 of file ioplugin.hh.
shared pointer of the data handled by this plug-in
Definition at line 64 of file ioplugin.hh.
typedef std::set<EPixelType> TIOPlugin< D >::PixelTypeSet |
the type for the supported pixel types of this IO handler
Definition at line 67 of file ioplugin.hh.
Definition at line 69 of file ioplugin.hh.
Constructor of the Plugin
name | the name of the plug-in, should correnspond to the file type |
|
protected |
void TIOPlugin< D >::add_suffixes | ( | std::multimap< std::string, std::string > & | map | ) | const |
Adds file suffixes supported by this plug-in to a map to improve loading of files.
map | the map, the suffixes will be added to. |
|
protected |
add pixel type t to the list of supported types
const std::string TIOPlugin< D >::get_preferred_suffix | ( | ) | const |
Translate the file type decriptor to the file suffix.
the load function, the actual implementation of the loading is implemented in do_load, which has to be implemented in the according plug-in
fname | the file name to be loaded |
bool TIOPlugin< D >::save | ( | const std::string & | fname, |
const Data & | data | ||
) | const |
The save function. Saves the data to file fname. The actual save function is implemented in do_save and needs to be provied in th eaccording IO plug-in.
fname | file name |
data | data to be stored. |
const PixelTypeSet& TIOPlugin< D >::supported_pixel_types | ( | ) | const |