#include <ObjId.h>
Public Member Functions | |
ObjId () | |
ObjId (Id i, unsigned int d, unsigned int f=0) | |
ObjId (Id i) | |
ObjId (const string &path) | |
string | path () const |
Eref | eref () const |
bool | operator== (const ObjId &other) const |
bool | operator!= (const ObjId &other) const |
bool | operator< (const ObjId &other) const |
bool | isDataHere () const |
bool | isGlobal () const |
Returns true if the Element is global. | |
bool | isOffNode () const |
Returns true if we need to go off-node for calling operations. | |
char * | data () const |
Element * | element () const |
bool | bad () const |
Public Attributes | |
Id | id |
unsigned int | dataIndex |
unsigned int | fieldIndex |
Friends | |
ostream & | operator<< (ostream &s, const ObjId &i) |
istream & | operator>> (istream &s, ObjId &i) |
This class manages lookups for specific data entries in elements, in a node-independent manner. It is basically a composite of Id and DataIndex.
ObjId::ObjId | ( | ) | [inline] |
Returns the root Id
ObjId::ObjId | ( | Id | i, | |
unsigned int | d, | |||
unsigned int | f = 0 | |||
) | [inline] |
ObjId::ObjId | ( | Id | i | ) | [inline] |
ObjId::ObjId | ( | const string & | path | ) |
Creates an ObjId by reading the path string Returns bad on failure.
bool ObjId::bad | ( | ) | const |
True if the return value is bad: either returning a failure, or the DataIndex or FieldIndex is out of range. However, this is a node-local funtion so it can't report the FieldIndex status in all cases.
References BADINDEX, dataIndex, fieldIndex, and Element::numData().
Referenced by ReadCell::addChannelMessage(), benchmarkMsg(), testAssortedMsg(), testMsgElementListing(), and testTreeTraversal().
char * ObjId::data | ( | ) | const |
Returns data entry for this object
References dataIndex, element(), and fieldIndex.
Referenced by addToBuf(), dispatchBuffers(), Msg::getMsg(), remoteFieldGetVec(), remoteGet(), remoteGetVec(), test2ArgSetVec(), testLookupSetGet(), testMsgField(), testSendSpike(), testSetGet(), testSetGetDouble(), and testSetGetExtField().
Element * ObjId::element | ( | ) | const |
Returns Element part
Referenced by Shell::adopt(), data(), Shell::doMove(), eref(), SparseMsg::findOtherEnd(), SingleMsg::findOtherEnd(), OneToOneMsg::findOtherEnd(), OneToOneDataIndexMsg::findOtherEnd(), OneToAllMsg::findOtherEnd(), getCompt(), Shell::innerMove(), isDataHere(), isGlobal(), isOffNode(), isPartOfDend(), GetOpFunc1< T, L, A >::op(), GetEpFunc1< T, L, A >::op(), Neutral::parent(), Neutral::path(), ReadCspace::printMol(), testGet(), testMsgField(), testSendSpike(), testSyncSynapseSize(), and wildcardTestFunc().
Eref ObjId::eref | ( | ) | const |
Returns the Eref matching itself.
References dataIndex, element(), and fieldIndex.
Referenced by Shell::adopt(), allChildren(), Shell::destroy(), Shell::doMove(), LookupField< L, A >::get(), Field< A >::get(), Field< A >::getVec(), Shell::innerMove(), Neutral::isDescendant(), GetOpFunc1< T, L, A >::op(), GetEpFunc1< T, L, A >::op(), Neutral::path(), path(), SetGet6< A1, A2, A3, A4, A5, A6 >::set(), SetGet5< A1, A2, A3, A4, A5 >::set(), SetGet4< A1, A2, A3, A4 >::set(), SetGet3< A1, A2, A3 >::set(), SetGet2< L, A >::set(), SetGet1< A >::set(), SetGet0::set(), SetGet2< L, A >::setVec(), SetGet1< A >::setVec(), singleLevelWildcard(), testGetMsg(), testObjIdToAndFromPath(), testSendSpike(), testShellAddMsg(), and testTable().
bool ObjId::isDataHere | ( | ) | const |
True if the data is present on the current node. Always true for globals, which confuses the matter somewhat.
References dataIndex, element(), and Shell::myNode().
Referenced by LookupField< L, A >::get(), and Field< A >::get().
bool ObjId::isGlobal | ( | ) | const |
Returns true if the Element is global.
References element().
Referenced by isOffNode(), SetGet6< A1, A2, A3, A4, A5, A6 >::set(), SetGet5< A1, A2, A3, A4, A5 >::set(), SetGet4< A1, A2, A3, A4 >::set(), SetGet3< A1, A2, A3 >::set(), SetGet2< L, A >::set(), SetGet1< A >::set(), and SetGet0::set().
bool ObjId::isOffNode | ( | ) | const |
Returns true if we need to go off-node for calling operations.
References dataIndex, element(), isGlobal(), Shell::myNode(), and Shell::numNodes().
Referenced by SetGet6< A1, A2, A3, A4, A5, A6 >::set(), SetGet5< A1, A2, A3, A4, A5 >::set(), SetGet4< A1, A2, A3, A4 >::set(), SetGet3< A1, A2, A3 >::set(), SetGet2< L, A >::set(), SetGet1< A >::set(), and SetGet0::set().
bool ObjId::operator!= | ( | const ObjId & | other | ) | const |
References dataIndex, fieldIndex, and id.
bool ObjId::operator< | ( | const ObjId & | other | ) | const |
For sorting
References dataIndex, fieldIndex, and id.
bool ObjId::operator== | ( | const ObjId & | other | ) | const |
For equality check
References dataIndex, fieldIndex, and id.
string ObjId::path | ( | ) | const |
Returns the absolute path including all array indices.
References eref().
Referenced by Shell::doMove(), Function::getExpr(), Field< A >::getVec(), testObjIdToAndFromPath(), and testTreeTraversal().
ostream& operator<< | ( | ostream & | s, | |
const ObjId & | i | |||
) | [friend] |
istream& operator>> | ( | istream & | s, | |
ObjId & | i | |||
) | [friend] |
unsigned int ObjId::dataIndex |
Referenced by allChildren(), bad(), data(), eref(), SparseMsg::findOtherEnd(), SingleMsg::findOtherEnd(), OneToOneMsg::findOtherEnd(), OneToOneDataIndexMsg::findOtherEnd(), OneToAllMsg::findOtherEnd(), DiagonalMsg::findOtherEnd(), innerCopyElements(), isDataHere(), isOffNode(), operator!=(), operator<(), operator<<(), operator==(), Neutral::path(), singleLevelWildcard(), testObjIdToAndFromPath(), DiagonalMsg::~DiagonalMsg(), OneToAllMsg::~OneToAllMsg(), OneToOneDataIndexMsg::~OneToOneDataIndexMsg(), OneToOneMsg::~OneToOneMsg(), SingleMsg::~SingleMsg(), and SparseMsg::~SparseMsg().
unsigned int ObjId::fieldIndex |
Referenced by bad(), data(), eref(), operator!=(), operator<(), operator<<(), operator==(), and testObjIdToAndFromPath().
Here are the data values.
Referenced by ReadKkit::assignPoolCompartments(), ReadKkit::assignReacCompartments(), Shell::destroy(), findModelParent(), DiagonalMsg::findOtherEnd(), getCompt(), NeuroMesh::getDendVoxelsOnCompartment(), NeuroMesh::getSpineVoxelsOnCompartment(), Id::Id(), operator!=(), operator<(), operator<<(), operator==(), operator>>(), Neutral::parent(), Neutral::path(), testObjIdToAndFromPath(), and testTreeTraversal().