![]() |
GemaCoreLib
The GeMA Core library
|
The GmDiscontinuityAccessor 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 the discontinuity. More...
#include <gmDiscontinuityAccessor.h>


Public Member Functions | |
| GmDiscontinuityAccessor (GmValueAccessor *ac) | |
| Constructor. Takes ownership of the accessor. | |
| const double * | value (const GmDiscontinuity *d) const |
| double | scalarValue (const GmDiscontinuity *d) const |
| void | matrixValue (const GmDiscontinuity *d, GmCRMatrix &mat) const |
| void | vectorValue (const GmDiscontinuity *d, GmCRVector &vec) const |
| bool | setValue (const GmDiscontinuity *d, const double *value) |
| bool | setScalarValue (const GmDiscontinuity *d, double value) |
| bool | setScalarValueAtDim (const GmDiscontinuity *d, int dim, double value) |
| bool | setValueAsDef (const GmDiscontinuity *d) |
| bool | setFunctionValue (const GmDiscontinuity *d, GmUserFunction *functionDef) |
| bool | setFunctionValue (const GmDiscontinuity *d, GmUserFunctionEvaluator *functionEval) |
| QString | valueStr (const GmDiscontinuity *d, bool evalFunctions, bool printDefAsNil, int fieldWidth=0, char format='g', int precision=-1) const |
| bool | setFunctionFromName (const GmDiscontinuity *d, QString userFunctionId, QString &err) |
| bool | setValueFromVariant (const GmDiscontinuity *d, const QVariant &v, bool acceptMissingDimension, QString &err) |
| bool | isDefValue (const GmDiscontinuity *d) const |
| bool | isFunction (const GmDiscontinuity *d) const |
| QString | functionId (const GmDiscontinuity *d) const |
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 |
| GmValueInfo * | info () const |
| bool | isScalar () const |
| Unit | unit () const |
| int | valueSize () const |
| const double * | defValue () const |
Protected Member Functions | |
| bool | logUserFunctionError () |
| Logs an error since discontinuity accessors can not work with functions. | |
| virtual int | queryIndex (const GmDiscontinuity *d) const =0 |
| A virtual function that given a discontinuity returns the index that should be accessed. | |
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 |
The GmDiscontinuityAccessor 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 the discontinuity.
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.
1.8.15