Changes in the directory structure
[rice.git] / include / rice.bak
blob31d00a3b092f749710b83b7db9a6898f623b91df
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * RICE 4.0x              Copyright (C) 1993             Rene' Jager *
3  *                                                                   *
4  *                                                                   *
5  * This toolbox is free software; you can redistribute it and/or     *
6  * modify it under the terms of the GNU General Public License as    *
7  * published by the Free Software Foundation; either version 2 of    *
8  * the License, or (at your option) any later version.               *
9  *                                                                   *
10  * This toolbox 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.                      *
14  *                                                                   *
15  * You should have received a copy of the GNU General Public License *
16  * along with this toolbox; if not, write to the:                    *
17  *                                                                   *
18  *    Free Software Foundation, Inc.                                 *
19  *    675 Mass Ave, Cambridge                                        *
20  *    MA 02139, USA.                                                 *
21  *                                                                   *
22  * See the RICE documentation for more information on the toolbox.   *
23  * The file COPYING for the complete GNU General Public License.     *
24  *                                                                   *
25  * You can reach me by (preferably e-mail):                          *
26  *                                                                   *
27  *    Rene' Jager                                                    *
28  *                                                                   *
29  *    Delft University of Technology                                 *
30  *    Department of Electrical Engineering                           *
31  *    Control Laboratory                                             *
32  *                                                                   *
33  *    Room ET 12.06                                                  *
34  *                                                                   *
35  *    Mekelweg 4                                                     *
36  *    P.O.Box 5031                                                   *
37  *    2600 GA  Delft                                                 *
38  *    The Netherlands                                                *
39  *                                                                   *
40  *    e-mail: R.Jager@ET.TUDelft.NL                                  *
41  *    phone:  +31-15-78 51 14                                        *
42  *    fax:    +31-15-62 67 38                                        *
43  *    telex:  38151 butud nl                                         *
44  *                                                                   *
45  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
48    File:   rice.h
49    Author: Rene' Jager
50    Update: January 4, 1993
51    Info:   main include file for RICE, see file rice.doc
55 /* prevent extra compilation */
57 #ifndef _RICE_H_
58 #define _RICE_H_
61 /* include header files */
63 #include <stdlib.h>
64 #include <string.h>
67 /* compiler characteristics */
69 #include <ricecomp.h>
72 /* define version and author */
74 #define RICE_NAME      "RICE"
75 #define RICE_VERSION   4.0
76 #define RICE_AUTHOR    "Ren\x82 Jager"
77 #define RICE_EMAIL     "R.Jager@ET.TUDelft.NL"
80 /* type definitions */
82 typedef RICE_PROTOTYPE(float (*RICE_NORM), (float, float));
83 typedef RICE_PROTOTYPE(void (*RICE_LINKER), (int, int, int, char *[], float *, int *));
86 /* linker macro's */
88 #define RICE_Linker(func)   RICE_FUNCTION(void func, \
89 (int rice_id, int rice_func, int rice_argc, char *rice_argv[], \
90 float *rice_grade, int *rice_num), (rice_id, rice_func, rice_argc, \
91 rice_argv, rice_grade, rice_num), int rice_id; int rice_func; \
92 int rice_argc; char *rice_argv[]; float *rice_grade; int *rice_num;)
94 #define RICE_Link(str, code) \
95 if(rice_func == ++(*rice_num)) \
96 { \
97    rice_argv[0] = str; \
98    if(rice_argc) \
99    { \
100       code; \
101    } \
102    return; \
106 /* truth values */
108 #define RICE_FALSE     0.0
109 #define RICE_TRUE      1.0
110 #define RICE_UNKNOWN   (-1.0)
113 /* message types */
115 #define RICE_ERROR     1
116 #define RICE_WARNING   2
117 #define RICE_MESSAGE   3
120 /* argument macro's */
122 #define RICE_grade   (*rice_grade)
123 #define RICE_argc    rice_argc
124 #define RICE_argv    rice_argv
125 #define RICE_id      rice_id
128 /* adjustment macro's */
130 #define RICE_Explain(kb, typ, fct, dpt)   RICE_MERGE(rice_Explain, typ(kb, fct, dpt))
131 #define RICE_Redirect(kb, nam, fnc)       RICE_MERGE(rice_Redirect, nam(kb, fnc))
132 #define RICE_Set(kb, nam)                 RICE_MERGE(rice_Set, nam(kb, 1))
133 #define RICE_Reset(kb, nam)               RICE_MERGE(rice_Set, nam(kb, 0))
134 #define RICE_Switch(kb, nam)              RICE_MERGE(rice_Set, nam(kb, -1))
135 #define RICE_Use(kb, nam, num, ptr)       RICE_MERGE(rice_Use, nam(kb, num, ptr))
138 /* for C++ applications */
140 #ifdef __cplusplus
141 extern "C" {
142 #endif
145 /* redirection functions */
147 RICE_PROTOTYPE(int rice_RedirectAsk, (int, RICE_PROTOTYPE(void (*), (int, int, char *[], float *))));
148 RICE_PROTOTYPE(int rice_RedirectInform, (int, RICE_PROTOTYPE(void (*), (int, int, char *[], float *))));
149 RICE_PROTOTYPE(int rice_RedirectReport, (int, RICE_PROTOTYPE(void (*), (int, int, char *))));
150 RICE_PROTOTYPE(int rice_RedirectExplain, (int, RICE_PROTOTYPE(void (*), (int, char *))));
151 RICE_PROTOTYPE(int rice_RedirectProtect, (int, RICE_PROTOTYPE(void (*), (int))));
152 RICE_PROTOTYPE(int rice_RedirectAbandon, (int, RICE_PROTOTYPE(void (*), (void))));
155 /* set functions */
157 RICE_PROTOTYPE(int rice_SetAdaptive, (int, int));
158 RICE_PROTOTYPE(int rice_SetInteractive, (int, int));
159 RICE_PROTOTYPE(int rice_SetRecursive, (int, int));
160 RICE_PROTOTYPE(int rice_SetRepetitive, (int, int));
161 RICE_PROTOTYPE(int rice_SetSelective, (int, int));
164 /* use functions */
166 RICE_PROTOTYPE(int rice_UseLinker, (int, int, RICE_LINKER *));
167 RICE_PROTOTYPE(int rice_UseIntersection, (int, int, RICE_NORM *));
168 RICE_PROTOTYPE(int rice_UseUnion, (int, int, RICE_NORM *));
171 /* explaination functions */
173 RICE_PROTOTYPE(int rice_ExplainWhy, (int, char *, int));
174 RICE_PROTOTYPE(int rice_ExplainHow, (int, char *, int));
177 /* interfacing KB functions */
179 RICE_PROTOTYPE(int rice_AppendKB, (int, char *));
180 RICE_PROTOTYPE(int rice_ClearKB, (int));
181 RICE_PROTOTYPE(int rice_CompileKB, (int, char *));
182 RICE_PROTOTYPE(int rice_CopyKB, (int, int));
183 RICE_PROTOTYPE(int rice_DestroyKB, (int));
184 RICE_PROTOTYPE(int rice_InferKB, (int));
185 RICE_PROTOTYPE(int rice_LoadKB, (int, char *));
186 RICE_PROTOTYPE(int rice_MoveKB, (int, int));
187 RICE_PROTOTYPE(int rice_ProcessKB, (int, char *, char *));
188 RICE_PROTOTYPE(int rice_RebuildKB, (int, char *));
189 RICE_PROTOTYPE(int rice_SaveKB, (int, char *));
190 RICE_PROTOTYPE(int rice_SwapKB, (int, RICE_PROTOTYPE(void (*), (void))));
193 /* interfacing ES functions */
195 RICE_PROTOTYPE(int rice_CheckES, (int));
196 RICE_PROTOTYPE(int rice_CopyES, (int, int));
197 RICE_PROTOTYPE(int rice_CreateES, (void));
198 RICE_PROTOTYPE(int rice_DeleteES, (int));
199 RICE_PROTOTYPE(int rice_MoveES, (int, int));
200 RICE_PROTOTYPE(int rice_SwitchES, (int));
203 /* for C++ applications */
205 #ifdef __cplusplus
207 #endif
210 /* in case of upgrading include RICE 3.x compatible header file rice3x.h */
212 #ifdef RICE_UPGRADE
213 #   include <rice3x.h>
214 #endif
217 /* in case of C++ compiler also include RICE class if necessary */
219 ifdef __cplusplus
220    ifndef _RICE_HPP_
221       include <rice.hpp>
222    endif
223 endif
226 #endif /* _RICE_H_ */