Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Functions
pybindings.hpp File Reference
#include "shambase/SourceLocation.hpp"
#include <shambindings/pybindaliases.hpp>
+ Include dependency graph for pybindings.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void shambindings::init_lib (py::module &m)
 Init python bindings and register them to Python API.
 
void shambindings::init_embed (py::module &m, bool hook_stdout=true)
 Init python bindings and register them to Python API.
 
void shambindings::expect_init_lib (SourceLocation loc=SourceLocation{})
 Expect python bindings to be initialized as lib mode, throws if not.
 
void shambindings::expect_init_embed (SourceLocation loc=SourceLocation{})
 Expect python bindings to be initialized as embed mode, throws if not.
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file pybindings.hpp.

Function Documentation

◆ expect_init_embed()

void shambindings::expect_init_embed ( SourceLocation  loc = SourceLocation{})

Expect python bindings to be initialized as embed mode, throws if not.

Definition at line 166 of file pybindings.cpp.

+ Here is the call graph for this function:

◆ expect_init_lib()

void shambindings::expect_init_lib ( SourceLocation  loc = SourceLocation{})

Expect python bindings to be initialized as lib mode, throws if not.

Definition at line 156 of file pybindings.cpp.

+ Here is the call graph for this function:

◆ init_embed()

void shambindings::init_embed ( py::module &  m,
bool  hook_stdout = true 
)

Init python bindings and register them to Python API.

Parameters
mthe python module to bind definitions on
hook_stdoutif true, sys.stdout and sys.stderr will be hooked

Definition at line 148 of file pybindings.cpp.

+ Here is the call graph for this function:

◆ init_lib()

void shambindings::init_lib ( py::module &  m)

Init python bindings and register them to Python API.

Parameters
mthe python module to bind definitions on

Definition at line 146 of file pybindings.cpp.

+ Here is the call graph for this function: