• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ Id函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Id函数的典型用法代码示例。如果您正苦于以下问题:C++ Id函数的具体用法?C++ Id怎么用?C++ Id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: new

// -----------------------------------------------------------------------------
// CLandmarksCategoriesView::DoActivateL
// 
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CLandmarksCategoriesView::DoActivateL(
    const TVwsViewId& /*aPrevViewId*/,
    TUid /*aCustomMessageId*/,
    const TDesC8& /*aCustomMessage*/)
    {
    if (!iContainer)
        {
        iContainer = new (ELeave) CLandmarksCategoriesContainer(
            *this, *iEngine, *(MenuBar()));
        iContainer->SetMopParent(this);
	    iContainer->ConstructL(ClientRect());
        }

    // Enable receiving of keyboard events.
    AppUi()->AddToStackL(*this, iContainer);

    // Make view visible.
    iContainer->MakeVisible(ETrue);

    // Notify that this view is active.
    TBool isActive = ETrue;
    iEngine->NotifyViewActivated(Id(), isActive);
    }
开发者ID:fedor4ever,项目名称:packaging,代码行数:29,代码来源:LandmarksCategoriesView.cpp


示例2: findCompt

void Cell::reinit( const Eref& cell, ProcPtr p )
//~ void Cell::reinit( const Eref& cell, const Qinfo* q )
{
	cout << ".. Cell::reinit()" << endl;
	//~ if ( q->protectedAddToStructuralQ() )
		//~ return;
	
	// Delete existing solver
	//~ string solverPath = cell.id().path() + "/" + solverName_;
	//~ Id solver( solverPath );
	//~ if ( solver.path() == solverPath )
		//~ solver.destroy();
	
	if ( method_ == "ee" )
		return;
	
	// Find any compartment that is a descendant of this cell
	Id seed = findCompt( cell.id() );
	if ( seed == Id() ) // No compartment found.
		return;
	
	setupSolver( cell.id(), seed );
}
开发者ID:Vivek-sagar,项目名称:moose-1,代码行数:23,代码来源:Cell.cpp


示例3: assert

bool Shell::innerMove( Id orig, ObjId newParent )
{
	static const Finfo* pf = Neutral::initCinfo()->findFinfo( "parentMsg" );
	static const DestFinfo* pf2 = dynamic_cast< const DestFinfo* >( pf );
	static const FuncId pafid = pf2->getFid();
	static const Finfo* f1 = Neutral::initCinfo()->findFinfo( "childOut" );

	assert( !( orig == Id() ) );
	assert( !( newParent.element() == 0 ) );

	ObjId mid = orig.element()->findCaller( pafid );
	Msg::deleteMsg( mid );

	Msg* m = new OneToAllMsg( newParent.eref(), orig.element(), 0 );
	assert( m );
	if ( !f1->addMsg( pf, m->mid(), newParent.element() ) ) {
		cout << "move: Error: unable to add parent->child msg from " <<
			newParent.element()->getName() << " to " << 
			orig.element()->getName() << "\n";
		return 0;
	}
	return 1;
}
开发者ID:iampritishpatil,项目名称:moose,代码行数:23,代码来源:Shell.cpp


示例4: Id

void Leftist::Lnode::Picture (int level, char const * stg)
  {

  int ii;
  for (ii=1; ii < level; ii++) cout << stg;
  cout << "Token: " << Id() << ", "
       << "Time: " << time << ", "
       << "Event: ";
  char egg [TINY_BFR_SIZ+1];
  if (event_id >= 0)
    cout << event_id;
  else
    {
    strncpy(egg, fn_descr, TINY_BFR_SIZ); egg [TINY_BFR_SIZ] = 0;
    cout << "'" << egg << "'";
    }
  cout << "\n";

  if (lson)
    lson->Picture (level+1, "'' ");
  if (rson)
    rson->Picture (level+1, "`` ");
  }
开发者ID:ljr,项目名称:mm1k,代码行数:23,代码来源:leftist.cpp


示例5: LOG

