您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BuildList函数代码示例

51自学网 2021-06-01 19:55:59
  C++
这篇教程C++ BuildList函数代码示例写得很实用,希望能帮到您。

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

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

示例1: BuildList

//-----------------------------------------------------------------------------// Fixes up all elements//-----------------------------------------------------------------------------void CImportSFMV6::BuildList( CDmElement *pElement, CUtlRBTree< CDmElement *, int >& list ){	if ( !pElement )		return;	if ( list.Find( pElement ) != list.InvalidIndex() )		return;	list.Insert( pElement );	// Descend to bottom of tree, then do fixup coming back up the tree	for ( CDmAttribute *pAttribute = pElement->FirstAttribute(); pAttribute; pAttribute = pAttribute->NextAttribute() )	{		if ( pAttribute->GetType() == AT_ELEMENT )		{			CDmElement *pElement = pAttribute->GetValueElement<CDmElement>( );			BuildList( pElement, list );			continue;		}		if ( pAttribute->GetType() == AT_ELEMENT_ARRAY )		{			CDmrElementArray<> array( pAttribute );			int nCount = array.Count();			for ( int i = 0; i < nCount; ++i )			{				CDmElement *pChild = array[ i ];				BuildList( pChild, list );			}			continue;		}	}}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:36,


示例2: main

