Example #1
0
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);
}
Example #2
0
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);
}
Example #3
0
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);
        }
}
Example #4
0
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;
}
Example #5
0
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);
}
Example #6
0
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;
  }
}
Example #7
0
void
notify_window_destroy (string name) {
    window_names->reset (name);
}
Example #8
0
void
cache_reset (string buffer, tree key) {
  tree ckey= tuple (buffer, key);
  cache_data->reset (ckey);
  cache_changed->insert (buffer);
}
Example #9
0
void
unregister_vertex (tree v, soft_link ln) {
  list<soft_link>& l= vertex_occurrences (v);
  l= remove (l, ln);
  if (is_nil (l)) vertex_occurrences->reset (v);
}