Public Member Functions | Private Attributes | List of all members
scoped_interpreter Class Reference

#include <embed.h>

Public Member Functions

scoped_interpreteroperator= (const scoped_interpreter &)=delete
 
scoped_interpreteroperator= (scoped_interpreter &&)=delete
 
 scoped_interpreter (bool init_signal_handlers=true)
 
 scoped_interpreter (const scoped_interpreter &)=delete
 
 scoped_interpreter (scoped_interpreter &&other) noexcept
 
 ~scoped_interpreter ()
 

Private Attributes

bool is_valid = true
 

Detailed Description

Scope guard version of initialize_interpreter and finalize_interpreter. This a move-only guard and only a single instance can exist.

.. code-block:: cpp

#include <pybind11/embed.h>

int main() {
    py::scoped_interpreter guard{};
    py::print(Hello, World!);
} // <-- interpreter shutdown

Definition at line 183 of file embed.h.

Constructor & Destructor Documentation

scoped_interpreter::scoped_interpreter ( bool  init_signal_handlers = true)
inline

Definition at line 185 of file embed.h.

scoped_interpreter::scoped_interpreter ( const scoped_interpreter )
delete
scoped_interpreter::scoped_interpreter ( scoped_interpreter &&  other)
inlinenoexcept

Definition at line 190 of file embed.h.

scoped_interpreter::~scoped_interpreter ( )
inline

Definition at line 194 of file embed.h.

Member Function Documentation

scoped_interpreter& scoped_interpreter::operator= ( const scoped_interpreter )
delete
scoped_interpreter& scoped_interpreter::operator= ( scoped_interpreter &&  )
delete

Member Data Documentation

bool scoped_interpreter::is_valid = true
private

Definition at line 200 of file embed.h.


The documentation for this class was generated from the following file:


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:54