21 #ifndef ph_IOhandler_hh
22 #define ph_IOhandler_hh
48 typedef typename I::Data
Data;
51 typedef typename std::shared_ptr<Data >
PData;
60 typedef std::multimap<std::string, std::string>
CSuffixmap;
72 PData load(
const std::string& fname)
const;
82 DataKey load_to_pool(
const std::string& fname)
const;
92 bool save(
const std::string& fname,
const Data& data)
const;
99 const Interface *preferred_plugin_ptr(
const std::string& fname)
const;
108 const Interface& preferred_plugin(
const std::string& fname)
const;
111 const CSuffixmap& get_supported_filetype_map()
const;
114 const std::string get_supported_suffixes()
const;
117 const std::set<std::string> get_supported_suffix_set()
const;
125 std::string get_preferred_suffix(
const std::string& type)
const;
135 void do_initialise();
141 std::set<std::string> m_compress_sfx;
145 void do_print_help(std::ostream& os)
const;
147 std::string get_handler_type_string_and_help(std::ostream& os)
const;
148 std::string do_get_handler_type_string()
const;
157 PData do_load(
const std::string& fname)
const;
158 bool do_save(
const std::string& fname,
159 const typename Interface::Data& data)
const;
160 const std::string do_get_descr()
const;
161 std::string do_get_preferred_suffix()
const;
164 CDatapoolPlugin *m_pool_plugin;
171 #define EXPLICITE_INSTANCEIATE_IO_HANDLER(IOTYPE) \
172 template class TIOPlugin<IOTYPE>; \
173 template class THandlerSingleton<TIOPluginHandler<TIOPlugin<IOTYPE>>>; \
174 template class TIOPluginHandler<TIOPlugin<IOTYPE>>; \
175 template class TPluginHandler<TIOPlugin<IOTYPE>> \
182 template <
typename T>
185 static_assert(
sizeof(T) == 0,
"The call to load_image must be resolved to a template specialization");