void
Volume::Dump(const char* aLabel) const
{
  LOG("%s: Volume: %s (%d) is %s and %s @ %s gen %d locked %d",
      aLabel,
      NameStr(),
      Id(),
      StateStr(),
      MediaPresent() ? "inserted" : "missing",
      MountPoint().get(),
      MountGeneration(),
      (int)IsMountLocked());
  LOG("%s:   Sharing %s Mounting %s Formating %s Unmounting %s",
      aLabel,
      CanBeShared() ? (IsSharingEnabled() ? (IsSharing() ? "en-y" : "en-n")
                                          : "dis")
                    : "x",
      IsMountRequested() ? "req" : "n",
      IsFormatRequested() ? (IsFormatting() ? "req-y" : "req-n")
                          : (IsFormatting() ? "y" : "n"),
      IsUnmountRequested() ? (IsUnmounting() ? "req-y" : "req-n")
                           : (IsUnmounting() ? "y" : "n"));
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:23,代码来源:Volume.cpp


示例6: AddFile

unsigned short int AddFile(boost::filesystem::path p, unsigned short int top, std::string prefix, file_list& files)
{
    if(Contains(p.string(), files))
        return Id(p.string(), files);
    file_info temp;
    temp.fileID = files.size()+1;
    temp.parentID = top;
    if(!boost::filesystem::exists(p))
        temp.file = false;
    else if(boost::filesystem::is_directory(boost::filesystem::status(p)))
        temp.file = false;
    else
        temp.file = true;

	strcpy(temp.filename, p.filename().string().c_str());
    strcpy(temp.fullname, p.string().c_str());

    std::cout << "Adding " << prefix << temp.fullname << " to archive\n";

    files.push_back(temp);

    return temp.fileID;
}
开发者ID:thekidder,项目名称:taffy,代码行数:23,代码来源:walker.cpp


示例7: MCECLI_DEBUG

// -----------------------------------------------------------------------------
// CMceMicSource::SetGainL
// -----------------------------------------------------------------------------
//        
EXPORT_C void CMceMicSource::SetGainL( TInt aGain )
	{
    MCECLI_DEBUG("CMceMicSource::SetGainL, Entry");
    MCECLI_DEBUG_DVALUE("gain", aGain);
    
    if ( MCE_ENDPOINT_ITC_ALLOWED( *this ) )
        {
    	CMceSession* session = iStream->Session();

    	TMceIds ids;
    	session->PrepareForITC( ids );
    	ids.iMediaID   = iStream->Id();
    	ids.iSourceID  = Id();
    	
    	TMceItcArgTInt gain( aGain );
        session->ITCSender().WriteL( ids, EMceItcSetGain, gain );
        }
        
    FLAT_DATA( iGain ) = aGain; 
    
    MCECLI_DEBUG("CMceMicSource::SetGainL, Exit");
    
	}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:27,代码来源:mcemicsource.cpp


示例8: Id

Id SigNeur::findSoma( const vector< Id >& compts )
{
	double maxDia = 0;
	Id maxCompt;
	vector< Id > somaCompts; // Theoretically possible to have an array.
	for ( vector< Id >::const_iterator i = compts.begin(); 
		i != compts.end(); ++i )
	{
		string className = i->eref()->className();
		if ( className == "Compartment" || className == "SymCompartment" ) {
			string name = i->eref().e->name();
			if ( name == "soma" || name == "Soma" || name == "SOMA" )
				somaCompts.push_back( *i );
			double dia;
			get< double >( i->eref(), "diameter", dia );
			if ( dia > maxDia )
				maxCompt = *i;
		}
	}
	if ( somaCompts.size() == 1 ) // First, go by name.
		return somaCompts[0];
	if ( somaCompts.size() == 0 & maxCompt.good() ) //if no name, use maxdia
		return maxCompt;
	if ( somaCompts.size() > 1 ) { // Messy but unlikely cases.
		if ( maxCompt.good() ) {
			if ( find( somaCompts.begin(), somaCompts.end(), maxCompt ) != somaCompts.end() )
				return maxCompt;
			else
				cout << "Error, soma '" << somaCompts.front().path() << 
					"' != biggest compartment '" << maxCompt.path() << 
					"'\n";
		}
		return somaCompts[0]; // Should never happen, but an OK response.
	}
	cout << "Error: SigNeur::findSoma failed to find soma\n";
	return Id();
}
开发者ID:BhallaLab,项目名称:moose-thalamocortical,代码行数:37,代码来源:SigNeurNeuron.cpp


示例9: G

void ForceConst::Svd(){
	int n=Rms.dim1();
	int StartLoop=static_cast<int> (Percent*n);
	Array2D<double> U, V, S;
	Array1D<double> s;
/*
	for(int i=0;i<n;i++)
		for(int j=0;j<n;j++) {
			Rms[i][j]=Rms[i][j]*100.0;
			if(Dist[i][j] > 0.6) {
				cout << i << " " << j << "  " << Dist[i][j] << endl;
				Rms[i][j]=0.0;
			}
		}
*/
	SVD<double> G(Rms);
	G.getU(U);
	G.getV(V);
	G.getS(S);
	G.getSingularValues(s);
	Array2D<double> Sm1(n,n), Ks(n,n), Rms_b(n,n), V1(n,n), U1(n,n), Id(n,n);
	for(int i=StartLoop;i<n;i++) S[i][i]=0.0;
	V1=transpose(V);
	U1=transpose(U);
	Rms_b=matmult(U,matmult(S,V1));

	Sm1=S;
	for(int i=0;i<n;i++)
		Sm1[i][i]=(Sm1[i][i] == 0.0)?0.0:1.0/Sm1[i][i];
	Ks=matmult(V,matmult(Sm1,U1));
	Id=matmult(transpose(Ks),Rms_b);

	for(int i=0;i<n;i++) printf(" %5d   %12.5e %12.5e \n",i,Rms[i][i],Rms_b[i][i]);
//	for(int i=0;i<n;i++)
//		for(int j=i;j<n;j++)
//			printf(" %5d %5d %12.4f %12.5e %12.5e \n",i,j,Dist[i][j],Ks[i][j], Rms[i][j]);
}
开发者ID:mm148881,项目名称:postnoneqx,代码行数:37,代码来源:ForceConst.cpp


示例10: m_endpoint

Cold::Cold(
        arbiter::Endpoint& endpoint,
        const Builder& builder,
        const std::size_t clipPoolSize,
        const Json::Value& jsonIds)
    : m_endpoint(endpoint)
    , m_builder(builder)
    , m_chunkVec(getNumFastTrackers(builder.structure()))
    , m_chunkMap()
    , m_mapMutex()
    , m_pool(new Pool(clipPoolSize, clipQueueSize))
{
    if (jsonIds.isArray())
    {
        Id id(0);

        const Structure& structure(m_builder.structure());

        for (std::size_t i(0); i < jsonIds.size(); ++i)
        {
            id = Id(jsonIds[static_cast<Json::ArrayIndex>(i)].asString());

            const ChunkInfo chunkInfo(structure.getInfo(id));
            const std::size_t chunkNum(chunkInfo.chunkNum());

            if (chunkNum < m_chunkVec.size())
            {
                m_chunkVec[chunkNum].mark.store(true);
            }
            else
            {
                std::unique_ptr<CountedChunk> c(new CountedChunk());
                m_chunkMap.emplace(id, std::move(c));
            }
        }
    }
}
开发者ID:gtcoder2012,项目名称:entwine,代码行数:37,代码来源:cold.cpp


示例11: PegWindow

/*--------------------------------------------------------------------------*/
PegTextBox::PegTextBox(const PegRect &Rect, WORD wId, WORD wStyle, PEGCHAR *Text,
    WORD wMaxChars) : PegWindow(Rect, wStyle),
    PegTextThing(Text, wStyle & (EF_EDIT|TT_COPY), PEG_TEXTBOX_FONT)
{
    Id(wId);
    muColors[PCI_NORMAL] = PCLR_CLIENT;
    muColors[PCI_SELECTED] = PCLR_HIGH_TEXT_BACK;
    muColors[PCI_NTEXT] = PCLR_NORMAL_TEXT;
    muColors[PCI_STEXT] = PCLR_HIGH_TEXT;
    Type(TYPE_TEXTBOX);

    miTopLine = 0;
    miClipCount = 0;
    mwMaxChars = wMaxChars;
    miWidestLine = 0;
    miLeftOffset = 0;
    miMarkLine = -1;
    miLineHeight = TextHeight(lsTEST, mpFont);
    mpBuf = NULL;
    miBufLen = 0;

    if (wStyle & (EF_EDIT|AF_ENABLED))
    {
        AddStatus(PSF_TAB_STOP);
    }
    else
    {
        RemoveStatus(PSF_TAB_STOP|PSF_ACCEPTS_FOCUS);
    }
    
    miTotalLines = 0;
    
    // configure the start of line indexes:

    mwLineStarts = new WORD[MAX_LINE_OFFSETS];
    UpdateLineStarts();
}
开发者ID:garyqinyu,项目名称:abv,代码行数:38,代码来源:ptextbox.cpp


示例12: WEB_AUDIO_API_LOG

void
AudioBufferSourceNode::Stop(double aWhen, ErrorResult& aRv)
{
    if (!WebAudioUtils::IsTimeValid(aWhen)) {
        aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
        return;
    }

    if (!mStartCalled) {
        aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
        return;
    }

    WEB_AUDIO_API_LOG("%f: %s %u Stop(%f)", Context()->CurrentTime(),
                      NodeType(), Id(), aWhen);

    AudioNodeStream* ns = mStream;
    if (!ns || !Context()) {
        // We've already stopped and had our stream shut down
        return;
    }

    ns->SetStreamTimeParameter(STOP, Context(), std::max(0.0, aWhen));
}
开发者ID:carriercomm,项目名称:gecko-dev,代码行数:24,代码来源:AudioBufferSourceNode.cpp


示例13: cleanPath

void ReadKkit::call( const vector< string >& args)
{
	/// call /kinetics/foo/notes LOAD notes_string_here
	if ( args.size() > 3 ) {
		unsigned int len = args[1].length();
		if ( ( args[1].substr( len - 5 ) ==  "notes" ) &&
			args[2] == "LOAD" ) {
			if ( args[3].length() == 0 )
				return;
			//HARSHA: Added CleanPath.
			string objName = cleanPath(args[1].substr( 0, len - 5 ));
		        Id test(basePath_+objName);
			Id obj( basePath_ + objName + "info" );
			if ( obj != Id() ) {
				string notes = "";
				string space = "";
				for ( unsigned int i = 3; i < args.size(); ++i ) {
					unsigned int innerLength = args[i].length();
					if ( innerLength == 0 )
						continue;
					unsigned int start = 0;
					unsigned int end = innerLength;
					if ( args[i][0] == '\"' )
						start = 1;
					if ( args[i][innerLength - 1] == '\"' )
						end = innerLength - 1 - start;

					notes += space + args[i].substr( start, end );
					space = " ";
				}
				bool OK = Field< string >::set( obj, "notes", notes );
				assert( OK );
			}
		}
	}
}
开发者ID:csiki,项目名称:MOOSE,代码行数:36,代码来源:ReadKkit.cpp


示例14: main

int main(int argc, char **argv){

	// (when V-REP launches this executable, V-REP will also provide the argument list)
	// Se reciben 9 argumentos
	if (argc>=1)
	{
		Npata_arg=atoi(argv[1]);
	}
	else
	{
		ROS_ERROR("Nodo 2: Indique argumentos!\n");
		sleep(5000);
		return 0;
	}

    /*Inicio nodo de ROS*/
    std::string nodeName("Nodo2_Parametrizacion_pata");
	std::string Id(boost::lexical_cast<std::string>(Npata_arg));
	nodeName+=Id;
	ros::init(argc,argv,nodeName.c_str());
    ros::NodeHandle n;
    //ROS_INFO("Nodo2_Parametrizacion just started\n");

    //Topicos susbcritos y publicados
    chatter_pub = n.advertise<camina::AngulosMotor>("DatosDeMotores", 100);
    ros::Subscriber sub = n.subscribe("datosTrayectoriaPataSalida", 100, datosCallback);
    ros::Subscriber subInfo=n.subscribe("/vrep/info",1,infoCallback);

    while (ros::ok() && simulationRunning)
    {
	  ros::spinOnce();
    }
    //ROS_INFO("Adios2!");
    ros::shutdown();
    return 0;
}
开发者ID:baceituno,项目名称:tesis-hexapodo,代码行数:36,代码来源:Nodo2_parametrizacion+(copy).cpp


示例15: _GlTriangle1d

GlAlgo* GlTriangle1d::Generate(const gl_generate_args& args) const
{
	return new _GlTriangle1d(	Id(), Params().Float(GL_CYCLE_KEY),
								Params().Float(GL_PHASE_KEY));
}
开发者ID:HaikuArchives,项目名称:Sequitur,代码行数:5,代码来源:GlTriangle1d.cpp


示例16: CreatePipeline

extern "C" UNITY_INTERFACE_EXPORT int CreatePipeline()
{
	auto pipeline = ImageProcessing::PipelineManager::Instance()->CreatePipeline();
	pipeline->Start();
	return pipeline->Id();
}
开发者ID:SebiH,项目名称:BachelorProject,代码行数:6,代码来源:pipeline.cpp


示例17: Id

js::Thread::Thread(Thread&& aOther)
{
  id_ = aOther.id_;
  aOther.id_ = Id();
  options_ = aOther.options_;
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:6,代码来源:Thread.cpp


示例18: getInt

void RepoQuery::getId(int iCol, Id& id) {
  int val;
  getInt(iCol, val);
  id = Id(val);
}
开发者ID:MarkTseng,项目名称:hiphop-php,代码行数:5,代码来源:repo_helpers.cpp


示例19: assert

//////////////////////////////////////////////////////////////
// Zombie conversion functions.
//////////////////////////////////////////////////////////////
void ZPool::setSolver( Id solver )
{
	assert ( solver != Id() );
	assert( solver.element()->cinfo()->isA( "SolverBase" ) );
	solver_ = reinterpret_cast< SolverBase* >( solver.eref().data() );
}
开发者ID:Vivek-sagar,项目名称:moose-1,代码行数:9,代码来源:ZPool.cpp


示例20: Id

bool
js::Thread::joinable(LockGuard<Mutex>& lock)
{
  return id_ != Id();
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:5,代码来源:Thread.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IddObjectType函数代码示例发布时间:2022-05-30
下一篇:
C++ I_PARMRK函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap