tuchulcha  0.10.1
Graphical Workflow Configuration Editor
VarTypeMap.h
Go to the documentation of this file.
1 /* Copyright (C) 2009 Jens-Malte Gottfried
2 
3  This file is part of Tuchulcha.
4 
5  Tuchulcha is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Tuchulcha is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with Tuchulcha. If not, see <http://www.gnu.org/licenses/>.
17 */
23 #ifndef VARTYPEMAP_H_
24 #define VARTYPEMAP_H_
25 
26 #include <QMap>
27 #include <QString>
28 #include <QVariant>
29 #include <QMutex>
30 
36 class VarTypeMap {
37 private:
38  VarTypeMap();
39  ~VarTypeMap();
40  VarTypeMap(const VarTypeMap&);
42 
44  QMap<QString, QVariant::Type> _typeMap;
48  static QMutex _lock;
49 public:
51  static VarTypeMap& instance();
52 
54  QVariant::Type operator[](QString type) const;
55 };
56 
57 #endif /*VARTYPEMAP_H_*/
static VarTypeMap * _address
pointer to the singleMapper instance
Definition: VarTypeMap.h:46
QVariant::Type operator[](QString type) const
return type map
Definition: VarTypeMap.cpp:53
QMap< QString, QVariant::Type > _typeMap
mapping from given type values to QVariant types
Definition: VarTypeMap.h:44
VarTypeMap & operator=(const VarTypeMap &)
not assignable
Convert parameter types into Qt versions.
Definition: VarTypeMap.h:36
static VarTypeMap & instance()
return reference to an VarTypeMap instance
Definition: VarTypeMap.cpp:46
static QMutex _lock
Mutex to avoid multiple creation.
Definition: VarTypeMap.h:48