next up previous contents
Next: Indexed List Up: Collection Types Previous: Simple List   Contents

Searchable List

The line     searchable_list< element_type> field;
declares a searchable list. Each entry has an equality operation defined on it. It may also contain secondary keys, defined by the ``key'' field attribute. These keys may occur multiple times. The following methods are defined:

void add_ field( element_type key);
Iter< element_type> get_ field_iterator();
void remove_ field( element_type key);
bool has_ field_member( element_type key);
(for any fields of element_type with key attribute)
bool remove_ field_by_key_ key_field (const key_type);
element_type lookup_ field_by_key_ key_field(const key_type);
(To support multiple occurences of keys)
int num_ field_of_ key_field(const key_type);
element_type lookup_ field_by_ key_field(const key_type, int no);
bool remove_ field_by_ key_field(const key_type,int no);



SUIF Nightly Build
2000-08-14