WarpX
Loading...
Searching...
No Matches
callbacks.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, Axel Huebl
6 *
7 * License: BSD-3-Clause-LBNL
8 */
9#ifndef WARPX_PY_CALLBACKS_H_
10#define WARPX_PY_CALLBACKS_H_
11
12#include "Utils/export.H"
14
15#include <functional>
16#include <map>
17#include <string>
18
19
27extern WARPX_EXPORT std::map< std::string, std::function<void()> > warpx_callback_py_map;
28
32void InstallPythonCallback ( const std::string& name, std::function<void()> callback );
33
37bool IsPythonCallbackInstalled ( const std::string& name );
38
42void ExecutePythonCallback ( const std::string& name );
43
47void ClearPythonCallback ( const std::string& name );
48
49#endif // WARPX_PY_CALLBACKS_H_
void ExecutePythonCallback(const std::string &name)
Function to look for and execute Python callbacks.
Definition callbacks.cpp:29
void ClearPythonCallback(const std::string &name)
Function to clear the given callback name from warpx_callback_py_map.
Definition callbacks.cpp:50
bool IsPythonCallbackInstalled(const std::string &name)
Function to check if the given name is a key in warpx_callback_py_map.
Definition callbacks.cpp:23
void InstallPythonCallback(const std::string &name, std::function< void()> callback)
Function to install the given name and function in warpx_callback_py_map.
Definition callbacks.cpp:18
std::map< std::string, std::function< void()> > warpx_callback_py_map
Definition callbacks.cpp:16