23#ifndef _GEMA_VALUE_SET_GROUP_H_
24#define _GEMA_VALUE_SET_GROUP_H_
45 virtual bool removeValueSet(
QString id,
bool releaseInfo =
false);
48 bool isEmpty()
const {
return _valueSets.isEmpty(); }
51 int numSets()
const {
return _valueSets.size(); }
53 void addValueSetBegin();
54 bool addValueSetEnd();
59 int nextNewPack()
const;
61 virtual bool init(
int numValues);
69 virtual bool addValues (
int numAddedValues);
70 virtual void removeValues(
int index,
int numValues);
71 virtual void restoreSize (
int oldSize);
74 virtual void clearData();
94 virtual size_t usedMemory()
const;
96#if defined ENABLE_TESTS || defined ENABLE_VALUESET_TESTS
97 virtual void validateInternalStructure();
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
The basic interface for a shared buffer storing interleaved data for a group of value sets.
Definition gmPackedBuffer.h:119
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition gmValueInfo.h:132
This class manages a group of ValueSets that have all the same size and must grow (or shrink) togethe...
Definition gmValueSetGroup.h:38
bool insideAddBlock() const
Returns true if addValueSetBegin() has been called without a matching addValueSetEnd() call.
Definition gmValueSetGroup.h:57
virtual GmValueSet * createValueSet(GmValueInfo *info, GmPackedBuffer *pack)
Virtual function used to create the stored value set. Can be overwritten by descendant classes.
Definition gmValueSetGroup.h:102
bool contains(QString id) const
Returns true if the group contains a value set for an attribute named id.
Definition gmValueSetGroup.h:82
QMap< int, GmPackedBuffer * > _packs
A map indexing packed buffers by their id.
Definition gmValueSetGroup.h:114
int _numValues
The size of the stored value sets.
Definition gmValueSetGroup.h:110
bool isEmpty() const
Returns true if this group is empty (does not include any value set).
Definition gmValueSetGroup.h:48
const QVector< GmValueSet * > & valueSets() const
Returns a list with the stored value sets. The map returned by dataMap() is an index onto this list....
Definition gmValueSetGroup.h:88
int numSets() const
Returns the number of sets stored in this group.
Definition gmValueSetGroup.h:51
QVector< GmValueSet * > _valueSets
The list of stored value sets.
Definition gmValueSetGroup.h:113
bool _init
Have we been initialized yet?
Definition gmValueSetGroup.h:108
GmSimulationData * _simData
The simulation data object. Needed for value sets accepting function values. Might be NULL.
Definition gmValueSetGroup.h:106
GmValueSet * valueSet(QString id) const
Returns the value set associated with the given data id. Returns NULL if not found.
Definition gmValueSetGroup.h:91
GmMesh * _mesh
The associated mesh object. Needed for most value sets accepting function values (except property set...
Definition gmValueSetGroup.h:107
QMap< QString, int > _idMap
Maps stored value set ids to their position in _valueSets.
Definition gmValueSetGroup.h:112
const QMap< QString, int > & dataMap() const
Returns a map indexed by value set data id, storing the id position in the value set list.
Definition gmValueSetGroup.h:79
int _insideBlock
Are we inside an addValueSetBegin / End block? If inside, stores the index in _valueSets of the first...
Definition gmValueSetGroup.h:109
bool initialized() const
Returns true if the group has been initialized with a call to init()
Definition gmValueSetGroup.h:64
int numValues() const
Returns the size (number of "entries") of the stored value sets.
Definition gmValueSetGroup.h:67
Basic class used to store sets of values, bound to a common definition, on behalf of another object (...
Definition gmValueSet.h:54
SaveStateMode
Initialization mode for calls to saveState()
Definition gmValueSet.h:60
Declaration of useful configuration definitions for the Core library.
#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
GmLogLevel
Available log levels list.
Definition gmLog.h:36
Declaration of the GmValueSet class.