IOFormat  IOF_v0.34.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 
76 IOFORMAT_API std::shared_ptr<iolink::ImageView> readImage(const std::string& pathFile);
77 
86 IOFORMAT_API std::shared_ptr<iolink::View> openView(std::shared_ptr<iolink::DataAccess> storage,
87  const std::string& format);
88 
97 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
98  const std::string& pathFile);
99 
109 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
110  std::shared_ptr<iolink::DataAccess> dst,
111  const std::string& format);
112 
123 IOFORMAT_API std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view,
124  std::shared_ptr<iolink::DataAccess> dst,
125  const std::string& format,
126  const std::string& plugin);
127 
136 IOFORMAT_API void writeView(std::shared_ptr<iolink::View> view, const std::string& pathFile);
137 
147 IOFORMAT_API void writeView(std::shared_ptr<iolink::View> view,
148  std::shared_ptr<iolink::DataAccess> dst,
149  const std::string& format);
150 
160 IOFORMAT_API std::string formatFromExtension(const std::string& extension);
161 
162 } // 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