/* File: switch.h Author: R. P. Futrelle Date: 8/8/98 Notice: Copyright 1998 by R. P. Futrelle and the College of Computer Science, Northeastern University Class: COM1204, Object-Oriented Design, Summer 1998. Proj: PS2.µ Metrowerks Code Warrior Mac. Done in IDE version 2.0.1. Purpose: Switch and Switch_Phone_State class definitions. Modification history: 8/1/98: RPF. Started. 8/8/98: RPF. Changed from three to four states. Converted from Links to Connectors. Local vars for phone indexes. */ class Switch : public Keywords { public: static int next_id; int id; int num_phones; int phone1, phone2; // one or two phone states being worked with. Connector* connectors[MAX_CONNECTORS]; Switch_Phone_State* states[MAX_PHONES]; Switch(); void run(); }; class Switch_Phone_State { public: bool answered, dialing, picked_up, ringing; int connected_to; // other phone number Switch_Phone_State(); bool is_state(bool a, bool d, bool p, bool r); void set_state(bool a, bool d, bool p, bool r); };