GemaCoreLib
The GeMA Core library
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 
30 class Unit;
31 class GmValueInfo;
32 class GmValueAccessor;
33 class GmMesh;
34 
35 
38 {
39 public:
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 
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition: gmValueInfo.h:126
Interface storing property descriptions and values.
Definition: gmPropertySet.h:37
Declaration of the GmPluginObject base class.
virtual const char * pluginCategory() const
Returns the plugin category.
Definition: gmPropertySet.h:45
Interface class for accessing and setting values from an "indexable" collection of values.
Definition: gmValueAccessor.h:59
#define GM_PLUGIN_PROPERTYSET
Plugin implements material property sets.
Definition: gmPluginCategory.h:28
Auxiliar class used to store the complete set of simulation data.
Definition: gmSimulationData.h:51
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition: gmPluginObject.cpp:62
Declaration of macros for standard plugin categories.
Base interface class for all object plugins.
Definition: gmPluginObject.h:36
#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
Class representing a category with multiple logging levels.
Definition: gmLog.h:58
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
Base interface class for Mesh type plugins.
Definition: gmMesh.h:44