cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Classes | Namespaces | Macros | Functions
bind_tools.h File Reference
#include "bases.h"
#include <map>
#include <algorithm>
#include "pybind11/pybind11.h"
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>

Go to the source code of this file.

Classes

struct  bind_tools::tramEnv< ENV, AGENT, PATCH >
 Template trampoline for Env-based classes. More...
 
struct  bind_tools::tramAgent< ENV, AGENT, PATCH >
 Template trampoline for Agent-based classes. More...
 
struct  bind_tools::tramPatch< ENV, AGENT, PATCH >
 Template trampoline for Patch-based classes. More...
 
struct  bind_tools::Bind< env, agent, patch, tramenv, tramagent, trampatch >
 

Namespaces

 bind_tools
 Tools for exposing C++ types and functions to Python.
 

Macros

#define EXPOSE_AGENT_CONTAINER(...)
 
#define EXPOSE_PATCH_CONTAINER(...)
 

Functions

template<class ENV , class AGENT , class PATCH , class tramclass >
py::class_< ENV, tramclass, std::shared_ptr< ENV > > bind_tools::expose_env (py::module m, string class_name_string)
 Expose function for Env-based classes with trampoline. More...
 
template<class ENV , class AGENT , class PATCH >
py::class_< ENV, std::shared_ptr< ENV > > bind_tools::expose_env (py::module m, string class_name_string)
 Template trampoline for Env-based classes without trampoline. More...
 
template<class ENV , class AGENT , class PATCH , class tramclass >
py::class_< AGENT, tramclass, std::shared_ptr< AGENT > > bind_tools::expose_agent (py::module &m, string class_name_str)
 Template trampoline for Agent-based classes with trampoline. More...
 
template<class ENV , class AGENT , class PATCH >
py::class_< AGENT, std::shared_ptr< AGENT > > bind_tools::expose_agent (py::module &m, string class_name_str)
 Template trampoline for Agent-based classes without trampoline. More...
 
template<class ENV , class AGENT , class PATCH , class tramclass >
py::class_< PATCH, tramclass, std::shared_ptr< PATCH > > bind_tools::expose_patch (py::module &m, string class_name_ptr)
 Template trampoline for Patch-based classes with trampoline. More...
 
template<class ENV , class AGENT , class PATCH >
py::class_< PATCH, std::shared_ptr< PATCH > > bind_tools::expose_patch (py::module &m, string class_name_ptr)
 Template trampoline for Patch-based classes without trampoline. More...
 
void bind_tools::expose_exceptions (py::module m)
 function to expose exceptions More...
 
void bind_tools::expose_mesh (py::module &m)
 function to expose mesh items More...
 
template<class ENV , class AGENT , class PATCH >
void bind_tools::expose_containers (py::module &m)
 funtion to expose agent and patch containers More...
 
template<class ENV , class AGENT , class PATCH >
void bind_tools::expose_defaults (py::module &m)
 Exposes default items. More...
 

Macro Definition Documentation

◆ EXPOSE_AGENT_CONTAINER

#define EXPOSE_AGENT_CONTAINER (   ...)
Value:
namespace pybind11 { namespace detail { \
template<> class type_caster<vector<shared_ptr<__VA_ARGS__>>> : public type_caster_base<vector<shared_ptr<__VA_ARGS__>>> { }; \
}}

Definition at line 10 of file bind_tools.h.

◆ EXPOSE_PATCH_CONTAINER

#define EXPOSE_PATCH_CONTAINER (   ...)
Value:
namespace pybind11 { namespace detail { \
template<> class type_caster<map<unsigned,shared_ptr<__VA_ARGS__>>> : public type_caster_base<map<unsigned,shared_ptr<__VA_ARGS__>>> { }; \
}}

Definition at line 14 of file bind_tools.h.

type_caster
Definition: cast.h:954
pybind11
Definition: __init__.py:1
type_caster_base
Generic type caster for objects stored on the heap.
Definition: cast.h:869