Drake
Drake C++ Documentation
cpp_template_pybind.h File Reference
#include <optional>
#include <string>
#include <utility>
#include "drake/bindings/pydrake/common/cpp_param_pybind.h"
#include "drake/bindings/pydrake/pydrake_pybind.h"
Include dependency graph for cpp_template_pybind.h:
This graph shows which files directly or indirectly include this file:

Namespaces

 drake
 
 drake::pydrake
 For more high-level information, see the Python Bindings technical notes.
 

Functions

template<typename T >
std::string TemporaryClassName (const std::string &name="TemporaryName")
 Provides a temporary, unique name for a class instantiation that will be passed to AddTemplateClass. More...
 
py::object AddTemplateClass (py::handle scope, const std::string &template_name, py::handle py_class, py::tuple param, bool skip_rename=false)
 Adds a template class instantiation. More...
 
template<typename Class , typename... Options>
py::class_< Class, Options... > DefineTemplateClassWithDefault (py::handle scope, const std::string &default_name, py::tuple param, const char *doc_string="", const std::optional< std::string > &template_suffix={}, std::optional< py::dynamic_attr > dynamic_attr={})
 Provides a convenience wrapper for defining a template class instantiation and a default instantiation (if not already defined). More...
 
template<typename Func , typename... Extra>
py::object AddTemplateFunction (py::handle scope, const std::string &name, Func &&func, py::tuple param, Extra &&... extra)
 Declares a template function. More...
 
template<typename Method , typename... Extra>
py::object AddTemplateMethod (py::handle scope, const std::string &name, Method &&method, py::tuple param, Extra &&... extra)
 Declares a template method. More...