GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmPluginData.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_PLUGIN_DATA_H_
25#define _GEMA_PLUGIN_DATA_H_
26
27#include "gmLog.h"
28#include <QVariant>
29#include <luaFunction.h>
30
37{
38public:
39 GmPluginData(const QVariantMap& data);
41
43 QString id() const { return _data.value("id").toString(); }
44
46 QString description() const { return _data.value("description").toString(); }
47
49 QString typeName() const { return _data.value("typeName").toString(); }
50
52 QVariant value(QString field) const { return _data.value(field); }
53
54 LuaFunction* luaFunction(QString field) const;
55
57 const QVariantMap& data() const { return _data; }
58
59 void setLuaFunction(QString field, int tid, LuaFunction* func);
60
61 void printParameters(const GmLogCategory& logger) const;
62
63private:
64 QVariantMap _data;
65};
66
67
68
69
70#endif
71
Class representing a category with multiple logging levels.
Definition gmLog.h:58
This class is a simple wrapper over a generic Lua table, provided in the model, that also handles the...
Definition gmPluginData.h:37
QString description() const
Returns the object description.
Definition gmPluginData.h:46
QString id() const
Returns the object id.
Definition gmPluginData.h:43
const QVariantMap & data() const
Returns the map with stored data.
Definition gmPluginData.h:57
QString typeName() const
Returns the alias with wich this object was created (or PluginData if not created by an alias)
Definition gmPluginData.h:49
QVariantMap _data
The stored data;.
Definition gmPluginData.h:64
QVariant value(QString field) const
Returns the value of the stored field as a QVariant. For Lua functions, use luaFunction() instead.
Definition gmPluginData.h:52
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
Declaration of support functions and macros for information logging.
T value() const const