itom 1.4.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2013, Institut für Technische Optik (ITO), 00005 Universität Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut für Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef APIFUNCTIONSINC_H 00029 #define APIFUNCTIONSINC_H 00030 00031 #ifndef Q_MOC_RUN 00032 namespace ito 00033 { 00034 00035 #if defined(ITOM_IMPORT_API) && !defined(ITOM_CORE) 00036 void **ITOM_API_FUNCS; 00037 #else 00038 extern void **ITOM_API_FUNCS; 00039 #endif 00040 00061 00062 00068 #define apiFilterGetFunc \ 00069 (*(ito::RetVal (*)(const QString &name, ito::AddInAlgo::FilterDef *&filterDef)) ito::ITOM_API_FUNCS[0]) 00070 00072 00085 #define apiFilterCall \ 00086 (*(ito::RetVal (*)(const QString &name, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QVector<ito::ParamBase> *paramsOut)) ito::ITOM_API_FUNCS[1]) 00087 00088 #define apiFilterParam \ 00089 (*(ito::RetVal (*)(const QString &name, QVector<ito::Param> *paramsMand, QVector<ito::Param> *paramsOpt, QVector<ito::Param> *paramsOut)) ito::ITOM_API_FUNCS[2]) 00090 00091 #define apiFilterParamBase \ 00092 (*(ito::RetVal (*)(const QString &name, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QVector<ito::ParamBase> *paramsOut)) ito::ITOM_API_FUNCS[3]) 00093 00094 #define apiAddInGetInitParams \ 00095 (*(ito::RetVal (*)(const QString &name, const int, int *, QVector<ito::Param> *&, QVector<ito::Param> *&)) ito::ITOM_API_FUNCS[4]) 00096 00097 #define apiAddInOpenActuator \ 00098 (*(ito::RetVal (*)(const QString &name, const int, const bool, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt)) ito::ITOM_API_FUNCS[5]) 00099 00100 #define apiAddInOpenDataIO \ 00101 (*(ito::RetVal (*)(const QString &name, const int, const bool, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt)) ito::ITOM_API_FUNCS[6]) 00102 00104 00111 #define apiValidateStringMeta \ 00112 (*(ito::RetVal (*)(const ito::StringMeta *meta, const char* value, bool mandatory)) ito::ITOM_API_FUNCS[7]) 00113 00115 00121 #define apiValidateDoubleMeta \ 00122 (*(ito::RetVal (*)(const ito::DoubleMeta *meta, double value)) ito::ITOM_API_FUNCS[8]) 00123 00125 00131 #define apiValidateIntMeta \ 00132 (*(ito::RetVal (*)(const ito::IntMeta *meta, int value)) ito::ITOM_API_FUNCS[9]) 00133 00135 00141 #define apiValidateCharMeta \ 00142 (*(ito::RetVal (*)(const ito::CharMeta *meta, char value)) ito::ITOM_API_FUNCS[10]) 00143 00145 00152 #define apiValidateDoubleArrayMeta \ 00153 (*(ito::RetVal (*)(const ito::ParamMeta *meta, const double* values, size_t len)) ito::ITOM_API_FUNCS[28]) 00154 00156 00163 #define apiValidateIntArrayMeta \ 00164 (*(ito::RetVal (*)(const ito::ParamMeta *meta, const int* values, size_t len)) ito::ITOM_API_FUNCS[26]) 00165 00167 00174 #define apiValidateCharArrayMeta \ 00175 (*(ito::RetVal (*)(const ito::ParamMeta *meta, const char* values, size_t len)) ito::ITOM_API_FUNCS[25]) 00176 00178 00186 #define apiValidateHWMeta \ 00187 (*(ito::RetVal (*)(const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory)) ito::ITOM_API_FUNCS[11]) 00188 00189 #define apiCompareParam \ 00190 (*(ito::tCompareResult (*)(const ito::Param ¶mTemplate, const ito::Param ¶m, ito::RetVal &ret)) ito::ITOM_API_FUNCS[12]) 00191 00193 00210 #define apiValidateParam \ 00211 (*(ito::RetVal (*)(const ito::Param &templateParam, const ito::ParamBase ¶m, bool strict, bool mandatory)) ito::ITOM_API_FUNCS[13]) 00212 00214 00232 #define apiValidateAndCastParam \ 00233 (*(ito::RetVal (*)(const ito::Param &templateParam, const ito::ParamBase ¶m, bool strict, bool mandatory, bool roundToStep)) ito::ITOM_API_FUNCS[25]) 00234 00236 00247 #define apiGetParamFromMapByKey \ 00248 (*(ito::RetVal (*)(QMap<QString,ito::Param> ¶mMap, const QString &key, QMap<QString,ito::Param>::iterator &found, bool errorIfReadOnly)) ito::ITOM_API_FUNCS[14]) 00249 00251 00269 #define apiParseParamName \ 00270 (*(ito::RetVal (*)(const QString &name, QString ¶mName, bool &hasIndex, int &index, QString &additionalTag)) ito::ITOM_API_FUNCS[15]) 00271 00272 #define apiGetItemFromParamArray \ 00273 (*(ito::RetVal (*)(const ito::Param &arrayParam, const int index, ito::Param &itemParam)) ito::ITOM_API_FUNCS[16]) 00274 00275 #define apiGetParam \ 00276 (*(ito::Param (*)(const ito::Param ¶m, const bool hasIndex, const int index, ito::RetVal &ret)) ito::ITOM_API_FUNCS[20]) 00277 00279 00287 #define apiUpdateParameters \ 00288 (*(ito::RetVal (*)(QMap<QString, ito::Param> ¶mMap, const QVector<QSharedPointer<ito::ParamBase> > &values)) ito::ITOM_API_FUNCS[23]) 00289 00290 #define apiSaveQLIST2XML \ 00291 (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile ¶mFile)) ito::ITOM_API_FUNCS[17]) 00292 00293 #define apiLoadXML2QLIST \ 00294 (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile ¶mFile)) ito::ITOM_API_FUNCS[18]) 00295 00297 00313 #define apiCreateFromDataObject \ 00314 (* (ito::DataObject* (*)(const ito::DataObject *dObj, int nrDims, ito::tDataType type, int *sizeLimits, ito::RetVal *retval)) ito::ITOM_API_FUNCS[19]) 00315 00317 00334 #define apiCreateFromNamedDataObject \ 00335 (* (ito::DataObject* (*)(const ito::DataObject *dObj, int nrDims, ito::tDataType type, const char *name, int *sizeLimits, ito::RetVal *retval)) ito::ITOM_API_FUNCS[24]) 00336 00338 00343 #define apiGetCurrentWorkingDir \ 00344 (* (QString (*)(void)) ito::ITOM_API_FUNCS[21]) 00345 00347 00356 #define apiShowConfigurationDialog \ 00357 (* (ito::RetVal (*)(ito::AddInBase *plugin, ito::AbstractAddInConfigDialog *configDialogInstance)) ito::ITOM_API_FUNCS[22]) 00358 00362 //#if defined(ITOM_IMPORT_API) 00363 //static int importItomApi(void** apiArray) 00364 //{ 00365 // ito::ITOM_API_FUNCS = apiArray; 00366 // return 0; 00367 //} 00368 //#endif 00369 00370 }; 00371 00372 #endif //Q_MOC_RUN 00373 00374 #endif