ReactOS  0.4.12-dev-14-gd0c8636
tcharmap.h
Go to the documentation of this file.
1 // This is a simple class to handle character maps
2 // (Paul Brannan 6/25/98)
3 
4 #pragma once
5 
6 class TCharmap {
7 private:
8  char *map[256];
9  char *current_map;
10 public:
11  TCharmap();
12  ~TCharmap();
13 
14  void init() {}
15 
16  char translate(char c, char mapchar) {
17  if(map[(unsigned char)mapchar]) return map[(unsigned char)mapchar][(unsigned char)c];
18  return c;
19  }
20  char translate(char c) {
21  return current_map[(unsigned char)c];
22  }
23 
24  void setmap(char mapchar) {
25  if(map[(unsigned char)mapchar]) current_map = map[(unsigned char)mapchar];
26  }
27 
28  void translate_buffer(char *start, char *end) {
29  while(start < end) {
30  *start = translate(*start);
31  start++;
32  }
33  }
34 
35  void modmap(char pos, char mapchar, char c);
36 
37  int enabled;
38 };
int enabled
Definition: tcharmap.h:37
void translate_buffer(char *start, char *end)
Definition: tcharmap.h:28
void modmap(char pos, char mapchar, char c)
Definition: tcharmap.cpp:212
GLuint GLuint end
Definition: gl.h:1545
char translate(char c)
Definition: tcharmap.h:20
unsigned char
Definition: typeof.h:27
char translate(char c, char mapchar)
Definition: tcharmap.h:16
const GLubyte * c
Definition: glext.h:8905
void setmap(char mapchar)
Definition: tcharmap.h:24
Definition: _map.h:44
void init()
Definition: tcharmap.h:14
char * current_map
Definition: tcharmap.h:9
GLuint start
Definition: gl.h:1545
#define c
Definition: ke_i.h:80