cppyabm  1.0.17
An agent-based library to integrate C++ and Python
Classes | Functions
bind_tools Namespace Reference

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

Classes

struct  Bind
 
struct  tramAgent
 Template trampoline for Agent-based classes. More...
 
struct  tramEnv
 Template trampoline for Env-based classes. More...
 
struct  tramPatch
 Template trampoline for Patch-based classes. More...
 

Functions

template<class ENV , class AGENT , class PATCH , class tramclass >
py::class_< ENV, tramclass, std::shared_ptr< ENV > > 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 > > 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 > > 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 > > 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 > > 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 > > expose_patch (py::module &m, string class_name_ptr)
 Template trampoline for Patch-based classes without trampoline. More...
 
void expose_exceptions (py::module m)
 function to expose exceptions More...
 
void expose_mesh (py::module &m)
 function to expose mesh items More...
 
template<class ENV , class AGENT , class PATCH >
void expose_containers (py::module &m)
 funtion to expose agent and patch containers More...
 
template<class ENV , class AGENT , class PATCH >
void expose_defaults (py::module &m)
 Exposes default items. More...
 
template<class ENV , class AGENT , class PATCH , typename py_class_name >
py::class_< ENV, py_class_name, std::shared_ptr< ENV > > 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 , class py_class_name >
py::class_< AGENT, py_class_name, std::shared_ptr< AGENT > > 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 , class py_class_name >
py::class_< PATCH, py_class_name, std::shared_ptr< PATCH > > expose_patch (py::module &m, string class_name_ptr)
 Template trampoline for Patch-based classes with trampoline. More...
 

Detailed Description

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

Function Documentation

◆ expose_agent() [1/3]

template<class ENV , class AGENT , class PATCH , class py_class_name >
py::class_<AGENT, py_class_name,std::shared_ptr<AGENT> > bind_tools::expose_agent ( py::module m,
string  class_name_str 
)

Template trampoline for Agent-based classes with trampoline.

Definition at line 137 of file bind_tools.h.

◆ expose_agent() [2/3]

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.

Definition at line 137 of file bind_tools.h.

◆ expose_agent() [3/3]

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.

Definition at line 158 of file bind_tools.h.

◆ expose_containers()

template<class ENV , class AGENT , class PATCH >
void bind_tools::expose_containers ( py::module m)

funtion to expose agent and patch containers

Definition at line 230 of file bind_tools.h.

◆ expose_defaults()

template<class ENV , class AGENT , class PATCH >
void bind_tools::expose_defaults ( py::module m)

Exposes default items.

the main class to create binding

Definition at line 254 of file bind_tools.h.

◆ expose_env() [1/3]

template<class ENV , class AGENT , class PATCH , typename py_class_name >
py::class_<ENV, py_class_name,std::shared_ptr<ENV> > bind_tools::expose_env ( py::module  m,
string  class_name_string 
)

Expose function for Env-based classes with trampoline.

Definition at line 95 of file bind_tools.h.

◆ expose_env() [2/3]

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.

Definition at line 95 of file bind_tools.h.

◆ expose_env() [3/3]

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.

Definition at line 116 of file bind_tools.h.

◆ expose_exceptions()

void bind_tools::expose_exceptions ( py::module  m)

function to expose exceptions

Definition at line 214 of file bind_tools.h.

◆ expose_mesh()

void bind_tools::expose_mesh ( py::module m)

function to expose mesh items

Definition at line 220 of file bind_tools.h.

◆ expose_patch() [1/3]

template<class ENV , class AGENT , class PATCH , class py_class_name >
py::class_<PATCH,py_class_name,std::shared_ptr<PATCH> > bind_tools::expose_patch ( py::module m,
string  class_name_ptr 
)

Template trampoline for Patch-based classes with trampoline.

Definition at line 180 of file bind_tools.h.

◆ expose_patch() [2/3]

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.

Definition at line 180 of file bind_tools.h.

◆ expose_patch() [3/3]

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.

Definition at line 198 of file bind_tools.h.