IOFormat  IOF_v0.33.0_release
IOFormat.h
Go to the documentation of this file.
1 // Add following header comment to force Doxygen to generate documentation
2 // for methods which are directly in ioformat namespace without belonging to a
3 // class. Doxygen limitation.
6 #pragma once
7 
8 #include <memory>
9 #include <string>
10 
11 #include <ioformat/IOFormatAPI.h>
12 #include <iolink/Uri.h>
13 #include <iolink/storage/DataAccess.h>
14 #include <iolink/view/ImageView.h>
15 #include <iolink/view/View.h>
16 #include <iolink/writer/Writer.h>
17 
23 namespace ioformat
24 {
25 
33 IOFORMAT_API bool init();
34 
41 IOFORMAT_API std::shared_ptr<iolink::View> openView(const std::string& pathFile);
42 
51 IOFORMAT_API std::shared_ptr<iolink::View> openView(const std::string& path, const std::string& format);
52 
57 IOFORMAT_API std::shared_ptr<iolink::View> openView(const iolink::Uri& uri);
58 
63 IOFORMAT_API std::shared_ptr<iolink::View> openView(const iolink::Uri& uri, const std::string& format);
64 
75 IOFORMAT_API std::shared_ptr<iolink::ImageView> readImage(const std::string& pathFile);
76 
85 IOFORMAT_API std::shared_ptr<iolink::View> openView(std::shared_ptr<iolink::DataAccess> storage,
86  const std::string& format);
87 
96 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
97  const std::string& pathFile);
98 
108 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
109  std::shared_ptr<iolink::DataAccess> dst,
110  const std::string& format);
111 
122 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
123  std::shared_ptr<iolink::DataAccess> dst,
124  const std::string& format,
125  const std::string& plugin);
126 
135 IOFORMAT_API void writeView(std::shared_ptr<iolink::View> view, const std::string& pathFile);
136 
146 IOFORMAT_API void writeView(std::shared_ptr<iolink::View> view,
147  std::shared_ptr<iolink::DataAccess> dst,
148  const std::string& format);
149 
159 IOFORMAT_API std::string formatFromExtension(const std::string& extension);
160 
161 } // namespace ioformat
ioformat::openWriter
IOFORMAT_API std::shared_ptr< iolink::Writer > openWriter(std::shared_ptr< iolink::View > view, const std::string &pathFile)
ioformat::writeView
IOFORMAT_API void writeView(std::shared_ptr< iolink::View > view, const std::string &pathFile)
ioformat::openView
IOFORMAT_API std::shared_ptr< iolink::View > openView(const std::string &pathFile)
ioformat::formatFromExtension
IOFORMAT_API std::string formatFromExtension(const std::string &extension)
ioformat::init
IOFORMAT_API bool init()
ioformat::readImage
IOFORMAT_API std::shared_ptr< iolink::ImageView > readImage(const std::string &pathFile)
ioformat
Global namespace which contains all methods to encode/decode data from/into different resources (file...
Definition: Error.h:5