/***********************************************************************/ /* Course: Computer Science 402a */ /* Assignment: Assignment 1 */ /* Instructor: Mark Giesbrecht */ /* Submitted by: Dan Fraser */ /* Student Number: 001219229 */ /* Due Date: Wednesday, February 16 */ /***********************************************************************/ /* HostInfo.cc - Implementation of the HostInfo network class */ /***********************************************************************/ #include "HostInfo.h" int HostInfo::_serial = 1; HostInfo::HostInfo(string realname, string hostname, int port) { setHostname() = hostname; setPort() = port; setUID() = getSerial(); setRealname() = realname; } int HostInfo::getSerial() { return _serial++; } bool HostInfo::operator== (HostInfo a) { return (getUID() == a.getUID()); } bool HostInfo::operator!= (int a) { return (getUID() != a); }