本文整理汇总了C++中ObjId::data方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjId::data方法的具体用法?C++ ObjId::data怎么用?C++ ObjId::data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjId
的用法示例。
在下文中一共展示了ObjId::data方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remoteFieldGetVec
void remoteFieldGetVec( const Eref& e, unsigned int bindIndex,
vector< double >& getRecvBuf )
{
static ObjId oi( 3 );
static PostMaster* p = reinterpret_cast< PostMaster* >( oi.data() );
p->remoteFieldGetVec( e, bindIndex, getRecvBuf );
}
示例2: remoteGetVec
void remoteGetVec( const Eref& e, unsigned int bindIndex,
vector< vector< double > >& getRecvBuf,
vector< unsigned int >& numOnNode )
{
static ObjId oi( 3 );
static PostMaster* p = reinterpret_cast< PostMaster* >( oi.data() );
p->remoteGetVec( e, bindIndex, getRecvBuf, numOnNode );
}
示例3: setSurround
void EndoMesh::setSurround( const Eref& e, ObjId v )
{
if ( !v.element()->cinfo()->isA( "ChemCompt" ) ) {
cout << "Warning: 'surround' may only be set to an object of class 'ChemCompt'\n";
cout << v.path() << " is of class " << v.element()->cinfo()->name() << endl;
return;
}
surround_ = v;
parent_ = reinterpret_cast< const MeshCompt* >( v.data() );
}
示例4: dropMsgCallback
// static function, executed by the Synapse Element when a message is
// dropped from the Element. Contracts the parent synapse array to fit.
// Typically the SynHandler won't resize, easier to just leave an
// unused entry. Could even reuse if a synapse is added later, but all
// this policy is independent of the Synapse class.
void Synapse::dropMsgCallback(
const Eref& e, const string& finfoName,
ObjId msg, unsigned int msgLookup )
{
if ( finfoName == "addSpike" ) {
ObjId pa = Neutral::parent( e );
SynHandlerBase* sh =
reinterpret_cast< SynHandlerBase* >( pa.data() );
sh->dropSynapse( msgLookup );
}
}
示例5: addMsgCallback
// static function, executed by the Synapse Element when a message is
// added to the Element. Expands the parent synapse array to fit.
void Synapse::addMsgCallback(
const Eref& e, const string& finfoName,
ObjId msg, unsigned int msgLookup )
{
if ( finfoName == "addSpike" ) {
ObjId pa = Neutral::parent( e );
SynHandlerBase* sh =
reinterpret_cast< SynHandlerBase* >( pa.data() );
unsigned int synapseNumber = sh->addSynapse();
SetGet2< unsigned int, unsigned int >::set(
msg, "fieldIndex", msgLookup, synapseNumber );
}
}
示例6: dispatchBuffers
void dispatchBuffers( const Eref& e, HopIndex hopIndex )
{
static ObjId oi( 3 );
static PostMaster* p = reinterpret_cast< PostMaster* >( oi.data() );
if ( Shell::numNodes() == 1 )
return;
if ( hopIndex.hopType() == MooseSetHop ||
hopIndex.hopType() == MooseGetHop ) {
p->dispatchSetBuf( e );
}
if ( hopIndex.hopType() == MooseSetVecHop ) {
p->dispatchSetBuf( e );
}
// More complicated stuff for get operations.
}
示例7: addToBuf
double* addToBuf( const Eref& er, HopIndex hopIndex, unsigned int size )
{
static ObjId oi( 3 );
static PostMaster* p = reinterpret_cast< PostMaster* >( oi.data() );
if ( hopIndex.hopType() == MooseSendHop ) {
return p->addToSendBuf( er, hopIndex.bindIndex(), size );
} else if ( hopIndex.hopType() == MooseSetHop ||
hopIndex.hopType() == MooseSetVecHop ) {
p->clearPendingSetGet(); // Cannot touch set buffer if pending.
return p->addToSetBuf( er, hopIndex.bindIndex(),
size, hopIndex.hopType() );
} else if ( hopIndex.hopType() == MooseTestHop ) {
return addToTestBuf( er, hopIndex.bindIndex(), size );
}
assert( 0 ); // Should not get here.
return 0;
}
示例8: remoteGet
double* remoteGet( const Eref& e, unsigned int bindIndex )
{
static ObjId oi( 3 );
static PostMaster* p = reinterpret_cast< PostMaster* >( oi.data() );
return p->remoteGet( e, bindIndex );
}