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


C++ Id函数代码示例

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


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


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