Ease of access structure for user-provided data on the tape for external functions. See ExternalFunctionTapeInterface. More...
#include <externalFunctionUserData.hpp>
Public Member Functions | |
| template<typename Type> | |
| size_t | addData (Type const &value) |
| template<typename Type> | |
| size_t | addData (Type const *value, int const size) |
| void | clear () |
| Delete all data entries. | |
| ExternalFunctionUserData () | |
| Constructor. | |
| ExternalFunctionUserData (ExternalFunctionUserData const &other) | |
| Constructor. | |
| ExternalFunctionUserData & | operator= (ExternalFunctionUserData const &other) |
| Copy operator. | |
| ~ExternalFunctionUserData () | |
| Destructor. | |
In order accessors | |
| template<typename Type> | |
| void | getData (Type &value) |
| Get a copy of the next data item. | |
| template<typename Type> | |
| Type const & | getData () |
| Get a constant reference to the next data item. | |
| template<typename Type> | |
| Type & | getDataRef () |
| Get a reference to the next data item. | |
| template<typename Type> | |
| void | getData (Type *value, int const size) |
| Get the next data item and copy it as an array. The target array must have the correct size. | |
| template<typename Type> | |
| Type const * | getDataArray () |
| Get the address of the next data item. Intended for reference access to array items. | |
| void | resetPos () |
| Manually reset the position. | |
Out of order accessors | |
| template<typename Type> | |
| void | getDataByIndex (Type &value, size_t pos) |
| template<typename Type> | |
| Type const & | getDataByIndex (size_t pos) |
| template<typename Type> | |
| Type & | getDataRefByIndex (size_t pos) |
| template<typename Type> | |
| void | getDataByIndex (Type *value, int const size, size_t pos) |
| template<typename Type> | |
| Type const * | getDataArrayByIndex () |
| Get the address of a data item based on the index. Intended for reference access to array items. | |
Ease of access structure for user-provided data on the tape for external functions. See ExternalFunctionTapeInterface.
Stores copies of the data provided to the add methods, either a single value or an entire array.
The data can be retrieved in two different manners. Subsequent calls to get* methods provide the data elements in the order in which they were added (In order access.). The get*ByIndex methods can be used to query the pos-th added item explicitly (Out of order access.).
After the last data element is accessed by a get* method, the next get* call will return the first one.
The direct access function will not change the internal positioning.
|
inline |
Add a value to the store. The value is copied.
|
inline |
Add an array to the store. The array is copied.
|
inline |
Get a constant reference to a data item based on the index.
The internal position is not modified.
|
inline |
Get a copy of a data item based on the index.
The internal position is not modified.
|
inline |
Get a data item based on the index and copy it as an array. The target array must have the correct size.
The internal position is not modified.
|
inline |
Get a reference to a item based on the index.
The internal position is not modified.