itom 1.3.0
D:/git-itom/sources/itom/common/apiFunctionsInc.h
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 
00153     #define apiValidateHWMeta \
00154         (*(ito::RetVal (*)(const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory)) ito::ITOM_API_FUNCS[11])
00155 
00156     #define apiCompareParam \
00157         (*(ito::tCompareResult (*)(const ito::Param &paramTemplate, const ito::Param &param, ito::RetVal &ret)) ito::ITOM_API_FUNCS[12])
00158     
00160 
00177     #define apiValidateParam \
00178         (*(ito::RetVal (*)(const ito::Param &templateParam, const ito::ParamBase &param, bool strict, bool mandatory)) ito::ITOM_API_FUNCS[13])
00179 
00181 
00199     #define apiValidateAndCastParam \
00200         (*(ito::RetVal (*)(const ito::Param &templateParam, const ito::ParamBase &param, bool strict, bool mandatory, bool roundToStep)) ito::ITOM_API_FUNCS[25])
00201     
00203 
00214     #define apiGetParamFromMapByKey \
00215         (*(ito::RetVal (*)(QMap<QString,ito::Param> &paramMap, const QString &key, QMap<QString,ito::Param>::iterator &found, bool errorIfReadOnly)) ito::ITOM_API_FUNCS[14])
00216     
00218 
00236     #define apiParseParamName \
00237         (*(ito::RetVal (*)(const QString &name, QString &paramName, bool &hasIndex, int &index, QString &additionalTag)) ito::ITOM_API_FUNCS[15])
00238 
00239     #define apiGetItemFromParamArray \
00240         (*(ito::RetVal (*)(const ito::Param &arrayParam, const int index, ito::Param &itemParam)) ito::ITOM_API_FUNCS[16])
00241 
00242     #define apiGetParam \
00243         (*(ito::Param (*)(const ito::Param &param, const bool hasIndex, const int index, ito::RetVal &ret)) ito::ITOM_API_FUNCS[20])
00244     
00246 
00254     #define apiUpdateParameters \
00255         (*(ito::RetVal (*)(QMap<QString, ito::Param> &paramMap, const QVector<QSharedPointer<ito::ParamBase> > &values)) ito::ITOM_API_FUNCS[23])
00256 
00257     #define apiSaveQLIST2XML \
00258         (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile &paramFile)) ito::ITOM_API_FUNCS[17])
00259 
00260     #define apiLoadXML2QLIST \
00261         (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile &paramFile)) ito::ITOM_API_FUNCS[18])
00262     
00264 
00280     #define apiCreateFromDataObject \
00281         (* (ito::DataObject* (*)(const ito::DataObject *dObj, int nrDims, ito::tDataType type, int *sizeLimits, ito::RetVal *retval)) ito::ITOM_API_FUNCS[19])
00282 
00284 
00301     #define apiCreateFromNamedDataObject \
00302         (* (ito::DataObject* (*)(const ito::DataObject *dObj, int nrDims, ito::tDataType type, const char *name, int *sizeLimits, ito::RetVal *retval)) ito::ITOM_API_FUNCS[24])
00303     
00305 
00310     #define apiGetCurrentWorkingDir \
00311         (* (QString (*)(void)) ito::ITOM_API_FUNCS[21])
00312     
00314 
00323     #define apiShowConfigurationDialog \
00324         (* (ito::RetVal (*)(ito::AddInBase *plugin, ito::AbstractAddInConfigDialog *configDialogInstance)) ito::ITOM_API_FUNCS[22])
00325 
00329 //#if defined(ITOM_IMPORT_API)
00330 //static int importItomApi(void** apiArray)
00331 //{
00332 //    ito::ITOM_API_FUNCS = apiArray;
00333 //    return 0;
00334 //}
00335 //#endif
00336 
00337 };
00338 
00339 #endif //Q_MOC_RUN
00340 
00341 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends