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


C++ PtrList类代码示例

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


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

示例1: forAll

tmp<GeometricField<Type, tetPolyPatchField, tetPointMesh> >
tetPointFieldReconstructor::reconstructTetPointField
(
    const IOobject& fieldIoObject
)
{
    // Read the field for all the processors
    PtrList<GeometricField<Type, tetPolyPatchField, tetPointMesh> > procFields
    (
        procMeshes_.size()
    );

    forAll (procMeshes_, procI)
    {
        procFields.set
        (
            procI,
            new GeometricField<Type, tetPolyPatchField, tetPointMesh>
            (
                IOobject
                (
                    fieldIoObject.name(),
                    procMeshes_[procI]().time().timeName(),
                    procMeshes_[procI](),
                    IOobject::MUST_READ,
                    IOobject::NO_WRITE
                ),
                procMeshes_[procI]
            )
        );
    }
开发者ID:GoldenMan123,项目名称:openfoam-extend-foam-extend-3.1,代码行数:31,代码来源:tetPointFieldReconstructorReconstructFields.C

示例2: SetDlgItemText

void CSearchResultDlg::displayPage(int page, BOOL showStatus)
{
	if (page < 0 || page >= pageCount)
		return;

	if (showStatus) {
		CString str;
		str.Format(IDS_SEARCH_PAGE_NO, page + 1);
		SetDlgItemText(IDC_STATUS, str);
	}

	PtrList *l = pages[page];
	PtrList::iterator it;
	for (it = l->begin(); it != l->end(); ++it) {
		SEARCH_RESULT *p = (SEARCH_RESULT *) *it;

		int image = p->face;
		if (!p->online)
			image += NR_FACES;
		CString str;
		str.Format("%lu", p->uin);
		int i = m_ctlResult.InsertItem(m_ctlResult.GetItemCount(), str, image);
		m_ctlResult.SetItemData(i, (DWORD) p);
		m_ctlResult.SetItemText(i, 1, p->nick.c_str());
		m_ctlResult.SetItemText(i, 2, p->province.c_str());
	}
}
开发者ID:object8421,项目名称:test-1,代码行数:27,代码来源:SearchResultDlg.cpp

示例3: forAll

Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
Foam::fvFieldReconstructor::reconstructFvVolumeField
(
    const IOobject& fieldIoObject
)
{
    // Read the field for all the processors
    PtrList<GeometricField<Type, fvPatchField, volMesh> > procFields
    (
        procMeshes_.size()
    );

    forAll (procMeshes_, procI)
    {
        procFields.set
        (
            procI,
            new GeometricField<Type, fvPatchField, volMesh>
            (
                IOobject
                (
                    fieldIoObject.name(),
                    procMeshes_[procI].time().timeName(),
                    procMeshes_[procI],
                    IOobject::MUST_READ,
                    IOobject::NO_WRITE
                ),
                procMeshes_[procI]
            )
        );
    }
开发者ID:Brzous,项目名称:WindFOAM,代码行数:31,代码来源:fvFieldReconstructorReconstructFields.C

示例4: forAll

Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh>>
Foam::pointFieldReconstructor::reconstructField(const IOobject& fieldIoObject)
{
    // Read the field for all the processors
    PtrList<GeometricField<Type, pointPatchField, pointMesh>> procFields
    (
        procMeshes_.size()
    );

    forAll(procMeshes_, proci)
    {
        procFields.set
        (
            proci,
            new GeometricField<Type, pointPatchField, pointMesh>
            (
                IOobject
                (
                    fieldIoObject.name(),
                    procMeshes_[proci]().time().timeName(),
                    procMeshes_[proci](),
                    IOobject::MUST_READ,
                    IOobject::NO_WRITE
                ),
                procMeshes_[proci]
            )
        );
    }
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:28,代码来源:pointFieldReconstructorReconstructFields.C

示例5: forAll

Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>>
Foam::fvFieldReconstructor::reconstructFvVolumeInternalField
(
    const IOobject& fieldIoObject
) const
{
    // Read the field for all the processors
    PtrList<DimensionedField<Type, volMesh>> procFields
    (
        procMeshes_.size()
    );

    forAll(procMeshes_, proci)
    {
        procFields.set
        (
            proci,
            new DimensionedField<Type, volMesh>
            (
                IOobject
                (
                    fieldIoObject.name(),
                    procMeshes_[proci].time().timeName(),
                    procMeshes_[proci],
                    IOobject::MUST_READ,
                    IOobject::NO_WRITE
                ),
                procMeshes_[proci]
            )
        );
    }
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:31,代码来源:fvFieldReconstructorReconstructFields.C

示例6: Remove

 // remove vp from the list
 void Remove(T *ip)
 {
   PtrList *p = Find(ip);
   if (p)
   {
     p->Remove();
   }
 }
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:9,代码来源:pakstuff.cpp

示例7: Add

 void Add(T *ip)
 {
   PtrList *pl = this;
   while (pl && pl->m_pNext)
   {
     pl = pl->Next();
   }
   pl->m_pNext = new PtrList(ip);
 }
开发者ID:5Quintessential,项目名称:jedioutcast,代码行数:9,代码来源:pakstuff.cpp

示例8: deleteResults

void CSearchResultDlg::deleteResults()
{
	for (int i = 0; i < pageCount; i++) {
		PtrList *l = pages[i];
		PtrList::iterator it;
		for (it = l->begin(); it != l->end(); ++it)
			delete (SEARCH_RESULT *) *it;
		l->clear();
	}
	curPage = -1;
	pageCount = 0;
	startUIN = 0;
}
开发者ID:object8421,项目名称:test-1,代码行数:13,代码来源:SearchResultDlg.cpp

示例9: if

Tile CMapTile::GetTile(CVector Pos, CMap* pMap)
{
	PtrList<CEntity*> EntityList = pMap->GetTileEntityList(Pos);
	if(!EntityList.empty()) {
		if(ContainsPlayer(EntityList))
			return pMap->GetPlayer()->GetTile(pMap);
		else if(ContainsMobs(EntityList)) {
			PtrList<CEntity*> MobList = FilterMobEntities(EntityList);
			return MobList[0]->GetTile(pMap);
		} else
			return EntityList[0]->GetTile(pMap);
	}
	else return FloorTile;
}
开发者ID:Niautanor,项目名称:Abiturkomponente-5---Roguelike,代码行数:14,代码来源:MapTile.cpp

示例10: GetParent

void CGroupSearchResultPage::onGroupListReply(PtrList &l)
{
	CGroupSearchWizard *wiz = (CGroupSearchWizard *) GetParent();
	int type = wiz->typePage.getGroupType();

	PtrList::iterator it;
	for (it = l.begin(); it != l.end(); ++it) {
		GROUP_INFO *p = (GROUP_INFO *) *it;
		p->type = type;
		addResult(p);
	}

	GetDlgItem(IDC_REFRESH)->EnableWindow();
}
开发者ID:bugou,项目名称:test,代码行数:14,代码来源:GroupSearchResultPage.cpp

示例11: IsPassable

bool CMapTile::IsPassable(CVector Pos, CMap* pMap, CEntity* pTrespasser)
{
	if(!Flags.Is_Set(MTF_PASSABLE))
		return false;
	else {
		PtrList<CEntity*> EntityList = pMap->GetTileEntityList(Pos);
		for(Uint16 i=0;i<EntityList.size();i++) {
			if(EntityList[i] == pTrespasser)
				continue;
			if(EntityList[i]->EntityFlags.Is_Set(EF_MOB))
				return false;
		}
	}
	return true;
}
开发者ID:Niautanor,项目名称:Abiturkomponente-5---Roguelike,代码行数:15,代码来源:MapTile.cpp

示例12: XClearWindow

void LAgreementDlg::redraw() {
  XClearWindow(xvars->dpy[dpyNum],window);

  // Loop over all lines on current page.
  Page* page = (Page*)pages.get(currentPage);
  const PtrList& lines = page->get_lines();  
  for (int n = 0; n < lines.length(); n++) {
    int length;
    const char* text = ((Line*)lines.get(n))->get_text(length);
    if (length > 0) {
      XDrawString(xvars->dpy[dpyNum],window,xvars->gc[dpyNum],
                  TEXT_PADDING,
                  TEXT_PADDING 
                  + xvars->font[dpyNum]->max_bounds.ascent 
                  + fontSize.height * n,
                  text,length);                           
    }
  }

  // Draw separators.
  XDrawLine(xvars->dpy[dpyNum],window,xvars->gc[dpyNum],
            0,separatorY_1,windowSize.width - 1,separatorY_1);
  XDrawLine(xvars->dpy[dpyNum],window,xvars->gc[dpyNum],
            0,separatorY_2,windowSize.width - 1,separatorY_2);

  // Buttons will redraw themselves.
}
开发者ID:toppk,项目名称:xevil,代码行数:27,代码来源:l_agreement_dlg.cpp

示例13: OnExamine

void CMapTile::OnExamine(CVector Pos, CMap* pMap, CEntity* pActor)
{
	PtrList<CEntity*> EntityList = pMap->GetTileEntityList(Pos);
	if(!EntityList.empty()) {
		ExamineEntitieList(EntityList);
		return;
	}

	if(this == EmptyTile) {
		gMessages.AddMessage("Du schaust in die Weiten des Weltraums WTF!");
		return;
	}
	if(!Flags.Is_Set(MTF_PASSABLE))
		gMessages.AddMessage("Du schaust auf ein Stueck feste Wand");
	else gMessages.AddMessage("Du kannst dich hier hinbewegen");
}
开发者ID:Niautanor,项目名称:Abiturkomponente-5---Roguelike,代码行数:16,代码来源:MapTile.cpp

示例14: forAllIter

void Foam::lagrangianFieldDecomposer::readFields
(
    const label cloudI,
    const IOobjectList& lagrangianObjects,
    PtrList<PtrList<IOField<Type> > >& lagrangianFields
)
{
    // Search list of objects for lagrangian fields
    IOobjectList lagrangianTypeObjects
    (
        lagrangianObjects.lookupClass(IOField<Type>::typeName)
    );

    lagrangianFields.set
    (
        cloudI,
        new PtrList<IOField<Type> >
        (
            lagrangianTypeObjects.size()
        )
    );

    label lagrangianFieldi = 0;
    forAllIter(IOobjectList, lagrangianTypeObjects, iter)
    {
        lagrangianFields[cloudI].set
        (
            lagrangianFieldi++,
            new IOField<Type>(*iter())
        );
    }
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:31,代码来源:lagrangianFieldDecomposerDecomposeFields.C

示例15: forAll

void subsetSurfaceFields
(
    const fvMeshSubset& subsetter,
    const wordList& fieldNames,
    PtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& subFields
)
{
    const fvMesh& baseMesh = subsetter.baseMesh();

    forAll(fieldNames, i)
    {
        const word& fieldName = fieldNames[i];

        Info<< "Subsetting field " << fieldName << endl;

        GeometricField<Type, fvsPatchField, surfaceMesh> fld
        (
            IOobject
            (
                fieldName,
                baseMesh.time().timeName(),
                baseMesh,
                IOobject::MUST_READ,
                IOobject::NO_WRITE
            ),
            baseMesh
        );

        subFields.set(i, subsetter.interpolate(fld));
    }
}
开发者ID:AmaneShino,项目名称:OpenFOAM-2.0.x,代码行数:31,代码来源:subsetMesh.C


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