rename strings.h => my_strings.h to avoid problems with system strings.h
[bcusdk.git] / bcugen / lib / common.h
blobe0fd1c7f255d9c22b682eaa40db8fb2f0577a97a
1 /*
2 BCU SDK bcu development enviroment
3 Copyright (C) 2005-2007 Martin Koegler <mkoegler@auto.tuwien.ac.at>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef COMMON_H
21 #define COMMON_H
23 #define _(A) (A)
25 #include "array.h"
26 #include "my_strings.h"
28 typedef unsigned long utype;
29 typedef long itype;
30 typedef double ftype;
31 typedef struct
33 String Name;
34 String Value;
35 } Map;
36 typedef Array < Map > IdentMap;
37 typedef Array < int >IntArray;
38 typedef Array < String > IdentArray;
39 typedef Array < String > StringArray;
40 typedef unsigned short eibaddr_t;
41 typedef unsigned short eibpaddr_t;
42 typedef unsigned short eibgaddr_t;
43 typedef unsigned long eibkey_t;
45 typedef enum
46 { PRIO_LOW = 0, PRIO_NORMAL = 1, PRIO_URGENT = 2, PRIO_SYSTEM = 3 } prio_t;
49 class KeyMap
51 public:
52 int level;
53 eibkey_t key;
55 KeyMap ()
57 level = 0;
58 key = 0;
60 KeyMap (int l, eibkey_t k)
62 level = l;
63 key = k;
66 typedef Array < KeyMap > KeyMapArray;
68 typedef enum
70 #define MAP(A,B) GO_##B=A,
71 #include "GroupObjectType.lst"
72 #undef MAP
73 } GroupType;
75 typedef enum
77 #define MAP(A,B) B=A,
78 #include "PropertyType.lst"
79 #undef MAP
80 } PropertyType;
82 typedef enum
84 #define MAP(A,B) BCU_##B=A,
85 #include "BCUType.lst"
86 #undef MAP
87 } BCUType;
89 typedef enum
91 #define MAP(A,B) TM_##B=A,
92 #include "TimerType.lst"
93 #undef MAP
94 } TimerType;
96 typedef enum
98 #define MAP(A,B) TM_##B=A,
99 #include "TimerResType.lst"
100 #undef MAP
101 } TimerResType;
104 void die (const char *msg, ...);
105 void warn (const char *msg, ...);
107 #endif