00001 /*******************************************************/ 00002 /* "C" Language Integrated Production System */ 00003 /* */ 00004 /* CLIPS Version 6.24 06/05/06 */ 00005 /* */ 00006 /* FACT HASHING MODULE */ 00007 /*******************************************************/ 00008 00009 /*************************************************************/ 00010 /* Purpose: */ 00011 /* */ 00012 /* Principal Programmer(s): */ 00013 /* Gary D. Riley */ 00014 /* */ 00015 /* Contributing Programmer(s): */ 00016 /* */ 00017 /* Revision History: */ 00018 /* */ 00019 /* 6.24: Renamed BOOLEAN macro type to intBool. */ 00020 /* */ 00021 /*************************************************************/ 00022 00023 #ifndef _H_facthsh 00024 00025 #define _H_facthsh 00026 00027 struct factHashEntry; 00028 00029 #ifndef _H_factmngr 00030 #include "factmngr.h" 00031 #endif 00032 00033 struct factHashEntry 00034 { 00035 struct fact *theFact; 00036 struct factHashEntry *next; 00037 }; 00038 00039 #define SIZE_FACT_HASH 16231 00040 00041 #ifdef LOCALE 00042 #undef LOCALE 00043 #endif 00044 #ifdef _FACTHSH_SOURCE_ 00045 #define LOCALE 00046 #else 00047 #define LOCALE extern 00048 #endif 00049 00050 #define GetFactDuplication() EnvGetFactDuplication(GetCurrentEnvironment()) 00051 #define SetFactDuplication(a) EnvSetFactDuplication(GetCurrentEnvironment(),a) 00052 00053 LOCALE void AddHashedFact(void *,struct fact *,unsigned long); 00054 LOCALE intBool RemoveHashedFact(void *,struct fact *); 00055 LOCALE unsigned long HandleFactDuplication(void *,void *,intBool *); 00056 LOCALE intBool EnvGetFactDuplication(void *); 00057 LOCALE intBool EnvSetFactDuplication(void *,int); 00058 LOCALE void InitializeFactHashTable(void *); 00059 LOCALE void ShowFactHashTable(void *); 00060 LOCALE unsigned long HashFact(struct fact *); 00061 00062 #endif 00063 00064
1.5.6