WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
Python
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"
13
14
#include <
ablastr/profiler/ProfilerWrapper.H
>
15
16
#include <functional>
17
#include <map>
18
#include <string>
19
20
28
extern
WARPX_EXPORT std::map< std::string, std::function<void()> >
warpx_callback_py_map
;
29
33
void
InstallPythonCallback
(
const
std::string& name, std::function<
void
()> callback );
34
38
bool
IsPythonCallbackInstalled
(
const
std::string& name );
39
43
void
ExecutePythonCallback
(
const
std::string& name );
44
48
void
ClearPythonCallback
(
const
std::string& name );
49
50
#endif
// WARPX_PY_CALLBACKS_H_
ProfilerWrapper.H
ExecutePythonCallback
void ExecutePythonCallback(const std::string &name)
Function to look for and execute Python callbacks.
Definition
callbacks.cpp:29
ClearPythonCallback
void ClearPythonCallback(const std::string &name)
Function to clear the given callback name from warpx_callback_py_map.
Definition
callbacks.cpp:50
IsPythonCallbackInstalled
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
InstallPythonCallback
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
warpx_callback_py_map
std::map< std::string, std::function< void()> > warpx_callback_py_map
Definition
callbacks.cpp:16
Generated by
1.17.0