int main(){	int m, n;	while (scanf("%d %d", &m, &n) != EOF)	{		ListNode* head1 = BuildList(m);		ListNode* head2 = BuildList(n);		int diff = m-n;		ListNode* pHeadLong = head1;		ListNode* pHeadShort = head2;		if (m < n)		{			diff = n-m;			pHeadLong = head2;			pHeadShort = head1;		}		// forward to the proper position		for (int i = 0; i < diff; ++i)			pHeadLong = pHeadLong->pNext;		bool bFound = false;		while (pHeadLong)		{ // search for the first common node			if (pHeadLong->nValue == pHeadShort->nValue)			{				bFound = true;				break;			}			else			{				pHeadLong = pHeadLong->pNext;				pHeadShort = pHeadShort->pNext;			}		}		if (bFound)			printf("%d/n", pHeadLong->nValue);		else			printf("My God/n");		DestroyList(head1);		DestroyList(head2);	}	return 0;}
开发者ID:keke2014,项目名称:JianzhiOffer,代码行数:48,


示例3: BuildList

void GUIgraph::SetDatasets(const vector<GUIgraph::Dataset>& newData,bool showDif,int button,string name){	this->showDif=showDif;	graphNames[button]=name;	data[button].clear();	data[button].insert(data[button].begin(), newData.begin(), newData.end());	maximum=0;		for(int a=0;a<2;++a){		vector<GUIgraph::Dataset>::iterator i=data[a].begin();		vector<GUIgraph::Dataset>::iterator e=data[a].end();		for(;i!=e; i++)		{			vector<float>::iterator j=i->points.begin();			vector<float>::iterator k=i->points.end();			float last=0;					for(;j!=k; j++){				if(*j-last>maximum)					maximum=*j-last;				if(showDif)					last=*j;			}		}	}		BuildList();}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:29,


示例4: LeaveDirectory

static void LeaveDirectory( void ) {    char *s;    int i;    s = strrchr( m_demos.browse, '/' );    if( !s ) {        return;    }    *s = 0;    // rebuild list    FreeList();    BuildList();    MenuList_Init( &m_demos.list );    // move cursor to the previous directory    for( i = 0; i < m_demos.numDirs; i++ ) {        demoEntry_t *e = m_demos.list.items[i];        if( !strcmp( e->name, s + 1 ) ) {            MenuList_SetValue( &m_demos.list, i );            break;        }    }    if( s == m_demos.browse ) {        m_demos.browse[0] = '/';        m_demos.browse[1] = 0;    }}
开发者ID:Bad-ptr,项目名称:q2pro,代码行数:29,


示例5: Activate

static menuSound_t Activate( menuCommon_t *self ) {    size_t len, baselen;    demoEntry_t *e = m_demos.list.items[m_demos.list.curvalue];    switch( e->type ) {    case ENTRY_UP:        LeaveDirectory();        return QMS_OUT;    case ENTRY_DN:        baselen = strlen( m_demos.browse );        len = strlen( e->name );        if( baselen + 1 + len >= sizeof( m_demos.browse ) ) {            return QMS_BEEP;        }        if( !baselen || m_demos.browse[ baselen - 1 ] != '/' ) {            m_demos.browse[ baselen++ ] = '/';        }        memcpy( m_demos.browse + baselen, e->name, len + 1 );                // rebuild list        FreeList();        BuildList();        MenuList_Init( &m_demos.list );        return QMS_IN;    case ENTRY_DEMO:        Cbuf_AddText( &cmd_buffer, va( "demo /"%s/%s/"/n", m_demos.browse[1] ?            m_demos.browse : "", e->name ) );        return QMS_SILENT;    }    return QMS_NOTHANDLED;}
开发者ID:Bad-ptr,项目名称:q2pro,代码行数:34,


示例6: Test1

void Test1(){    ListNode* pHead = BuildList();    ListNode* pReversedHead = Test("Test1", pHead, 1);    DestroyList(pReversedHead);}
开发者ID:brian-smith723,项目名称:DesignPatterns,代码行数:7,


示例7: LeaveDirectory

static menuSound_t LeaveDirectory(void){    char    *s;    int     i;    s = strrchr(m_demos.browse, '/');    if (!s) {        return QMS_BEEP;    }    if (s == m_demos.browse) {        strcpy(m_demos.browse, "/");    } else {        *s = 0;    }    // rebuild list    FreeList();    BuildList();    MenuList_Init(&m_demos.list);    // move cursor to the previous directory    for (i = 0; i < m_demos.numDirs; i++) {        demoEntry_t *e = m_demos.list.items[i];        if (!strcmp(e->name, s + 1)) {            MenuList_SetValue(&m_demos.list, i);            break;        }    }    return QMS_OUT;}
开发者ID:AndreyNazarov,项目名称:q2pro,代码行数:32,


示例8: WidgetLBGetCurSel

void ProjectPrefsGUI::DoRemove(void){ActiveItem = WidgetLBGetCurSel(IDC_PARLIST);HostProj->DL = HostProj->DirList_Remove(HostProj->DL, (short)ActiveItem);BuildList(ActiveItem);} // ProjectPrefsGUI::DoRemove()
开发者ID:AlphaPixel,项目名称:3DNature,代码行数:8,


示例9: BuildList

eOSState cMenuSearchResults::OnYellow(){   eOSState state = osUnknown;   if(!HasSubMenu())   {      modeYellow = (modeYellow==showTitleEpisode?showEpisode:showTitleEpisode);      BuildList();      state = osContinue;   }   return state;}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:11,


示例10: BuildList

void GUIbutton::SetCaption(const string& capt){	caption=capt;		if(autosizing)	{		w=(int)(guifont->GetWidth(caption.c_str()))+14;	}		BuildList();}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:11,


示例11: GetSystemMetrics

BOOL CDialogClasses::OnInitDialog( ){	m_ImageList.Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32, 1, 1);	m_ImageList.SetBkColor(RGB(255, 255, 255));	m_hClassIcon = LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_ICON_CLASS));	m_ImageList.Add(m_hClassIcon);		BuildList();	return TRUE;}
开发者ID:JackD111,项目名称:Reclass-2015,代码行数:11,


示例12: BuildList

void ProjectPrefsGUI::DoAdd(void){struct DirList *DLNew;if (DLNew = HostProj->DirList_Add(HostProj->DL, NULL, 0))	{	if (! HostProj->DL)		HostProj->DL = DLNew;	BuildList(HostProj->DirList_ItemExists(HostProj->DL, DLNew->Name));	} // if} // ProjectPrefsGUI::DoAdd()
开发者ID:AlphaPixel,项目名称:3DNature,代码行数:12,


示例13: Expose

static void Expose( menuFrameWork_t *self ) {    time_t now = time( NULL );    struct tm *tm = localtime( &now );    if( tm ) {        m_demos.year = tm->tm_year;    }    BuildList();    // move cursor to previous position    MenuList_SetValue( &m_demos.list, m_demos.selection );}
开发者ID:Bad-ptr,项目名称:q2pro,代码行数:12,


示例14: tr

// --- cMenuSearchResultsForBlacklist -------------------------------------------------------cMenuSearchResultsForBlacklist::cMenuSearchResultsForBlacklist(cBlacklist* Blacklist)   :cMenuSearchResults(cTemplFile::GetTemplateByName("MenuSearchResults")){   ButtonBlue[0] = tr("Button$all channels");   ButtonBlue[1] = tr("Button$only FTA");   ButtonBlue[2] = tr("Button$Timer preview");   blacklist = Blacklist;   m_bSort = true;   modeBlue = blacklist->useChannel==3?showNoPayTV:(EPGSearchConfig.ignorePayTV?showNoPayTV:showAll);   BuildList();}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:14,


示例15: BuildList

BOOL CEnvelopeTypeDialog::OnInitDialog(){	CPmwDialogColor::OnInitDialog();	m_List.ReadList("ENVELOPE.DAT");	BuildList();   CreateWizzardButtons ();   EnableWizardButtons (m_WizFlags);	return TRUE;  // return TRUE  unless you set the focus to a control}
开发者ID:jimmccurdy,项目名称:ArchiveGit,代码行数:13,


示例16: main

int main() {        Node *Head;        Head = InitList();    PrintList(Head);	/* Print the initial list */        BuildList(Head);        PrintList(Head);	/* Print the list again */    DeleteList(Head);        return 0;}
开发者ID:rstanaford,项目名称:BasicLinkedList,代码行数:14,


示例17: BuildShapes

				/*				 * ============================================================				 * Function		: BuildShapes				 *				 * Description	: Compiles buildlists for the shapes that the 				 *				  the gfxParticle objectsneed. 				 * ============================================================				 */				void BuildShapes() throw() {					for ( size_t part = 0; part < activeCount; part++ ) {						if ( shapes.find( particleArray[part].shape ) == shapes.end() ) {	// Check if there is a build list for this shape								// If not found hen we need to add this shape to								// the shapes container with the gfxShape as  the key								shapes.emplace( particleArray[part].shape, static_cast<GLuint>( shapes.size() ) );								// gfxParticle shape is definitely in shapes container								BuildList( particleArray[part].shape.type,					// Type of shape to build										   particleArray[part].shape.size,					// Size of shape to build										   &shapes[particleArray[part].shape] );			// Pointer to built shape handle						}					}				}
开发者ID:emperorstarfinder,项目名称:Nuke,代码行数:22,


示例18: BuildList

//++//------------------------------------------------------------------------------------// Details: Add another MI result object to  the value list's of list is// results.//          Only result objects can be added to a list of result otherwise this//          function//          will return MIstatus::failure.// Type:    Method.// Args:    vResult - (R) The MI result object.// Return:  None.// Throws:  None.//--void CMICmnMIValueList::BuildList(const CMICmnMIValueResult &vResult) {  // Clear out the default "<Invalid>" text  if (m_bJustConstructed) {    m_bJustConstructed = false;    m_strValue = vResult.GetString();    BuildList();    return;  }  const CMIUtilString data(ExtractContentNoBrackets());  const char *pFormat = "[%s,%s]";  m_strValue =      CMIUtilString::Format(pFormat, data.c_str(), vResult.GetString().c_str());}
开发者ID:2trill2spill,项目名称:freebsd,代码行数:26,


示例19: SetTitle

// --- cMenuSearchResultsForRecs -------------------------------------------------------cMenuSearchResultsForRecs::cMenuSearchResultsForRecs(const char *query)   :cMenuSearchResultsForQuery(NULL){   SetTitle(tr("found recordings"));   if (query)   {      searchExt = new cSearchExt;      strcpy(searchExt->search, query);      searchExt->mode = 0; // substring      searchExt->useTitle = 1;      searchExt->useSubtitle = 0;      searchExt->useDescription = 0;      BuildList();   }}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:16,


示例20: BuildList

fsInternetResult fsFtpFiles::GetList(LPCTSTR pszPath){	fsInternetResult ir;	m_bAbort = FALSE;	m_strPath = pszPath;		ir = m_pServer->SetCurrentDirectory (pszPath);	if (ir != IR_SUCCESS)		return ir;		return BuildList ();}
开发者ID:naroya,项目名称:freedownload,代码行数:16,


示例21: GUIframe

GUIpane::GUIpane(int x, int y, int w, int h) : GUIframe(x, y, w, h){	displayList=glGenLists(1);	dragging=false;	resizing=false;	canDrag=false;	canResize=false;	drawFrame=true;	downInside=false;	minW=50;	minH=50;		BuildList();}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:16,


示例22: BuildList

//++ ------------------------------------------------------------------------------------// Details:	Add another MI value object to  the value list's of list is values.//			Only values objects can be added to a list of values otherwise this function //			will return MIstatus::failure.// Type:	Method.// Args:	vValue	- (R) The MI value object.// Return:	MIstatus::success - Functional succeeded.//			MIstatus::failure - Functional failed.// Throws:	None.//--bool CMICmnMIValueList::BuildList( const CMICmnMIValue & vValue ){	// Clear out the default "<Invalid>" text	if( m_bJustConstructed )	{		m_bJustConstructed = false;		m_strValue = vValue.GetString();		return BuildList();	}	const MIchar * pFormat = "[%s,%s]";	m_strValue = m_strValue.FindAndReplace( "[", "" );	m_strValue = m_strValue.FindAndReplace( "]", "" );		m_strValue = CMIUtilString::Format( pFormat, m_strValue.c_str(), vValue.GetString().c_str() );	return MIstatus::success;}
开发者ID:Jean-Daniel,项目名称:lldb,代码行数:27,


示例23: BuildList

void AwayEditorWindow::DeleteMessage() {	if( client->AwayMode() == AM_STANDARD_MESSAGE ) {		if( client->CurrentAwayMessageName() == currentMsg ) {			windows->ShowMessage( Language.get("AME_ERR1"), B_INFO_ALERT );			return;		}	}	prefs->RemoveAwayMessage( currentMsg );	currentMsg = "";	hasSelection = false;	isDirty = false;	genView->textview->MakeDirty(false);	BuildList();	EnableMessageStuff(false);	PostAppMessage( new BMessage(BEAIM_LOAD_AWAY_MENU) );}
开发者ID:HaikuArchives,项目名称:BeAIM,代码行数:18,


示例24: strcpy

// --- cMenuSearchResultsForQuery -------------------------------------------------------cMenuSearchResultsForQuery::cMenuSearchResultsForQuery(const char *query, bool IgnoreRunning)   :cMenuSearchResultsForSearch(NULL, cTemplFile::GetTemplateByName("MenuSearchResults")){   modeBlue = EPGSearchConfig.ignorePayTV?showNoPayTV:showAll;   ignoreRunning = IgnoreRunning;   // create a dummy search   if (query)   {      searchExt = new cSearchExt;      strcpy(searchExt->search, query);      searchExt->mode = 0; // substring      searchExt->useTitle = 1;      searchExt->useSubtitle = 0;      searchExt->useDescription = 0;      searchExt->blacklistMode = blacklistsNone;      BuildList();   }}
开发者ID:jowi24,项目名称:vdr-epgsearch,代码行数:19,



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


C++ BuildOutOfRangeUpdateBlock函数代码示例
C++ BuildFocusList函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。