/**CHeaderFile*****************************************************************

  FileName    [kure.h]

  PackageName [kure]

  Synopsis    [The Kiel University Relation package.]

  Description [External functions and data strucures of the KURE package.
  <ul>
  <li> 
  </ul>
  ]

  SeeAlso     []

  Author      [Ulf Milanese]

  Copyright [This file was created at the Christian-Albrecht-University
  of Kiel.  The Christian-Albrecht-University of Kiel makes no warranty
  about the suitability of this software for any purpose.  It is
  presented on an AS IS basis.]

  Revision    []

******************************************************************************/

#ifndef _KURE
#define _KURE

/*---------------------------------------------------------------------------*/
/* Nested includes                                                           */
/*---------------------------------------------------------------------------*/

/*---------------------------------------------------------------------------*/
/* Constant declarations                                                     */
/*---------------------------------------------------------------------------*/

/* maximale Laenge des Namens */
#define KURE_MAXNAMELENGTH 16

#define KURE_NOTICE_YES           1
#define KURE_NOTICE_NO            2
#define KURE_NOTICE_OVERWRITE_ALL 3
#define KURE_NOTICE_CANCEL        4

#define KURE_NOTICE_INVALID -10

/*---------------------------------------------------------------------------*/
/* Stucture declarations                                                     */
/*---------------------------------------------------------------------------*/

typedef struct Kure_mint Kure_MINT;

typedef struct Kure_Rel Kure_Rel;

/*---------------------------------------------------------------------------*/
/* Type declarations                                                         */
/*---------------------------------------------------------------------------*/

typedef struct RelManager RelManager;

/*---------------------------------------------------------------------------*/
/* Variable declarations                                                     */
/*---------------------------------------------------------------------------*/

extern char * Kure_error_msg [];

/*---------------------------------------------------------------------------*/
/* Macro declarations                                                        */
/*---------------------------------------------------------------------------*/

/**AutomaticStart*************************************************************/

/*---------------------------------------------------------------------------*/
/* Function prototypes                                                       */
/*---------------------------------------------------------------------------*/

RelManager * Kure_Init (void);
RelManager * Kure_RelViewInit (void);
void         Kure_Quit (RelManager *);

Kure_Rel * Kure_RelationNew                (RelManager *, char *,
                                            int height, int width);
int        Kure_RelationExists             (RelManager *, char *);
Kure_Rel * Kure_RelationGet                (RelManager *, char *);
int        Kure_RelationGetHeight          (RelManager *, Kure_Rel *);
int        Kure_RelationGetWidth           (RelManager *, Kure_Rel *);
int        Kure_RelationGetNumberOfEntries (RelManager *, Kure_Rel *);
int        Kure_RelationDelete             (RelManager *, Kure_Rel *);

int Kure_RelationSetBit   (RelManager *, Kure_Rel *, int row, int column);
int Kure_RelationClearBit (RelManager *, Kure_Rel *, int row, int column);
int Kure_RelationGetBit   (RelManager *, Kure_Rel *, int row, int column);

int Kure_FunctionNew     (RelManager *, char *);
int Kure_ProgramNew      (RelManager *, char *);
int Kure_ProgramFileRead (RelManager *, char * filename);
int Kure_EvaluateTerm    (RelManager *, char * term, char * resultname);

/**AutomaticEnd***************************************************************/

#endif /* _KURE */
