tizen 2.4 release
[external/clips.git] / src / defins.h
1    /*******************************************************/
2    /*      "C" Language Integrated Production System      */
3    /*                                                     */
4    /*               CLIPS Version 6.30  02/04/15          */
5    /*                                                     */
6    /*                                                     */
7    /*******************************************************/
8
9 /*************************************************************/
10 /* Purpose:                                                  */
11 /*                                                           */
12 /* Principal Programmer(s):                                  */
13 /*      Brian L. Dantes                                      */
14 /*                                                           */
15 /* Contributing Programmer(s):                               */
16 /*                                                           */
17 /* Revision History:                                         */
18 /*                                                           */
19 /*      6.23: Corrected compilation errors for files         */
20 /*            generated by constructs-to-c. DR0861           */
21 /*                                                           */
22 /*      6.24: Renamed BOOLEAN macro type to intBool.         */
23 /*                                                           */
24 /*      6.30: Removed conditional code for unsupported       */
25 /*            compilers/operating systems (IBM_MCW,          */
26 /*            MAC_MCW, and IBM_TBC).                         */
27 /*                                                           */
28 /*            GetConstructNameAndComment API change.         */
29 /*                                                           */
30 /*            Added const qualifiers to remove C++           */
31 /*            deprecation warnings.                          */
32 /*                                                           */
33 /*            Converted API macros to function calls.        */
34 /*                                                           */
35 /*            Changed find construct functionality so that   */
36 /*            imported modules are search when locating a    */
37 /*            named construct.                               */
38 /*                                                           */
39 /*************************************************************/
40
41 #ifndef _H_defins
42 #define _H_defins
43
44 #if DEFINSTANCES_CONSTRUCT
45
46 struct definstances;
47
48 #ifndef _H_conscomp
49 #include "conscomp.h"
50 #endif
51 #ifndef _H_constrct
52 #include "constrct.h"
53 #endif
54 #ifndef _H_cstrccom
55 #include "cstrccom.h"
56 #endif
57 #ifndef _H_moduldef
58 #include "moduldef.h"
59 #endif
60 #ifndef _H_object
61 #include "object.h"
62 #endif
63
64 typedef struct definstancesModule
65   {
66    struct defmoduleItemHeader header;
67   } DEFINSTANCES_MODULE;
68
69 typedef struct definstances
70   {
71    struct constructHeader header;
72    unsigned busy;
73    EXPRESSION *mkinstance;
74   } DEFINSTANCES;
75
76 #define DEFINSTANCES_DATA 22
77
78 struct definstancesData
79   {
80    struct construct *DefinstancesConstruct;
81    int DefinstancesModuleIndex;
82 #if CONSTRUCT_COMPILER && (! RUN_TIME)
83    struct CodeGeneratorItem *DefinstancesCodeItem;
84 #endif
85   };
86
87 #define DefinstancesData(theEnv) ((struct definstancesData *) GetEnvironmentData(theEnv,DEFINSTANCES_DATA))
88
89 #ifdef LOCALE
90 #undef LOCALE
91 #endif
92
93 #ifdef _DEFINS_SOURCE_
94 #define LOCALE
95 #else
96 #define LOCALE extern
97 #endif
98
99    LOCALE const char                    *EnvDefinstancesModule(void *,void *);
100    LOCALE const char                    *EnvDefinstancesModuleName(void *,void *);
101    LOCALE void                          *EnvFindDefinstances(void *,const char *);
102    LOCALE void                          *EnvFindDefinstancesInModule(void *,const char *);
103    LOCALE void                           EnvGetDefinstancesList(void *,DATA_OBJECT *,struct defmodule *);
104    LOCALE const char                    *EnvGetDefinstancesName(void *,void *);
105    LOCALE SYMBOL_HN                     *EnvGetDefinstancesNamePointer(void *,void *);
106    LOCALE const char                    *EnvGetDefinstancesPPForm(void *,void *);
107    LOCALE void                          *EnvGetNextDefinstances(void *,void *);
108    LOCALE int                            EnvIsDefinstancesDeletable(void *,void *);
109    LOCALE void                           EnvSetDefinstancesPPForm(void *,void *,const char *);
110    LOCALE intBool                        EnvUndefinstances(void *,void *);
111    LOCALE void                           GetDefinstancesListFunction(void *,DATA_OBJECT *);
112    LOCALE void                          *GetDefinstancesModuleCommand(void *);
113    LOCALE void                           SetupDefinstances(void *);
114    LOCALE void                           UndefinstancesCommand(void *);
115 #if DEBUGGING_FUNCTIONS
116    LOCALE void                           PPDefinstancesCommand(void *);
117    LOCALE void                           ListDefinstancesCommand(void *);
118    LOCALE void                           EnvListDefinstances(void *,const char *,struct defmodule *);
119 #endif
120
121 #if ALLOW_ENVIRONMENT_GLOBALS
122
123    LOCALE const char                    *DefinstancesModule(void *);
124    LOCALE void                          *FindDefinstances(const char *);
125    LOCALE void                           GetDefinstancesList(DATA_OBJECT *,struct defmodule *);
126    LOCALE const char                    *GetDefinstancesName(void *);
127    LOCALE const char                    *GetDefinstancesPPForm(void *);
128    LOCALE void                          *GetNextDefinstances(void *);
129    LOCALE int                            IsDefinstancesDeletable(void *);
130 #if DEBUGGING_FUNCTIONS
131    LOCALE void                           ListDefinstances(const char *,struct defmodule *);
132 #endif
133    LOCALE intBool                        Undefinstances(void *);
134
135 #endif /* ALLOW_ENVIRONMENT_GLOBALS */
136
137 #endif /* DEFINSTANCES_CONSTRUCT */
138
139 #endif /* _H_defins */
140
141
142
143