itom 1.0.14
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 namespace ito 
00032 {
00033 
00034     #if defined(ITOM_IMPORT_API) && !defined(ITOM_CORE)
00035         void **ITOM_API_FUNCS;
00036     #else
00037         extern void **ITOM_API_FUNCS;
00038     #endif
00039 
00060 
00061 
00067         #define apiFilterGetFunc \
00068                 (*(ito::RetVal (*)(const QString &name, ito::AddInAlgo::FilterDef *&filterDef)) ito::ITOM_API_FUNCS[0])
00069         
00071 
00084         #define apiFilterCall \
00085                 (*(ito::RetVal (*)(const QString &name, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QVector<ito::ParamBase> *paramsOut)) ito::ITOM_API_FUNCS[1])
00086 
00087         #define apiFilterParam \
00088                 (*(ito::RetVal (*)(const QString &name, QVector<ito::Param> *paramsMand, QVector<ito::Param> *paramsOpt, QVector<ito::Param> *paramsOut)) ito::ITOM_API_FUNCS[2])
00089 
00090     #define apiFilterParamBase \
00091                 (*(ito::RetVal (*)(const QString &name, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QVector<ito::ParamBase> *paramsOut)) ito::ITOM_API_FUNCS[3])
00092 
00093         #define apiAddInGetInitParams \
00094                 (*(ito::RetVal (*)(const QString &name, const int, int *, QVector<ito::Param> *&, QVector<ito::Param> *&)) ito::ITOM_API_FUNCS[4])
00095 
00096         #define apiAddInOpenActuator \
00097                 (*(ito::RetVal (*)(const QString &name, const int, const bool, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt)) ito::ITOM_API_FUNCS[5])
00098 
00099         #define apiAddInOpenDataIO \
00100                 (*(ito::RetVal (*)(const QString &name, const int, const bool, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt)) ito::ITOM_API_FUNCS[6])
00101 
00103 
00110     #define apiValidateStringMeta \
00111         (*(ito::RetVal (*)(const ito::StringMeta *meta, const char* value, bool mandatory)) ito::ITOM_API_FUNCS[7])
00112 
00114 
00120     #define apiValidateDoubleMeta \
00121         (*(ito::RetVal (*)(const ito::DoubleMeta *meta, double value)) ito::ITOM_API_FUNCS[8])
00122 
00124 
00130     #define apiValidateIntMeta \
00131         (*(ito::RetVal (*)(const ito::IntMeta *meta, int value)) ito::ITOM_API_FUNCS[9])
00132 
00134 
00140     #define apiValidateCharMeta \
00141         (*(ito::RetVal (*)(const ito::CharMeta *meta, char value)) ito::ITOM_API_FUNCS[10])
00142 
00144 
00152     #define apiValidateHWMeta \
00153         (*(ito::RetVal (*)(const ito::HWMeta *meta, ito::AddInBase *value, bool mandatory)) ito::ITOM_API_FUNCS[11])
00154 
00155     #define apiCompareParam \
00156         (*(ito::tCompareResult (*)(const ito::Param &paramTemplate, const ito::Param &param, ito::RetVal &ret)) ito::ITOM_API_FUNCS[12])
00157     
00158     #define apiValidateParam \
00159         (*(ito::RetVal (*)(const ito::Param &templateParam, const ito::ParamBase &param, bool strict, bool mandatory)) ito::ITOM_API_FUNCS[13])
00160         
00162 
00173     #define apiGetParamFromMapByKey \
00174         (*(ito::RetVal (*)(QMap<QString,ito::Param> &paramMap, const QString &key, QMap<QString,ito::Param>::iterator &found, bool errorIfReadOnly)) ito::ITOM_API_FUNCS[14])
00175     
00177 
00195     #define apiParseParamName \
00196         (*(ito::RetVal (*)(const QString &name, QString &paramName, bool &hasIndex, int &index, QString &additionalTag)) ito::ITOM_API_FUNCS[15])
00197 
00198     #define apiGetItemFromParamArray \
00199         (*(ito::RetVal (*)(const ito::Param &arrayParam, const int index, ito::Param &itemParam)) ito::ITOM_API_FUNCS[16])
00200 
00201     #define apiSaveQLIST2XML \
00202         (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile &paramFile)) ito::ITOM_API_FUNCS[17])
00203 
00204     #define apiLoadXML2QLIST \
00205         (*(ito::RetVal (*)(QMap<QString, ito::Param> *paramList , QString id, QFile &paramFile)) ito::ITOM_API_FUNCS[18])
00206         
00208 
00224         #define apiCreateFromDataObject \
00225                 (* (ito::DataObject* (*)(const ito::DataObject *dObj, int nrDims, ito::tDataType type, size_t *sizeLimits, ito::RetVal *retval)) ito::ITOM_API_FUNCS[19])
00226 
00230 #if defined(ITOM_IMPORT_API)
00231 static int importItomApi(void** apiArray)
00232 {
00233     ito::ITOM_API_FUNCS = apiArray;
00234     return 0;
00235 }
00236 #endif
00237 
00238 };
00239 
00240 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends