aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/src/mobase/wrappers/pyfiletree.h
blob: 0e9466569d2bf6c23047cae31b25199c4d444427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef MO2_PYTHON_FILETREE_H
#define MO2_PYTHON_FILETREE_H

#include "../pybind11_all.h"

#include <uibase/ifiletree.h>

namespace pybind11 {
    template <>
    struct polymorphic_type_hook<MOBase::FileTreeEntry> {
        static const void* get(const MOBase::FileTreeEntry* src,
                               const std::type_info*& type);
    };
}  // namespace pybind11

namespace mo2::python {

    /**
     * @brief Add bindings for FileTreeEntry andIFileTree to the given module.
     *
     * @param mobase Module to add the bindings to.
     */
    void add_ifiletree_bindings(pybind11::module_& m);

    /**
     * @brief Add makeTree() function to the given module, useful for debugging.
     *
     * @param mobase Module to add the function to.
     */
    void add_make_tree_function(pybind11::module_& m);

}  // namespace mo2::python

#endif