robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
pybind11_macros.hpp File Reference
#include <iostream>
#include <sstream>
Include dependency graph for pybind11_macros.hpp:

Go to the source code of this file.

Namespaces

namespace  robotoc
 

Macros

#define DEFINE_ROBOTOC_PYBIND11_CLASS_CLONE(CLASS)
 
#define DEFINE_ROBOTOC_PYBIND11_CLASS_PRINT(CLASS)
 

Macro Definition Documentation

◆ DEFINE_ROBOTOC_PYBIND11_CLASS_CLONE

#define DEFINE_ROBOTOC_PYBIND11_CLASS_CLONE (   CLASS)
Value:
.def("clone", [](const CLASS& self) { \
auto copy = self; \
return copy; \
})

◆ DEFINE_ROBOTOC_PYBIND11_CLASS_PRINT

#define DEFINE_ROBOTOC_PYBIND11_CLASS_PRINT (   CLASS)
Value:
.def("__str__", [](const CLASS& self) { \
std::stringstream ss; \
ss << self; \
return ss.str(); \
})