GemaCoreLib
The GeMA Core library
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
GmAccessorProxy Class Reference

Helper class with common code for several classes that wrap a value accessor, provinding a slitly different indexing mode (such as a cell accessor where indices the cell pointer or a Gauss accessor where indices are the element pointer + an ip index). More...

#include <gmAccessorProxy.h>

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

Public Member Functions

 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

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.
 

Protected Attributes

GmValueAccessor_ac
 

Friends

class GmStateDump
 
class GmHdf5
 

Detailed Description

Helper class with common code for several classes that wrap a value accessor, provinding a slitly different indexing mode (such as a cell accessor where indices the cell pointer or a Gauss accessor where indices are the element pointer + an ip index).


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