WarpX
WarpX_py.H
Go to the documentation of this file.
1 /* Copyright 2019-2022 The WarpX Community
2  *
3  * This file is part of WarpX.
4  *
5  * Authors: David Grote, Maxence Thevenet, Weiqun Zhang, Roelof Groenewald
6  *
7  * License: BSD-3-Clause-LBNL
8  */
9 #ifndef WARPX_PY_H_
10 #define WARPX_PY_H_
11 
12 #include "Utils/export.H"
14 
15 #include <map>
16 #include <string>
17 
18 
26 extern WARPX_EXPORT std::map< std::string, std::function<void()> > warpx_callback_py_map;
27 
31 void InstallPythonCallback ( std::string name, std::function<void()> callback );
32 
36 bool IsPythonCallbackInstalled ( std::string name );
37 
41 void ExecutePythonCallback ( std::string name );
42 
46 void ClearPythonCallback ( std::string name );
47 
48 #endif
WARPX_EXPORT std::map< std::string, std::function< void()> > warpx_callback_py_map
Definition: WarpX_py.cpp:11
bool IsPythonCallbackInstalled(std::string name)
Function to check if the given name is a key in warpx_callback_py_map.
Definition: WarpX_py.cpp:18
void ExecutePythonCallback(std::string name)
Function to look for and execute Python callbacks.
Definition: WarpX_py.cpp:24
void InstallPythonCallback(std::string name, std::function< void()> callback)
Function to install the given name and function in warpx_callback_py_map.
Definition: WarpX_py.cpp:13
void ClearPythonCallback(std::string name)
Function to clear the given callback name from warpx_callback_py_map.
Definition: WarpX_py.cpp:32
name
Definition: run_automated.py:229