这篇教程C++ GetAt函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetAt函数的典型用法代码示例。如果您正苦于以下问题:C++ GetAt函数的具体用法?C++ GetAt怎么用?C++ GetAt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetAt函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: whileint CDiagramEntityContainer::Find( CDiagramEntity* testobj )/* ============================================================ Function : CDiagramEntityContainer::Find Description : Finds the index of object testobj in the data array. Return : int - Index of the object or -1 if not found. Parameters : CDiagramEntity* testobj - Object to find. Usage : Internal function. ============================================================*/{ int index = -1; CDiagramEntity* obj; int count = 0; while( ( obj = GetAt( count ) ) ) { if( obj == testobj ) index = count; count++; } return index;}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:29,
示例2: int CDiagramEntityContainer::GetSelectCount() const{ int count=0; for (int i = 0; i < GetSize(); i++) if (GetAt(i)->IsSelected()) count++; return count;}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:7,
示例3: GetAtvoid CDiagramEntityContainer::RemoveAt( int index )/* ============================================================ Function : CDiagramEntityContainer::RemoveAt Description : Removes the object at index. Return : void Parameters : int index - The index of the object to remove. Usage : Call to remove a specific object. Memory is freed. ============================================================*/{ CDiagramEntity* obj = GetAt( index ); if( obj ) { if (obj == m_lastSelObj) m_lastSelObj = NULL; delete obj; m_objs.RemoveAt( index ); SetModified( TRUE ); }}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:25,
示例4: GetSizevoid CDiagramEntityContainer::Export( CStringArray& stra, UINT format ) const/* ============================================================ Function : CDiagramEntityContainer::Export Description : Exports all objects to format format. Return : void Parameters : CStringArray& stra - CStingArray that will be filled with data on return. UINT format - Format to save to. Usage : Call to export the contents of the container to a CStringArray. Export will - of course - have to be defined for the derived objects. ============================================================*/{ int max = GetSize(); for( int t = 0 ; t < max ; t++ ) { CDiagramEntity* obj = GetAt( t ); stra.Add( obj->Export( format ) ); }}
开发者ID:Admin-Yukiko,项目名称:Iris1_DeveloperTools,代码行数:26,
示例5: GetAtvoid Display::CComplexFillSymbol::Zoom(float rate){ for( int i = 0 ; i < GetSize() ; i++ ) { GetAt(i)->Zoom(rate); }}
开发者ID:lozpeng,项目名称:applesales,代码行数:7,
示例6: Addbool CBoardCollectionArray::Add(DataStruct &board, CCEtoODBDoc &doc){ // look to see if this data will fit for (int i=0; i<GetCount(); i++) { if (GetAt(i)->Add(board, doc)) return true; } CBoardCollection *brdColl = new CBoardCollection(m_bUseAsRows); BlockStruct *block = doc.getBlockAt(board.getInsert()->getBlockNumber()); if (block == NULL) return false; CExtent ext = block->getExtent(); double toleranceDistance = 0.; if (m_bUseAsRows) toleranceDistance = ext.getYsize() * ((double)m_iTolerancePercent / 100.); else toleranceDistance = ext.getXsize() * ((double)m_iTolerancePercent / 100.); brdColl->SetTolerance(toleranceDistance); if (brdColl->Add(board, doc)) CTypedArrayContainer<CPtrArray, CBoardCollection*>::Add(brdColl); else return false; return true;}
开发者ID:mpatwa,项目名称:CCEtoODB_Translator,代码行数:29,
示例7: GetAt/** Find the building center closest to the given point, if it is within * 'epsilon' distance. The building index, and distance from the given * point are returned by reference. * * /return True if a building was found. */bool vtStructureArray::FindClosestBuildingCenter(const DPoint2 &point, double epsilon, int &building, double &closest){ if (IsEmpty()) return false; building = -1; DPoint2 loc; double dist; closest = 1E8; for (uint i = 0; i < GetSize(); i++) { vtStructure *str = GetAt(i); vtBuilding *bld = str->GetBuilding(); if (!bld) continue; bld->GetBaseLevelCenter(loc); dist = (loc - point).Length(); if (dist > epsilon) continue; if (dist < closest) { building = i; closest = dist; } } return (building != -1);}
开发者ID:kalwalt,项目名称:ofxVTerrain,代码行数:36,
示例8: MOVETOvoid CXTPTaskPanelGroup::OnAnimate(int nStep){ if (nStep < 1) { m_rcGroupCurrent = m_rcGroupTarget; } else { MOVETO(m_rcGroupCurrent.top, m_rcGroupTarget.top, nStep); MOVETO(m_rcGroupCurrent.bottom, m_rcGroupTarget.bottom, nStep); } if (!IsDirty() && m_bExpanding) { m_bExpanding = FALSE; m_pPanel->NotifyOwner(XTP_TPN_GROUPEXPANDED, (LPARAM)this); } for (int i = 0; i < GetItemCount(); i++) { CXTPTaskPanelGroupItem* pItem = GetAt(i); pItem->OnAnimate(nStep); }}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:25,
示例9: GetAt/**--------------------------------------------------------------------------<BR>C2DBaseSet::SnapToGrid/brief SnapToGrid.<P>---------------------------------------------------------------------------*/void C2DBaseSet::SnapToGrid(void){ for (unsigned int i = 0 ; i < size(); i++) { GetAt(i)->SnapToGrid(); }}
开发者ID:Ic3C0ld,项目名称:QtGeometry7316,代码行数:11,
示例10: GetAtvoid* CFX_BaseSegmentedArray::Add(){ if (m_DataSize % m_SegmentSize) { return GetAt(m_DataSize ++); } void* pSegment = FX_Alloc(FX_BYTE, m_UnitSize * m_SegmentSize); if (!pSegment) { return NULL; } if (m_pIndex == NULL) { m_pIndex = pSegment; m_DataSize ++; return pSegment; } if (m_IndexDepth == 0) { void** pIndex = (void**)FX_Alloc(void*, m_IndexSize); if (pIndex == NULL) { FX_Free(pSegment); return NULL; } pIndex[0] = m_pIndex; pIndex[1] = pSegment; m_pIndex = pIndex; m_DataSize ++; m_IndexDepth ++; return pSegment; }
开发者ID:Gardenya,项目名称:pdfium,代码行数:27,
示例11: ADDTOCALLSTACKbool CContainer::r_GetRefContainer( LPCTSTR & pszKey, CScriptObj * & pRef ){ ADDTOCALLSTACK("CContainer::r_GetRefContainer"); if ( !strnicmp(pszKey, "FIND", 4) ) // find* { pszKey += 4; if ( !strnicmp(pszKey, "ID", 2) ) // findid { pszKey += 2; SKIP_SEPARATORS(pszKey); pRef = ContentFind(g_Cfg.ResourceGetID(RES_ITEMDEF, pszKey)); SKIP_SEPARATORS(pszKey); return true; } else if ( !strnicmp(pszKey, "CONT", 4) ) // findcont { pszKey += 4; SKIP_SEPARATORS(pszKey); pRef = GetAt(Exp_GetSingle(pszKey)); SKIP_SEPARATORS(pszKey); return true; } else if ( !strnicmp(pszKey, "TYPE", 4) ) // findtype { pszKey += 4; SKIP_SEPARATORS(pszKey); pRef = ContentFind(g_Cfg.ResourceGetID(RES_TYPEDEF, pszKey)); SKIP_SEPARATORS(pszKey); return true; } } return false;}
开发者ID:greeduomacro,项目名称:Source,代码行数:33,
示例12: GetAtvoid CCSClones::cleanup(){ for (int i = 0; i < GetSize(); ++i) delete GetAt(i); RemoveAll();}
开发者ID:AmesianX,项目名称:BinClone,代码行数:7,
示例13: fPathBOOL CMediaFormats::IsUnPlayableFile(CString szFilename, bool bRestrict){ CPath fPath(szFilename); CString szThisExtention = fPath.GetExtension(); BOOL bDefaultRet = false; if(bRestrict) bDefaultRet = true; for(size_t i = 0; i < GetCount(); i++) { CMediaFormatCategory& mfc = GetAt(i); if( mfc.FindExt(szThisExtention) ){ CString szLabel = mfc.GetLabel(); if ( szLabel.Find(_T("Subtitle")) >= 0 || szLabel.Find(_T("字幕")) >= 0){ return TRUE; } if ( szLabel.Find(_T("Image file")) >= 0 || szLabel.Find(_T("图片")) >= 0){ return TRUE; } if ( szLabel.Find(_T("Real Script file")) >= 0 || szLabel.Find(_T("脚本")) >= 0){ return TRUE; } return FALSE; } } return bDefaultRet;}
开发者ID:XyzalZhang,项目名称:SPlayer,代码行数:27,
示例14: GetCount// Calling this function with bEnable equals to true when// shuffle is already enabled will re-shuffle the tracks.void CPlaylist::SetShuffle(bool bEnable){ m_bShuffle = bEnable; if (bEnable && !IsEmpty()) { m_nShuffledListSize = GetCount(); CAtlArray<plsort_t> positions; positions.SetCount(m_nShuffledListSize + 1); srand((unsigned int)time(nullptr)); POSITION pos = GetHeadPosition(); for (size_t i = 0; pos; i++, GetNext(pos)) { positions[i].n = rand(); positions[i].pos = pos; } qsort(positions.GetData(), m_nShuffledListSize, sizeof(plsort_t), compare); positions[m_nShuffledListSize].pos = nullptr; // Termination m_posHeadShuffle = positions[0].pos; m_posTailShuffle = nullptr; for (size_t i = 0; i < m_nShuffledListSize; i++) { pos = positions[i].pos; CPlaylistItem& pli = GetAt(pos); pli.m_posPrevShuffle = m_posTailShuffle; pli.m_posNextShuffle = positions[i + 1].pos; m_posTailShuffle = pos; } } else { m_posHeadShuffle = m_posTailShuffle = nullptr; m_nShuffledListSize = 0; }}
开发者ID:JanChou,项目名称:mpc-hc,代码行数:33,
示例15: AddTailvoid CPTRList::InsertBefore( int n,void *pData){ if ( n<0 ) { AddTail(pData); return; } if ( n==0 ) { AddHead(pData); return ; } GetAt(n); nCurrentBlk = -1; PTR_BLK *pNew = new PTR_BLK; pNew->pData = pData; pNew->pPrev = pCur->pPrev; pNew->pNext = pCur; pCur->pPrev->pNext = pNew; pCur->pPrev = pNew; nMax++;}
开发者ID:dalek7,项目名称:AR,代码行数:25,
示例16: GetScrollOffsetPosCXTPTaskPanelGroupItem* CXTPTaskPanelGroup::HitTest(CPoint pt, CRect* lpRect) const{ if (!IsExpanded()) return NULL; int nOffset = m_pPanel->GetScrollOffset() - m_nCaptionHeight - m_rcGroupCurrent.top + GetScrollOffsetPos(); pt.y += nOffset; for (int i = 0; i < GetItemCount(); i++) { CXTPTaskPanelGroupItem* pItem = GetAt(i); CRect rcItem = pItem->GetItemRect(); if (rcItem.PtInRect(pt) && pItem->IsVisible()) { if (lpRect) { rcItem.OffsetRect(0, -nOffset); *lpRect = rcItem; } return pItem; } } return NULL;}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:25,
示例17: FindKeyWordReverseint CESBolanStack::FindKeyWordReverse(int KeyWord,int StartPos,int StopKeyWord){ if(StartPos>=(int)GetSize()) return -1; for(;StartPos>=0;StartPos--) { if(GetAt(StartPos)->Type==BOLAN_TYPE_KEYWORD) { if(StopKeyWord>0&&GetAt(StartPos)->Index==StopKeyWord) return -1; if(GetAt(StartPos)->Index==KeyWord) return StartPos; } } return -1;}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:16,
示例18: GetSizevoid vtStructureArray::Offset(const DPoint2 &delta){ uint npoints = GetSize(); if (!npoints) return; uint i, j; DPoint2 temp; for (i = 0; i < npoints; i++) { vtStructure *str = GetAt(i); vtBuilding *bld = str->GetBuilding(); if (bld) bld->Offset(delta); vtFence *fen = str->GetFence(); if (fen) { DLine2 line = fen->GetFencePoints(); for (j = 0; j < line.GetSize(); j++) line.GetAt(j) += delta; } vtStructInstance *inst = str->GetInstance(); if (inst) inst->Offset(delta); }}
开发者ID:kalwalt,项目名称:ofxVTerrain,代码行数:26,
示例19: GetSizeint PyView::setSlice(int s, int e, const PWOSequence& lst) { int sz = GetSize(); if (s < 0) s += sz; if (e < 0) e += sz; if (e > sz) e = sz; int i = 0; for (; i < lst.len() && s < e; i++, s++) setItem(s, lst[i]); for (; i < lst.len(); i++, s++) { if (_base) Fail(PyExc_RuntimeError, "Can't insert in this view"); insertAt(s, lst[i]); } if (s < e) if (_base) while (s < e) { int ndx = _base->GetIndexOf(GetAt(s)); _base->RemoveAt(ndx, 1); --e; } else RemoveAt(s, e - s); return 0;}
开发者ID:SASfit,项目名称:SASfit,代码行数:29,
示例20: CPathengine_t CMediaFormats::GetEngine(CString path){ path.Trim().MakeLower(); if(!m_fRtspFileExtFirst && path.Find(_T("rtsp://")) == 0) return m_iRtspHandler; CString ext = CPath(path).GetExtension(); ext.MakeLower(); if(!ext.IsEmpty()) { if(path.Find(_T("rtsp://")) == 0) { if(ext == _T(".ram") || ext == _T(".rm") || ext == _T(".ra")) return RealMedia; if(ext == _T(".qt") || ext == _T(".mov")) return QuickTime; }else if(ext == _T(".ram")){ return RealMedia; } for(size_t i = 0; i < GetCount(); i++) { CMediaFormatCategory& mfc = GetAt(i); if(mfc.FindExt(ext)) return mfc.GetEngineType(); } } if(m_fRtspFileExtFirst && path.Find(_T("rtsp://")) == 0) return m_iRtspHandler; return DirectShow;}
开发者ID:XyzalZhang,项目名称:SPlayer,代码行数:34,
示例21: VTLOGbool vtStructureArray::WriteXML(const char* filename, bool bGZip) const{ VTLOG("WriteXML(%s)/n", filename); // Avoid trouble with '.' and ',' in Europe LocaleWrap normal_numbers(LC_NUMERIC, "C"); GZOutput out(bGZip); if (!gfopen(out, filename)) { throw xh_io_exception("Could not open output file", xh_location(filename), "XML Writer"); } gfprintf(out, "<?xml version=/"1.0/"?>/n"); gfprintf(out, "/n"); gfprintf(out, "<StructureCollection xmlns=/"http://www.openplans.net/"/n" "/t/t/t/t/t xmlns:gml=/"http://www.opengis.net/gml/"/n" "/t/t/t/t/t xmlns:xlink=/"http://www.w3.org/1999/xlink/"/n" "/t/t/t/t/t xmlns:xsi=/"http://www.w3.org/2001/XMLSchema-instance/"/n" "/t/t/t/t/t xsi:schemaLocation=/"http://www.openplans.net/buildings.xsd/">/n"); gfprintf(out, "/n"); // Write the extents (required by gml:StructureCollection) DRECT ext; GetExtents(ext); gfprintf(out, "/t<gml:boundedBy>/n"); gfprintf(out, "/t/t<gml:Box>/n"); gfprintf(out, "/t/t/t<gml:coordinates>"); gfprintf(out, "%.9lf,%.9lf %.9lf,%.9lf", ext.left, ext.bottom, ext.right, ext.top); gfprintf(out, "</gml:coordinates>/n"); gfprintf(out, "/t/t</gml:Box>/n"); gfprintf(out, "/t</gml:boundedBy>/n"); gfprintf(out, "/n"); // Write projection char *wkt; OGRErr err = m_proj.exportToWkt(&wkt); if (err != OGRERR_NONE) { throw xh_io_exception("Couldn't write CRS to file", xh_location(filename), "XML Writer"); } gfprintf(out, "/t<SRS>%s</SRS>/n", wkt); gfprintf(out, "/n"); OGRFree(wkt); bool bDegrees = (m_proj.IsGeographic() == 1); for (uint i = 0; i < GetSize(); i++) { vtStructure *str = GetAt(i); str->WriteXML(out, bDegrees); } gfprintf(out, "</StructureCollection>/n"); gfclose(out); return true;}
开发者ID:kalwalt,项目名称:ofxVTerrain,代码行数:59,
示例22: Removevoid CZipExtraField::Remove(WORD headerID){ for (int i = GetCount() - 1; i >= 0; i--) { if (headerID == GetAt(i)->GetHeaderID()) RemoveAt(i); }}
开发者ID:Echo-M,项目名称:producingManagementAK47,代码行数:8,
示例23: GetSizevoid vtRouteMap::BuildGeometry(vtHeightField3d *pHeightField){ int routes = GetSize(); for (int i = 0; i < routes; i++) { GetAt(i)->BuildGeometry(pHeightField); }}
开发者ID:kalwalt,项目名称:ofxVTerrain,代码行数:8,
示例24: GetAtvoid CZipExtraField::Write(char* buffer)const{ int offset = 0; for (int i = 0; i < GetCount(); i++) { offset += GetAt(i)->Write(buffer + offset); }}
开发者ID:Echo-M,项目名称:producingManagementAK47,代码行数:8,
示例25: assert/**--------------------------------------------------------------------------<BR>C2DLineBaseSet::AddIfCommonEnd/brief Adds the points of another to this if they have a common end which is eitherthe first or last point. Returns true if there was a match.<P>---------------------------------------------------------------------------*/bool C2DLineBaseSet::AddIfCommonEnd(C2DLineBaseSet& Other){ assert(!IsClosed()); assert(!Other.IsClosed()); int nThisCount = size() ; if (nThisCount < 1) return false; int nOtherCount = Other.size(); if (nOtherCount < 1) return false; if ( GetAt(0)->GetPointFrom() == Other.GetAt(0)->GetPointFrom()) { ReverseDirection(); *this << Other; return true; } else if( GetAt(0)->GetPointFrom() == Other.GetAt(nOtherCount - 1)->GetPointTo() ) { ReverseDirection(); Other.ReverseDirection(); *this << Other; return true; } else if (GetAt(nThisCount - 1)->GetPointTo() == Other.GetAt(0)->GetPointFrom()) { *this << Other; return true; } else if (GetAt(nThisCount - 1)->GetPointTo() == Other.GetAt(nOtherCount - 1)->GetPointTo() ) { Other.ReverseDirection(); *this << Other; return true; } return false;}
开发者ID:Ic3C0ld,项目名称:QtGeometry7316,代码行数:51,
注:本文中的GetAt函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetAttachment函数代码示例 C++ GetAspectRatio函数代码示例 |