本文整理汇总了C++中NodeMap::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeMap::erase方法的具体用法?C++ NodeMap::erase怎么用?C++ NodeMap::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NodeMap
的用法示例。
在下文中一共展示了NodeMap::erase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove
void remove(NetNodeIntern* node) {
NodeMap::iterator f = nodeMap.find(node);
if(f != nodeMap.end()) {
updates.erase(f->second);
nodeMap.erase(f);
}
}
示例2: deleted
// METHODS
static void deleted(const AstNode* nodep) {
// Called by operator delete on any node - only if VL_LEAK_CHECKS
if (debug()>=9) cout<<"-nodeDel: "<<(void*)(nodep)<<endl;
NodeMap::iterator iter = s_nodes.find(nodep);
if (iter==s_nodes.end() || !(iter->second & FLAG_ALLOCATED)) {
((AstNode*)(nodep))->v3fatalSrc("Deleting AstNode object that was never tracked or already deleted\n");
}
if (iter!=s_nodes.end()) s_nodes.erase(iter);
}
示例3: prune_unchanged_wrappers
void prune_unchanged_wrappers(xmlNodePtr node, NodeMap & nmap)
{
if (node == nullptr)
return;
if (node->type != XML_ENTITY_REF_NODE)
{
for (xmlNodePtr child = node->children; child != nullptr; child = child->next)
prune_unchanged_wrappers(child, nmap);
}
if (node->_private != nullptr)
{
const NodeMap::iterator pos = nmap.find(reinterpret_cast<ePub3::xml::Node*>(node->_private));
if (pos != nmap.end())
{
if (pos->second == node->type)
nmap.erase(pos);
else
node->_private = nullptr;
}
}
switch (node->type)
{
case XML_DTD_NODE:
case XML_ATTRIBUTE_NODE:
case XML_ELEMENT_DECL:
case XML_ATTRIBUTE_DECL:
case XML_ENTITY_DECL:
case XML_DOCUMENT_NODE:
return;
default:
break;
}
for (xmlAttrPtr attr = node->properties; attr != nullptr; attr = attr->next) {
find_wrappers(reinterpret_cast<xmlNodePtr>(attr), nmap);
}
}