Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfSimulatorPy.h
Go to the documentation of this file.
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
25#ifndef _SOURCE_LANGS_PY_TFSIMULATORPY_H_
26#define _SOURCE_LANGS_PY_TFSIMULATORPY_H_
27
28#include "tf_py.h"
29
30#include <tfSimulator.h>
31
32
33namespace TissueForge::py {
34
35
36 struct CAPI_EXPORT SimulatorPy : Simulator {
37
38 public:
39
43 static SimulatorPy *get();
44
45 static PyObject *_run(PyObject *args, PyObject *kwargs);
46
53 static HRESULT irun();
54
55 static HRESULT _show();
56
57 static void *wait_events(const FloatP_t &timeout=-1);
58
60 static HRESULT _throwExceptions(const bool &_throw);
61
63 static bool _throwingExceptions();
64
65 };
66
67 CAPI_FUNC(HRESULT) _setIPythonInputHook(PyObject *_ih);
68
69 CAPI_FUNC(HRESULT) _onIPythonNotReady();
70
101 CAPI_FUNC(PyObject *) SimulatorPy_init(PyObject *args, PyObject *kwargs);
102
103};
104
105#endif // _SOURCE_LANGS_PY_TFSIMULATORPY_H_
Tissue Forge Python language support.
Definition tf_bindPy.h:36
PyObject * SimulatorPy_init(PyObject *args, PyObject *kwargs)
Initialize a simulation in Python.
The Simulator is the entry point to simulation, this is the very first object that needs to be initia...
Definition tfSimulator.h:59
Definition tfSimulatorPy.h:36
static HRESULT _throwExceptions(const bool &_throw)
static HRESULT irun()
Interactive python version of the run loop. This checks the ipython context and lets ipython process ...
static SimulatorPy * get()
static bool _throwingExceptions()
int32_t HRESULT
Definition tf_port.h:255