itom  4.1.0
algoInterfaceValidator.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, Institut fuer Technische Optik (ITO),
5  Universitaet 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 #ifndef ALGOINTERFACEVALIDATOR_H
24 #define ALGOINTERFACEVALIDATOR_H
25 
26 #if !defined(Q_MOC_RUN) || defined(ADDINMGR_DLL) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib
27 
28 #include "addInMgrDefines.h"
29 #include "../common/addInInterface.h"
30 
31 #include <qscopedpointer.h>
32 
33 namespace ito {
34 
35 class AlgoInterfaceValidatorPrivate; //forward declaration
36 
37 class ADDINMGR_EXPORT AlgoInterfaceValidator : public QObject
38 {
39 public:
42 
43  ito::RetVal addInterface(ito::AddInAlgo::tAlgoInterface iface, QVector<ito::Param> &mandParams, QVector<ito::Param> &outParams, int maxNumMand, int maxNumOpt, int maxNumOut);
44  bool isValidFilter(const ito::AddInAlgo::FilterDef &filter, ito::RetVal &ret, QStringList &tags) const;
45  bool isValidWidget(const ito::AddInAlgo::AlgoWidgetDef &widget, ito::RetVal &ret, QStringList &tags) const;
46  ito::RetVal getInterfaceParameters(ito::AddInAlgo::tAlgoInterface iface, QVector<ito::ParamBase> &mandParams, QVector<ito::ParamBase> &outParams) const;
47 
48 protected:
49  ito::RetVal init(void);
50  bool isValid(const ito::AddInAlgo::tAlgoInterface iface, const ito::AddInAlgo::t_filterParam filterParamFunc, ito::RetVal &ret) const;
51  bool getTags(const ito::AddInAlgo::tAlgoInterface iface, const QString &metaInformation, QStringList &tags) const;
52 
53 private:
54  QScopedPointer<AlgoInterfaceValidatorPrivate> d_ptr;
55  Q_DECLARE_PRIVATE(AlgoInterfaceValidator);
56 };
57 
58 } //end namespace ito
59 
60 #endif // #if !defined(Q_MOC_RUN) || defined(ADDINMGR_DLL)
61 
62 #endif
container for publishing widgets provided by any plugin
Definition: addInInterface.h:1045
The class AlgoInterfaceValidator provides validators and checks in order to verify that a certain fil...
Definition: algoInterfaceValidator.h:37
Class for managing status values (like errors or warning)
Definition: retVal.h:54
ito::RetVal(* t_filterParam)(QVector< ito::Param > *paramsMand, QVector< ito::Param > *paramsOpt, QVector< ito::Param > *paramsOut)
possible categories for filter or widget-methods
Definition: addInInterface.h:943
Definition: apiFunctionsGraph.cpp:39
tAlgoInterface
Definition: addInInterface.h:955
container for publishing filters provided by any plugin
Definition: addInInterface.h:973