GemaCoreLib
The GeMA Core library
gmParseUtils.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_PARSE_UTILS_H_
25 #define _GEMA_PARSE_UTILS_H_
26 
27 #include "gmCoreConfig.h"
28 #include "gmInterpolator.h"
29 
30 #include <QVariant>
31 
33 namespace GmParseUtils
34 {
35  GMC_API_EXPORT int parseDimension (QVariant dim, int* nlin, int* ncol, int* ndepth = NULL);
36  GMC_API_EXPORT bool parseFormat (QString formatStr, int* fieldWidth, char* format, int* precision);
37  GMC_API_EXPORT void parseDefault (QVariant def, int nlin, int ncol, QString& defString, double* defVal);
38  GMC_API_EXPORT bool parseDataSrcString(QString str, QString& src, QString* unit, int* dim, QString* as);
39 
40  GMC_API_EXPORT bool parseDataSrc(QVariant def, QString& srcId, QString* unit, int* dim, QString* alias,
41  int* history, bool acceptsNoInterp, GmInterpolatorType* interpType,
42  QVariant* interpParam, QString& err);
43 
44 }
45 
46 #endif
void parseDefault(QVariant def, int nlin, int ncol, QString &defString, double *defVal)
An auxilliary function used to parse a default value definition, accepting scalars,...
Definition: gmParseUtils.cpp:152
Declaration of usefull configuration definitions for the Core library.
int parseDimension(QVariant dim, int *nlin, int *ncol, int *ndepth)
An auxiliary function to parse dimension values that can be expressed both as a single number or a st...
Definition: gmParseUtils.cpp:48
bool parseFormat(QString formatStr, int *fieldWidth, char *format, int *precision)
An auxiliary function used to parse a format string using the syntax: "%d.%d[fgeGE]" Returns the pars...
Definition: gmParseUtils.cpp:104
Groups utilitary routines for parsing models.
Definition: gmParseUtils.cpp:32
GmInterpolatorType
Available interpolation methods. Not every method is suitable for every kind of interpolator class....
Definition: gmInterpolator.h:62
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Declaration of the GmInterpolator and GmInterpolatorObject classes.