GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/pinocchio/parsers/python.hpp Lines: 0 2 0.0 %
Date: 2022-07-05 08:28:44 Branches: 0 0 - %

Line Branch Exec Source
1
//
2
// Copyright (c) 2016-2020 CNRS INRIA
3
//
4
5
#ifndef __pinocchio_python_parser_python_hpp__
6
#define __pinocchio_python_parser_python_hpp__
7
8
#include "pinocchio/multibody/model.hpp"
9
10
#include <boost/python.hpp>
11
12
#if defined _WIN32
13
# ifdef pinocchio_pywrap_EXPORTS
14
#   define PINOCCHIO_PYWRAP_DLLAPI __declspec(dllexport)
15
# else
16
#   define PINOCCHIO_PYWRAP_DLLAPI __declspec(dllimport)
17
# endif // pinocchio_pywrap_EXPORTS
18
#else
19
# define PINOCCHIO_PYWRAP_DLLAPI
20
#endif // _WIN32
21
22
namespace pinocchio
23
{
24
  namespace python
25
  {
26
    /// \brief Load a model from a Python script.
27
    ///
28
    /// This function raises a Python error in case of incistency in the Python code.
29
    ///
30
    /// \input filename The full path to the model file.
31
    /// \input var_name Name of the Python variable which contains the model in the script.
32
    ///
33
    /// \returns The model constructed by the Python script.
34
    ///
35
    // TODO: look inside the context of Python and find an occurence of object Model
36
    PINOCCHIO_PYWRAP_DLLAPI
37
    Model buildModel(const std::string & filename,
38
                     const std::string & var_name = "model");
39
40
    ///
41
    /// \copydoc pinocchio::python::buildModel(const std::string &, const std::string &)
42
    ///
43
    PINOCCHIO_DEPRECATED
44
    Model buildModel(const std::string & filename,
45
                     const std::string & var_name,
46
                     const bool /*verbose*/)
47
    {
48
      return buildModel(filename,var_name);
49
    }
50
51
  } // namespace python
52
53
} // namespace pinocchio
54
55
#endif // ifndef __pinocchio_python_parser_python_hpp__