本文整理汇总了C++中hashmap::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ hashmap::reset方法的具体用法?C++ hashmap::reset怎么用?C++ hashmap::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hashmap
的用法示例。
在下文中一共展示了hashmap::reset方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove
void
unregister_pointer (string id, observer which) {
// cout << "Unregister: " << id << " -> " << which << "\n";
// cout << "Unregister: " << id << " -> " << obtain_tree (which) << "\n";
list<observer>& l1= id_resolve (id);
l1= remove (l1, which);
if (is_nil (l1)) id_resolve->reset (id);
list<string>& l2= pointer_resolve (which);
l2= remove (l2, id);
if (is_nil (l2)) pointer_resolve->reset (which);
}
示例2:
void
persistent_reset (url dir, string key) {
string v= local_prefix (dir) * key;
persistent_init_key (dir, key);
persistent_remove (dir, key, persistent_file [v], persistent_hash [v]);
persistent_has (v)= false;
persistent_cache->reset (v);
}
示例3: tree
void
web_cache_invalidate (url name) {
for (int i=0; i<MAX_CACHED; i++)
if (web_cache[i] == name->t) {
web_cache[i]= tree ("");
web_cache_resolve->reset (name->t);
}
}
示例4:
static url
set_cache (url name, url tmp) {
web_cache_resolve->reset (web_cache [web_nr]);
web_cache [web_nr]= name->t;
web_cache_resolve (name->t)= tmp->t;
web_nr= (web_nr+1) % MAX_CACHED;
return tmp;
}
示例5: N
void
unregister_link (soft_link ln) {
// cout << "Unregister: " << ln->t << "\n";
int i, n= N(ln->t);
if (is_atomic (ln->t[0])) {
type_count (ln->t[0]->label) --;
if (type_count (ln->t[0]->label) == 0)
type_count->reset (ln->t[0]->label);
}
for (i=1; i<n; i++)
unregister_vertex (ln->t[i], ln);
}
示例6: h
template <class T, class U> void
rel_hashmap_rep<T,U>::find_changes (hashmap<T,U>& CH) {
int i;
rel_hashmap<T,U> h (item, next);
list<hashentry<T,U> > remove;
for (i=0; i<CH->n; i++) {
list<hashentry<T,U> > l (CH->a[i]);
while (!is_nil (l)) {
if (h [l->item.key] == l->item.im)
remove= list<hashentry<T,U> > (l->item, remove);
l=l->next;
}
}
while (!is_nil (remove)) {
CH->reset (remove->item.key);
remove= remove->next;
}
}
示例7:
void
notify_window_destroy (string name) {
window_names->reset (name);
}
示例8: tuple
void
cache_reset (string buffer, tree key) {
tree ckey= tuple (buffer, key);
cache_data->reset (ckey);
cache_changed->insert (buffer);
}