当前位置: 首页>>代码示例>>C++>>正文


C++ ObjId::data方法代码示例

本文整理汇总了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 );
}
开发者ID:hrani,项目名称:moose-core,代码行数:7,代码来源:HopFunc.cpp

示例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 );
}
开发者ID:hrani,项目名称:moose-core,代码行数:8,代码来源:HopFunc.cpp

示例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() );
}
开发者ID:hrani,项目名称:moose-core,代码行数:10,代码来源:EndoMesh.cpp

示例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 );
	}
}
开发者ID:2pysarthak,项目名称:moose-core-personal,代码行数:16,代码来源:Synapse.cpp

示例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 );
	}
}
开发者ID:2pysarthak,项目名称:moose-core-personal,代码行数:15,代码来源:Synapse.cpp

示例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.
}
开发者ID:hrani,项目名称:moose-core,代码行数:15,代码来源:HopFunc.cpp

示例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;
}
开发者ID:hrani,项目名称:moose-core,代码行数:17,代码来源:HopFunc.cpp

示例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 );
}
开发者ID:hrani,项目名称:moose-core,代码行数:6,代码来源:HopFunc.cpp


注:本文中的ObjId::data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。