PHONE.H (2946B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 16 /* $Header: F:\projects\c&c\vcs\code\phone.h_v 1.9 16 Oct 1995 16:47:58 JOE_BOSTIC $ */ 17 /*************************************************************************** 18 * * 19 * Project Name : Command & Conquer * 20 * * 21 * File Name : PHONE.H * 22 * * 23 * Programmer : Bill R. Randolph * 24 * * 25 * Start Date : 04/28/95 * 26 * * 27 * Last Update : April 28, 1995 [BRR] * 28 * * 29 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 30 31 #ifndef PHONE_H 32 #define PHONE_H 33 34 /* 35 ***************************** Class Declaration ***************************** 36 */ 37 class PhoneEntryClass 38 { 39 public: 40 enum PhoneEntryEnum { 41 PHONE_MAX_NAME = 21, 42 PHONE_MAX_NUM = 21 43 }; 44 45 PhoneEntryClass(void) {}; 46 ~PhoneEntryClass() {}; 47 48 operator == (PhoneEntryClass &obj) 49 { return (memcmp (Name,obj.Name,strlen(Name))==0);} 50 operator != (PhoneEntryClass &obj) 51 { return (memcmp (Name,obj.Name,strlen(Name))!=0);} 52 operator > (PhoneEntryClass &obj) 53 { return (memcmp(Name, obj.Name, strlen(Name)) > 0);} 54 operator < (PhoneEntryClass &obj) 55 { return (memcmp(Name, obj.Name, strlen(Name)) < 0);} 56 operator >= (PhoneEntryClass &obj) 57 { return (memcmp(Name, obj.Name, strlen(Name)) >= 0);} 58 operator <= (PhoneEntryClass &obj) 59 { return (memcmp(Name, obj.Name, strlen(Name)) <= 0);} 60 61 SerialSettingsType Settings; 62 char Name[ PHONE_MAX_NAME ]; // destination person's name 63 char Number[ PHONE_MAX_NUM ]; // phone # 64 }; 65 66 #endif