Marcelo Slomp (mslomp@linuxmail.org):
[reactos.git] / reactos / base / applications / network / telnet / src / tkeymap.h
1 #ifndef __TKEYMAP_H
2 #define __TKEYMAP_H
3
4 #include "tkeydef.h"
5
6 #ifdef __BORLANDC__
7 #include <classlib\arrays.h>
8 #else
9 #include <string>
10 #include "stl_bids.h"
11 #endif
12
13 //AVS
14 typedef TArrayAsVector<TKeyDef> keyArray;
15
16 //AVS
17 // representation of keymap
18 struct KeyMap {
19 keyArray map; // keymap
20 string orig; // original string from .cfg file
21 TKeyDef key; // 'switch to' key
22
23 KeyMap(DWORD state, DWORD code);
24 KeyMap(): map(0,0,sizeof(TKeyDef)){};
25 KeyMap(TKeyDef&tk);
26 KeyMap(TKeyDef&tk, string&);
27 KeyMap(const string&t): map(0,0,sizeof(TKeyDef)), orig(t) {};
28 int operator==(const KeyMap & t) const;
29 KeyMap& operator = (const KeyMap& t);
30
31 #ifndef __BORLANDC__
32 // The STL needs this (Paul Brannan 5/25/98)
33 friend bool operator<(const KeyMap &t1, const KeyMap &t2);
34 #endif
35
36 ~KeyMap();
37 };
38
39 #endif