itom 1.0.14
D:/git-itom/sources/itom/Common/helperCommon.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 HELPERCOMMON_H
00029 #define HELPERCOMMON_H
00030 
00031 #include "typeDefs.h"
00032 #include "sharedStructures.h"
00033 
00034 #include <qstring.h>
00035 #include <qvector.h>
00036 #include <qobject.h>
00037 #include <qhash.h>
00038 
00039 
00040 
00041 namespace ito
00042 {
00043 
00044     ito::RetVal checkParamVector(QVector<ito::Param> *params);
00045     ito::RetVal checkParamVectors(QVector<ito::Param> *paramsMand, QVector<ito::Param> *paramsOpt, QVector<ito::Param> *paramsOut);
00046 
00047     ito::Param* getParamByName(QVector<ito::Param> *paramVec, const char* name, ito::RetVal *retval = NULL);
00048     ito::ParamBase* getParamByName(QVector<ito::ParamBase> *paramVec, const char* name, ito::RetVal *retval = NULL);
00049     QHash<QString, ito::Param*> createParamHashTable(QVector<ito::Param> *paramVec);
00050 
00051     bool checkNumericParamRange(const ito::Param &param, double value, bool *ok = NULL);
00052 
00053     ito::RetVal parseParamName(const QString &name, QString &paramName, bool &hasIndex, int &index, QString &additionalTag);
00054 
00055     ito::RetVal getParamValue(const QMap<QString, Param> *m_params, const QString &key, ito::Param &value, QString &pkey, int &index);
00056     ito::RetVal setParamValue(const QMap<QString, Param> *m_params, const QString &key, const ito::ParamBase value, QString &pkey, int &index);   
00057 
00058 };   // end namespace ito
00059 
00060 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends