GemaCoreLib
The GeMA Core library
Public Member Functions | Protected Member Functions | List of all members
GmCellAccessor Class Referenceabstract

The GmCellAccessor class is a proxy object to a value accesor implementing a more convenient interface where indices used to retrieve / store values are replaced by a reference to a cell. More...

#include <gmCellAccessor.h>

Inheritance diagram for GmCellAccessor:
Inheritance graph
[legend]
Collaboration diagram for GmCellAccessor:
Collaboration graph
[legend]

Public Member Functions

 GmCellAccessor (GmValueAccessor *ac)
 Constructor. Takes ownership of the accessor.
 
const double * valueAt (const GmCell *c, const GmVector *coord, int ip=-1) const
 
double scalarValueAt (const GmCell *c, const GmVector *coord, int ip=-1) const
 
void matrixValueAt (const GmCell *c, const GmVector *coord, GmCRMatrix &mat, int ip=-1) const
 
void vectorValueAt (const GmCell *c, const GmVector *coord, GmCRVector &vec, int ip=-1) const
 
bool setValue (const GmCell *c, const double *value)
 
bool setScalarValue (const GmCell *c, double value)
 
bool setScalarValueAtDim (const GmCell *c, int dim, double value)
 
bool setValueAsDef (const GmCell *c)
 
bool setFunctionValue (const GmCell *c, GmUserFunction *functionDef)
 
bool setFunctionValue (const GmCell *c, GmUserFunctionEvaluator *functionEval)
 
QString valueStr (const GmCell *c, bool evalFunctions, bool printDefAsNil, int fieldWidth=0, char format='g', int precision=-1, const GmVector *coord=NULL, int ip=-1) const
 
bool setFunctionFromName (const GmCell *c, QString userFunctionId, QString &err)
 
bool setValueFromVariant (const GmCell *c, const QVariant &v, bool acceptMissingDimension, QString &err)
 
bool isDefValue (const GmCell *c) const
 
bool isFunction (const GmCell *c) const
 
QString functionId (const GmCell *c) const
 
- Public Member Functions inherited from GmCellAccessorProxy
 GmCellAccessorProxy (GmValueAccessor *ac)
 Constructor. Takes ownership of the accessor.
 
- Public Member Functions inherited from GmAccessorProxy
 GmAccessorProxy (GmValueAccessor *ac)
 Constructor. Takes ownership of the accessor.
 
virtual ~GmAccessorProxy ()
 Virtual destructor. Disposes the wrapped accessor.
 
int size () const
 
GmValueInfoinfo () const
 
bool isScalar () const
 
Unit unit () const
 
int valueSize () const
 
const double * defValue () const
 

Protected Member Functions

virtual int queryIndex (const GmCell *c) const =0
 A virtual function that given a cell returns the index that should be accessed.
 
- Protected Member Functions inherited from GmCellAccessorProxy
void saveCellInContext (const GmCell *c, int ip) const
 A function that given a cell, saves it in the context. The ip parameter should store the integration point index equivalent to the coordinate passed to the function evaluation or -1 if this is not an integration point or the information is unavailable (in that case the function evaluation will try to find out which integration point is equivalent to a coordinate, if necessary, but that takes some effort)
 
- Protected Member Functions inherited from GmAccessorProxy
double convertToAccessorUnit (double val) const
 An utility function that given a value, converts it to the accessor unit. If no conversion is needed, returns val.
 
const double * convertToAccessorUnit (const double *p) const
 An utility function that given a pointer to the stored data, converts the value to the accessor unit and returns a pointer to the internal buffer used to store the converted value. If no conversion is needed, returns p.
 
void convertFromAccessorUnit (double val, double *dst) const
 Copies the value given by val into the area pointed to by dst, converting units if needed.
 
void convertFromAccessorUnit (const double *val, double *dst) const
 Copies the values given by val into the area pointed to by dst, converting units if needed.
 

Additional Inherited Members

- Protected Attributes inherited from GmAccessorProxy
GmValueAccessor_ac
 

Detailed Description

The GmCellAccessor class is a proxy object to a value accesor implementing a more convenient interface where indices used to retrieve / store values are replaced by a reference to a cell.

This is a pure virtual class that should have its query method reimplemented in derived classes to treat the different cases that appear when treating attribute or property accessors.


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