Reactos
at master 62 lines 2.0 kB view raw
1/////////////////////////////////////////////////////////////////////////////// 2//Telnet Win32 : an ANSI telnet client. 3//Copyright (C) 1998-2000 Paul Brannan 4//Copyright (C) 1998 I.Ioannou 5//Copyright (C) 1997 Brad Johnson 6// 7//This program is free software; you can redistribute it and/or 8//modify it under the terms of the GNU General Public License 9//as published by the Free Software Foundation; either version 2 10//of the License, or (at your option) any later version. 11// 12//This program is distributed in the hope that it will be useful, 13//but WITHOUT ANY WARRANTY; without even the implied warranty of 14//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15//GNU General Public License for more details. 16// 17//You should have received a copy of the GNU General Public License 18//along with this program; if not, write to the Free Software 19//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20// 21//I.Ioannou 22//roryt@hol.gr 23// 24/////////////////////////////////////////////////////////////////////////// 25 26///////////////////////////////////////////////////////// 27// Class TkeyMap - Key Mappings // 28// - kept in an array container // 29// originally part of KeyTrans.cpp // 30///////////////////////////////////////////////////////// 31 32#include "precomp.h" 33 34KeyMap::KeyMap(DWORD state, DWORD code): map(0,0,sizeof(TKeyDef)), 35 key(NULL,state,code) {}; 36 37KeyMap::KeyMap(TKeyDef&tk):map(0,0,sizeof(TKeyDef)){ 38 key = tk; 39}; 40KeyMap::KeyMap(TKeyDef&tk, string& t):map(0,0,sizeof(TKeyDef)), orig(t){ 41 key = tk; 42}; 43 44int KeyMap::operator==(const KeyMap & t) const{ 45 return key == t.key; 46}; 47 48KeyMap& KeyMap::operator = (const KeyMap& t){ 49 key = t.key; 50 map = t.map; 51 orig = t.orig; 52 return (*this); 53}; 54 55#ifndef __BORLANDC__ 56bool operator<(const KeyMap &t1, const KeyMap &t2) { 57 return t1.key < t2.key; 58} 59#endif 60 61KeyMap::~KeyMap() { 62};