improve support for UDI.
This commit is contained in:
parent
84ebc2b2f2
commit
ffb621c53b
2
C/udi.c
2
C/udi.c
@ -3,6 +3,7 @@
|
||||
#include "clause.h"
|
||||
#include "udi.h"
|
||||
|
||||
|
||||
#include "rtree_udi.h"
|
||||
|
||||
/* we can have this stactic because it is written once */
|
||||
@ -158,3 +159,4 @@ Yap_udi_init(void)
|
||||
RtreeCmd.destroy = RtreeUdiDestroy;
|
||||
Yap_InitCPred("$udi_init", 2, p_new_udi, 0);
|
||||
}
|
||||
|
||||
|
24
include/rtree_udi.h
Normal file
24
include/rtree_udi.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef _RTREE_UDI_
|
||||
#define _RTREE_UDI_
|
||||
|
||||
#ifndef _RTREE_
|
||||
typedef void control_t;
|
||||
#endif
|
||||
|
||||
/*Prolog term from :- udi(a(-,+,+)).
|
||||
User defined index announce
|
||||
*/
|
||||
extern control_t *RtreeUdiInit (Term spec,
|
||||
void *pred,
|
||||
int arity);
|
||||
|
||||
/*this is called in each asserted term that was declared to udi_init*/
|
||||
extern control_t *RtreeUdiInsert (Term t, /*asserted term*/
|
||||
control_t *control,
|
||||
void *clausule); /*to store in tree and return
|
||||
in search*/
|
||||
|
||||
extern void *RtreeUdiSearch (control_t *control);
|
||||
extern int RtreeUdiDestroy(control_t *control);
|
||||
|
||||
#endif /* _RTREE_UDI_ */
|
Reference in New Issue
Block a user