GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmPropertySet.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_PROPERTY_SET_H_
25#define _GEMA_PROPERTY_SET_H_
26
27#include "gmPluginObject.h"
28#include "gmPluginCategory.h"
29
30class Unit;
31class GmValueInfo;
32class GmValueAccessor;
33class GmMesh;
34
35
38{
39public:
40 GmPropertySet(GmSimulationData* simulation, QString id, QString description, const GmLogCategory& logger);
41
42 virtual ~GmPropertySet();
43
44 // Comments on the base class
45 virtual const char* pluginCategory() const { return GM_PLUGIN_PROPERTYSET; }
46
48 virtual int numProperties() const = 0;
49
51 virtual int numValues() const = 0;
52
54 virtual QStringList propertyIds() const = 0;
55
65 virtual QStringList valueIds() const = 0;
66
68 virtual GmValueInfo* propertyInfo(QString propertyId) const = 0;
69
85 virtual GmValueAccessor* propertyAccessor(QString propertyId, Unit desiredUnit,
86 const GmLogCategory& logger, const GmMesh* mesh) const = 0;
87
89 virtual int valueIndex(QString valueId) const = 0;
90
107 virtual int addValues(int numValues, const QStringList& ids = QStringList())
108 {
109 Q_UNUSED(numValues); Q_UNUSED(ids);
110 return -1;
111 }
112
113 virtual void printParameters(const GmLogCategory& logger);
114 virtual void printValues(const GmLogCategory& logger);
115};
116
117
118#endif
119
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
Base interface class for all object plugins.
Definition gmPluginObject.h:37
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition gmPluginObject.cpp:62
Interface storing property descriptions and values.
Definition gmPropertySet.h:38
virtual QStringList valueIds() const =0
Returns the ids of the values stored in the set, ordered in the same order as the values appear when ...
virtual GmValueInfo * propertyInfo(QString propertyId) const =0
Returns metadata information about a property or NULL if the property doesn't exists.
virtual int valueIndex(QString valueId) const =0
Returns the line index of the named property set or -1 if not found.
virtual int addValues(int numValues, const QStringList &ids=QStringList())
Adds numValues lines to the property set, initializing their columns with default values.
Definition gmPropertySet.h:107
virtual int numValues() const =0
Returns the number of property values (lines) stored in the set.
virtual const char * pluginCategory() const
Returns the plugin category.
Definition gmPropertySet.h:45
virtual QStringList propertyIds() const =0
Returns the ids of the properties stored in the set (no special order is enforced)
virtual GmValueAccessor * propertyAccessor(QString propertyId, Unit desiredUnit, const GmLogCategory &logger, const GmMesh *mesh) const =0
Returns an accessor for property values in the desired unit (can be a default unit for no unit conver...
virtual int numProperties() const =0
Returns the number of properties (columns) stored in the set.
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition gmValueInfo.h:132
#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 macros for standard plugin categories.
#define GM_PLUGIN_PROPERTYSET
Plugin implements material property sets.
Definition gmPluginCategory.h:28
Declaration of the GmPluginObject base class.