libdb.h File Reference

#include "libicl.h"

Go to the source code of this file.

Data Structures

struct  iclDatabase

Defines

#define EXTERN   extern
#define DB_HASH_TABLE_SIZE   100

Typedefs

typedef iclDatabase ICLDatabase

Functions

EXTERN ICLDatabasedb_NewDB ()
 Returns a pointer to a new database structure.
EXTERN int db_FreeDB (ICLDatabase *db)
 Frees all space used by a database.
EXTERN int db_Assert (ICLDatabase *db, ICLTerm *term, ICLTerm *params)
 Adds a copy of an ICL term to the database.
EXTERN int db_Retract (ICLDatabase *db, ICLTerm *term, ICLTerm *params)
 Removes an ICL term from the database.
EXTERN int db_Solve (ICLDatabase *db, ICLTerm *term, ICLTerm *params, ICLTerm **answers)
 Searches the database for matches to term.
EXTERN int db_PrintDB (ICLDatabase *db)
 Writes out the entire database.
EXTERN int db_IsValid (ICLDatabase *db)
 Returns TRUE if Database has been properly initialized.


Detailed Description

Definition in file libdb.h.


Define Documentation

#define DB_HASH_TABLE_SIZE   100

Definition at line 45 of file libdb.h.

#define EXTERN   extern

Definition at line 38 of file libdb.h.


Typedef Documentation

typedef struct iclDatabase ICLDatabase


Function Documentation

EXTERN int db_Assert ( ICLDatabase db,
ICLTerm term,
ICLTerm params 
)

Adds a copy of an ICL term to the database.

Parameters may include "at_beginning" (boolean parameter).

Returns:
TRUE if success

Definition at line 143 of file libdb.c.

EXTERN int db_FreeDB ( ICLDatabase db  ) 

Frees all space used by a database.

Returns:
TRUE if success

Definition at line 112 of file libdb.c.

EXTERN int db_IsValid ( ICLDatabase db  ) 

Returns TRUE if Database has been properly initialized.

Definition at line 74 of file libdb.c.

EXTERN ICLDatabase* db_NewDB (  ) 

Returns a pointer to a new database structure.

Definition at line 93 of file libdb.c.

EXTERN int db_PrintDB ( ICLDatabase db  ) 

Writes out the entire database.

Returns:
TRUE if success

Definition at line 292 of file libdb.c.

EXTERN int db_Retract ( ICLDatabase db,
ICLTerm term,
ICLTerm params 
)

Removes an ICL term from the database.

Parameters may include "do_all" (boolean parameter).

Returns:
TRUE if success

Definition at line 184 of file libdb.c.

EXTERN int db_Solve ( ICLDatabase db,
ICLTerm term,
ICLTerm params,
ICLTerm **  answers 
)

Searches the database for matches to term.

Parameters may include "solution_limit" (integer parameter).

Returns:
TRUE if success

Definition at line 234 of file libdb.c.


Generated on Wed May 23 17:20:14 2007 using doxygen 1.5.2