Enumerations | Functions
eval.h File Reference
#include "pybind11.h"
#include <utility>
Include dependency graph for eval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  eval_mode { eval_expr, eval_single_statement, eval_statements }
 

Functions

void ensure_builtins_in_globals (object &global)
 
template<eval_mode mode = eval_expr>
object eval (const str &expr, object global=globals(), object local=object())
 
template<eval_mode mode = eval_expr, size_t N>
object eval (const char(&s)[N], object global=globals(), object local=object())
 
template<eval_mode mode = eval_statements>
object eval_file (str fname, object global=globals(), object local=object())
 
void exec (const str &expr, object global=globals(), object local=object())
 
template<size_t N>
void exec (const char(&s)[N], object global=globals(), object local=object())
 

Enumeration Type Documentation

◆ eval_mode

enum eval_mode
Enumerator
eval_expr 

Evaluate a string containing an isolated expression.

eval_single_statement 

Evaluate a string containing a single statement. Returns none.

eval_statements 

Evaluate a string containing a sequence of statement. Returns none.

Definition at line 36 of file eval.h.

Function Documentation

◆ ensure_builtins_in_globals()

void ensure_builtins_in_globals ( object global)
inline

Definition at line 21 of file eval.h.

◆ eval() [1/2]

template<eval_mode mode = eval_expr>
object eval ( const str expr,
object  global = globals(),
object  local = object() 
)

Definition at line 48 of file eval.h.

◆ eval() [2/2]

template<eval_mode mode = eval_expr, size_t N>
object eval ( const char(&)  s[N],
object  global = globals(),
object  local = object() 
)

Definition at line 82 of file eval.h.

◆ eval_file()

template<eval_mode mode = eval_statements>
object eval_file ( str  fname,
object  global = globals(),
object  local = object() 
)

Definition at line 112 of file eval.h.

◆ exec() [1/2]

void exec ( const str expr,
object  global = globals(),
object  local = object() 
)
inline

Definition at line 88 of file eval.h.

◆ exec() [2/2]

template<size_t N>
void exec ( const char(&)  s[N],
object  global = globals(),
object  local = object() 
)

Definition at line 93 of file eval.h.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:48