#include <SetGet.h>
Public Member Functions | |
LookupField (const ObjId &dest) | |
Static Public Member Functions | |
static bool | set (const ObjId &dest, const string &field, L index, A arg) |
static bool | setVec (Id destId, const string &field, const vector< L > &index, const vector< A > &arg) |
static bool | setVec (ObjId dest, const string &field, const vector< L > &index, const vector< A > &arg) |
static bool | setRepeat (Id destId, const string &field, const vector< L > &index, A arg) |
static bool | innerStrSet (const ObjId &dest, const string &field, const string &indexStr, const string &val) |
static A | get (const ObjId &dest, const string &field, L index) |
static void | getVec (Id dest, const string &field, vector< L > &index, vector< A > &vec) |
static bool | innerStrGet (const ObjId &dest, const string &field, const string &indexStr, string &str) |
LookupField handles fields that have an index arguments. Examples include arrays and maps. The first argument in the 'Set' is the index, the second the value. The first and only argument in the 'get' is the index. Here A is the type of the value, and L the lookup index.
LookupField< L, A >::LookupField | ( | const ObjId & | dest | ) | [inline] |
static A LookupField< L, A >::get | ( | const ObjId & | dest, | |
const string & | field, | |||
L | index | |||
) | [inline, static] |
Gets a value on a specific object, looking it up using the provided index.
References SetGet::checkSet(), ObjId::eref(), ObjId::isDataHere(), and LookupGetOpFuncBase< L, A >::returnOp().
Referenced by lookupVolumeFromMesh(), testGetMsg(), testLookupSetGet(), and testTable().
static void LookupField< L, A >::getVec | ( | Id | dest, | |
const string & | field, | |||
vector< L > & | index, | |||
vector< A > & | vec | |||
) | [inline, static] |
Blocking call that returns a vector of values in vec. This variant goes through each target object entry on dest, and passes in the same lookup index to each one. The results are put together in the vector vec.
References SetGet::checkSet(), Id::element(), Id::path(), Element::resize(), and LookupGetOpFuncBase< L, A >::returnOp().
static bool LookupField< L, A >::innerStrGet | ( | const ObjId & | dest, | |
const string & | field, | |||
const string & | indexStr, | |||
string & | str | |||
) | [inline, static] |
Blocking virtual call for finding a value and returning in a string.
static bool LookupField< L, A >::innerStrSet | ( | const ObjId & | dest, | |
const string & | field, | |||
const string & | indexStr, | |||
const string & | val | |||
) | [inline, static] |
Blocking call using string conversion
static bool LookupField< L, A >::set | ( | const ObjId & | dest, | |
const string & | field, | |||
L | index, | |||
A | arg | |||
) | [inline, static] |
Blocking, typed 'Set' call. Identical to SetGet2::set.
Reimplemented from SetGet2< L, A >.
Referenced by testClock(), and testLookupSetGet().
static bool LookupField< L, A >::setRepeat | ( | Id | destId, | |
const string & | field, | |||
const vector< L > & | index, | |||
A | arg | |||
) | [inline, static] |
Faking setRepeat too. Just plugs into setVec.
References LookupField< L, A >::setVec().
static bool LookupField< L, A >::setVec | ( | ObjId | dest, | |
const string & | field, | |||
const vector< L > & | index, | |||
const vector< A > & | arg | |||
) | [inline, static] |
This setVec takes a specific object entry, presumably one with an array of values within it. The it goes through each specified index and assigns the corresponding argument. This is a brute-force assignment.
References LookupField< L, A >::setVec().
static bool LookupField< L, A >::setVec | ( | Id | destId, | |
const string & | field, | |||
const vector< L > & | index, | |||
const vector< A > & | arg | |||
) | [inline, static] |
This setVec assigns goes through each object entry in the destId, and assigns the corresponding index and argument to it.
Reimplemented from SetGet2< L, A >.
Referenced by LookupField< L, A >::setRepeat(), and LookupField< L, A >::setVec().