GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmValueSetPackedData Class Referenceabstract

The generic GmValueSetData interface for packed storage. More...

#include <gmValueSetPackedData.h>

Inheritance diagram for GmValueSetPackedData:
Collaboration diagram for GmValueSetPackedData:

Public Member Functions

virtual GmPackedBufferpack () const =0
 Returns the associated pack object;.
 
virtual void packLayoutUpdated ()=0
 Updates internal data after a layout update inside the pack. This INCLUDES internal buffer updates, allowing for the packed data object to store its internal buffer pointer + stride for better efficiency (for Single vectors only - the common case)
 
- Public Member Functions inherited from GmValueSetData
virtual ~GmValueSetData ()
 Virtual destructor.
 
virtual GmValueInfoinfo () const =0
 Returns a pointer to the associated value info object.
 
virtual bool isDual () const =0
 Returns true if the underlying data storage is a dual vector, false if not.
 
virtual int numValues () const =0
 Returns the number of values stored in this value set.
 
virtual int storedItemSize () const =0
 Returns the size in bytes of a value set item. It is usually equal to the data dimension (info()->size()) times the size of the data type (info()->sizeofStorageType()), but can be different if the underlying vector type is different from the requested storage type (when function support is requested, for example, all data is stored as double).
 
virtual GmTrackedValueAccessoraccessor (const GmLogCategory &logger, UnitConverter *conv, QString desiredUnit, bool atomic=false)=0
 Returns an accessor for the stored data. The atomic flag can be used by the caller to request that a protected version of the accessor is needed for multi-threaded cases.
 
virtual size_t usedMemory () const =0
 Returns an estimative of the memory used by the data set in bytes.
 

Additional Inherited Members

- Public Types inherited from GmValueSetData
enum  StoredValueType { GM_SVT_NUMBER , GM_SVT_FUNCTION , GM_SVT_FUNCTION_EVAL }
 Enumeration to detect the type of stored data for an index. More...
 
- Protected Member Functions inherited from GmValueSetData
virtual bool isDefValue (int index) const =0
 Returns true if the indexed value is the default value for the set.
 
virtual bool allValuesAreDef () const
 Checks that all stored values are equal to the default.
 
virtual StoredValueType storedValueType (int index) const =0
 Returns the type (number, function definition/evaluator) of the stored value for the given index.
 
virtual const double * value (int index) const =0
 Returns the numeric value stored at the given index (converted to a double if needed) Must be called only for indices storing numeric data. Does NOT evaluate functions.
 
virtual bool setValue (int index, const double *values)=0
 Updates the value stored at the given index with a numeric value (converted to the correct type if needed)
 
virtual void * functionValue (int index) const =0
 Returns a pointer to the stored function object. Return will be either a GmUserFunction* or a GmUserFunctionEvaluator* depending on the type returned by storedValueType(index). Must be called only for indices storing data of those types.
 
virtual bool setFunctionValue (int index, StoredValueType type, void *functionObj)=0
 Overload of setValue() storing a user function definition.
 

Detailed Description

The generic GmValueSetData interface for packed storage.

Member Function Documentation

◆ pack()

virtual GmPackedBuffer * GmValueSetPackedData::pack ( ) const
pure virtual

Returns the associated pack object;.

Implemented in GmNoFValueSetPackedData< T, Vector >, and GmNoFValueSetPackedData< double, Vector >.

◆ packLayoutUpdated()

virtual void GmValueSetPackedData::packLayoutUpdated ( )
pure virtual

Updates internal data after a layout update inside the pack. This INCLUDES internal buffer updates, allowing for the packed data object to store its internal buffer pointer + stride for better efficiency (for Single vectors only - the common case)

Implemented in GmNoFValueSetPackedData< T, Vector >, and GmNoFValueSetPackedData< double, Vector >.


The documentation for this class was generated from the following file: