This file defines mappings from Python dicts (kwargs) to simple parameter structs.
Definition in file kwargs-to-struct.hpp.
#include <functional>#include <map>#include <variant>#include <pybind11/detail/typeid.h>#include <pybind11/pybind11.h>#include <panoc-alm/inner/decl/panoc.hpp>#include <panoc-alm/inner/pga.hpp>#include <panoc-alm/inner/guarded-aa-pga.hpp>#include <panoc-alm/inner/decl/structured-panoc-lbfgs.hpp>#include <panoc-alm/inner/directions/decl/lbfgs.hpp>#include <panoc-alm/decl/alm.hpp>
Include dependency graph for kwargs-to-struct.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | cast_error_with_types |
| class | attr_setter_fun_t< T > |
Typedefs | |
| template<class T > | |
| using | kwargs_to_struct_table_t = std::map< std::string, attr_setter_fun_t< T > > |
Functions | |
| template<class T , class A > | |
| auto | attr_setter (A T::*attr) |
| template<class T , class A > | |
| auto | attr_getter (A T::*attr) |
| template<class T > | |
| void | kwargs_to_struct_helper (T &t, const py::kwargs &kwargs) |
| template<class T > | |
| py::dict | struct_to_dict_helper (const T &t) |
| template<class T > | |
| T | kwargs_to_struct (const py::kwargs &kwargs) |
| template<class T > | |
| py::dict | struct_to_dict (const T &t) |
| template<class T > | |
| T | var_kwargs_to_struct (const std::variant< T, py::dict > &p) |
Variables | |
| template<class T > | |
| kwargs_to_struct_table_t< T > | kwargs_to_struct_table |
| using kwargs_to_struct_table_t = std::map<std::string, attr_setter_fun_t<T> > |
Definition at line 53 of file kwargs-to-struct.hpp.
| auto attr_setter | ( | A T::* | attr | ) |
Definition at line 26 of file kwargs-to-struct.hpp.
| auto attr_getter | ( | A T::* | attr | ) |
Definition at line 37 of file kwargs-to-struct.hpp.
| void kwargs_to_struct_helper | ( | T & | t, |
| const py::kwargs & | kwargs | ||
| ) |
| py::dict struct_to_dict_helper | ( | const T & | t | ) |
Definition at line 80 of file kwargs-to-struct.hpp.
| T kwargs_to_struct | ( | const py::kwargs & | kwargs | ) |
| py::dict struct_to_dict | ( | const T & | t | ) |
Definition at line 100 of file kwargs-to-struct.hpp.
| T var_kwargs_to_struct | ( | const std::variant< T, py::dict > & | p | ) |
| kwargs_to_struct_table_t<T> kwargs_to_struct_table |
Definition at line 56 of file kwargs-to-struct.hpp.