HiPipe  0.7.0
C++17 data pipeline with Python bindings.
pyboost_fs_path_converter.hpp
1 /****************************************************************************
2  * hipipe library
3  * Copyright (c) 2017, Cognexa Solutions s.r.o.
4  * Copyright (c) 2018, Iterait a.s.
5  * Author(s) Filip Matzner
6  *
7  * This file is distributed under the MIT License.
8  * See the accompanying file LICENSE.txt for the complete license agreement.
9  ****************************************************************************/
10 
11 #pragma once
12 #include <hipipe/build_config.hpp>
13 #ifdef HIPIPE_BUILD_PYTHON
14 
15 #include <boost/python.hpp>
16 
17 #include <experimental/filesystem>
18 
19 namespace hipipe::python::utility {
20 
21 struct fs_path_to_python_str {
22  static PyObject* convert(const std::experimental::filesystem::path& path);
23 };
24 
25 struct fs_path_from_python_str {
26  fs_path_from_python_str();
27 
28  static void* convertible(PyObject* obj_ptr);
29 
30  static void construct(PyObject* obj_ptr,
31  boost::python::converter::rvalue_from_python_stage1_data* data);
32 };
33 
34 } // namespace hipipe::python::utility
35 
36 #endif // HIPIPE_BUILD_PYTHON