itom
Loading...
Searching...
No Matches
pythontParamConversion.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#pragma once
24
25#ifndef Q_MOC_RUN
26#include "python/pythonWrapper.h"
27#endif
28
29#include "../../common/sharedStructures.h"
30#include "../global.h"
31
32namespace ito
33{
34
40{
41 public:
42 // converts ito::ParamBase to the most appropriate PyObject
43 static PyObject *ParamBaseToPyObject(const ito::ParamBase &param);
44
45 // converts a given PyObject to an appropriate ito::ParamBase
46 static SharedParamBasePointer PyObjectToParamBase(PyObject *obj, const char *name, ito::RetVal &retVal,
47 int paramBaseType = 0, bool strict = true);
48
49 private:
50 // special deleter for param, where the wrapped object is deleted, too.
52};
53
54} // namespace ito
<
Definition param.h:95
Static methods to convert between Python objects and ito::ParamBase.
Definition pythontParamConversion.h:40
static void PyObjectToParamBaseDeleter(ito::ParamBase *param)
special deleter for param, where the wrapped object is deleted, too.
Definition pythontParamConversion.cpp:629
static PyObject * ParamBaseToPyObject(const ito::ParamBase &param)
Definition pythontParamConversion.cpp:44
static SharedParamBasePointer PyObjectToParamBase(PyObject *obj, const char *name, ito::RetVal &retVal, int paramBaseType=0, bool strict=true)
converts a given PyObject to an appropriate ito::ParamBase.
Definition pythontParamConversion.cpp:332
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40