本文整理汇总了C++中xr_vector::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ xr_vector::erase方法的具体用法?C++ xr_vector::erase怎么用?C++ xr_vector::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xr_vector
的用法示例。
在下文中一共展示了xr_vector::erase方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CLevelChanger::net_Destroy ()
{
inherited ::net_Destroy ();
xr_vector<CLevelChanger*>::iterator it = std::find(g_lchangers.begin(), g_lchangers.end(), this);
if(it != g_lchangers.end())
g_lchangers.erase(it);
}
示例2: GetParent
CUIWindow::~CUIWindow()
{
VERIFY( !(GetParent()&&IsAutoDelete()) );
CUIWindow* parent = GetParent();
bool ad = IsAutoDelete();
if( parent && !ad )
parent->CUIWindow::DetachChild( this );
DetachAll();
if( GetPPMode() )
MainMenu()->UnregisterPPDraw (this);
#ifdef LOG_ALL_WNDS
xr_vector<DBGList>::iterator _it = dbg_list_wnds.begin();
bool bOK = false;
for(;_it!=dbg_list_wnds.end();++_it){
if( (*_it).num==m_dbg_id && !(*_it).closed){
bOK = true;
(*_it).closed = true;
dbg_list_wnds.erase(_it);
break;
}
if( (*_it).num==m_dbg_id && (*_it).closed){
Msg("--CUIWindow [%d] already deleted", m_dbg_id);
bOK = true;
}
}
if(!bOK)
Msg("CUIWindow::~CUIWindow.[%d] cannot find window in list", m_dbg_id);
#endif
}
示例3:
BOOL reclaim (xr_vector<T*>& vec, const T* ptr)
{
xr_vector<T*>::iterator it = vec.begin ();
xr_vector<T*>::iterator end = vec.end ();
for (; it!=end; it++)
if (*it == ptr) { vec.erase (it); return TRUE; }
return FALSE;
}
示例4:
void CClientDlg::RemoveServerFromList (SBServer server)
{
xr_vector <HOST_NODE>::iterator it = net_Hosts.begin();
for (;it!=net_Hosts.end(); ++it)
{
HOST_NODE& N = *(it);//net_Hosts [I];
// if ( !stricmp(N.dpCharAddress, NODE->dpCharAddress))
if (N.dpServer == server)
{
net_Hosts.erase(it);
break;
}
};
};
示例5:
CUILine::~CUILine(){
xr_delete(m_tmpLine);
#ifdef LOG_ALL_LINES
xr_vector<DBGList>::iterator _it = dbg_list_lines.begin();
bool bOK = false;
for(;_it!=dbg_list_lines.end();++_it){
if((*_it).wnd == this){
bOK = true;
dbg_list_lines.erase(_it);
break;
}
}
if(!bOK)
Msg("CUILine::~CUILine()!!!!!!!!!!!!!!!!!!!!!!! cannot find window in list");
#endif
}
示例6:
CUIXml::~CUIXml()
{
#ifdef LOG_ALL_XMLS
xr_vector<DBGList_>::iterator _it = dbg_list_xmls.begin();
bool bOK = false;
for(;_it!=dbg_list_xmls.end();++_it){
if( (*_it).num==m_dbg_id && !(*_it).closed){
bOK = true;
(*_it).closed = true;
dbg_list_xmls.erase(_it);
break;
}
if( (*_it).num==m_dbg_id && (*_it).closed){
Msg("--XML [%d] already deleted", m_dbg_id);
bOK = true;
}
}
if(!bOK)
Msg("CUIXml::~CUIXml.[%d] cannot find xml in list", m_dbg_id);
#endif
}