// User_List.pp // // Created by Cristina Videira Lopes on 12/20/94. // // This file contains the set of propagation patterns whose source vertex // is the User_List class; the operations defined here apply to objects // of this class. These are the current propagation patterns: // // *operation* void print() // *operation* User* search_user(int key) // // // *operation* void print() // // Print out some information about a list of users. // *operation* void print() *traverse* *from* User_List *bypassing* -> *, *, Status *to* {Address, HomePhone, WorkPhone, Fax} *wrapper* User_List *prefix* (@ cout << " List of users:\n"; @) *wrapper* User *prefix* (@ cout << "\nUser id : " << *this->get_uid() << "\nName : " << *this->get_fname() << " " << *this->get_lname(); @) *wrapper* Address *prefix* (@ cout << "\nAddress : " << *this->get_number() << " " << *this->get_street(); if (this->get_apt() != NULL) cout << " #" << *this->get_apt(); cout << "\n " << *this->get_city() << ", " << *this->get_state() << " " << *this->get_zip() << "\n"; @) *wrapper* HomePhone *prefix* (@ cout << "Tel Home: "; this->show(); @) *wrapper* WorkPhone *prefix* (@ cout << "Tel Work: "; this->show(); @) *wrapper* Fax *prefix* (@ cout << "Tel Fax : "; this->show(); @) // // *operation* User* search_user(int key) // // Search a user, given a key (uid). // -- to be written by you // *operation* User* search_user (int key) *init* (@ NULL @) *wrapper* User_List *prefix* (@ @)