This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/CXX/yapi.hh

142 lines
2.5 KiB
C++
Raw Permalink Normal View History

2017-05-27 22:54:00 +01:00
2017-04-07 23:10:59 +01:00
/**
2017-05-27 22:54:00 +01:00
@file yapi.hh
2017-04-07 23:10:59 +01:00
@brief entry file for the YAP C++ interface
2014-04-28 11:47:09 +01:00
2017-04-07 23:10:59 +01:00
*/
2016-07-31 16:22:24 +01:00
2014-04-28 11:47:09 +01:00
#define YAP_CPP_INTERFACE 1
2017-02-20 14:38:00 +00:00
#include <iostream>
2017-09-06 01:16:36 +01:00
#include <string>
#include <vector>
2018-11-04 10:55:58 +00:00
extern "C" {
2018-11-23 14:00:20 +00:00
2018-11-04 10:55:58 +00:00
#include "YapConfig.h"
2018-11-23 14:00:20 +00:00
}
#include <gmpxx.h>
2018-11-23 14:00:20 +00:00
2017-04-07 23:10:59 +01:00
/*!
2014-05-04 22:31:22 +01:00
*
2018-05-10 23:27:41 +01:00
* @ingroup fli_c_cxx
2014-05-04 22:31:22 +01:00
* @defgroup yap-cplus-interface An object oriented interface for YAP.
*
2018-11-23 14:00:20 +00:00
1 * @{
2014-05-04 22:31:22 +01:00
*
*
2017-05-02 07:38:23 +01:00
* @brief C++ wrapper to terms, predicates and queries
2017-04-07 23:10:59 +01:00
*
* This new interface is designed to be object oriented and to fit
* naturally with the swig interface language generator. It uses ideas
* from the old YAP interface and from the SWI foreign language
* interface.
2014-05-04 22:31:22 +01:00
*
*/
2018-01-18 14:47:27 +00:00
extern "C" {
2018-06-18 12:16:36 +01:00
#include <stdlib.h>
2015-07-23 01:33:30 +01:00
2014-06-22 17:35:05 +01:00
// Bad export from Python
2016-04-12 16:22:53 +01:00
2018-11-04 10:55:58 +00:00
#include <YapConfig.h>
2014-05-04 22:31:22 +01:00
2014-06-12 01:48:36 +01:00
#include <stddef.h>
2015-04-13 13:28:17 +01:00
2018-04-07 19:45:18 +01:00
#if YAP_PYTHON
#include <Python.h>
extern bool python_in_python;
#endif
2014-04-28 11:47:09 +01:00
#include "Yap.h"
#include "Yatom.h"
#include "YapHeap.h"
#include "clause.h"
#include "yapio.h"
#include "Foreign.h"
#include "attvar.h"
#include "YapText.h"
#if HAVE_STDARG_H
#include <stdarg.h>
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_STRING_H
#include <string.h>
#endif
2014-06-19 15:06:15 +01:00
#if _MSC_VER || defined(__MINGW32__)
2017-09-06 01:16:36 +01:00
//#include <windows.h>
2014-04-28 11:47:09 +01:00
#endif
2017-09-06 01:16:36 +01:00
// taken from yap_structs.h
2014-04-28 11:47:09 +01:00
#include "iopreds.h"
2015-07-06 12:01:55 +01:00
2017-09-06 01:16:36 +01:00
X_API extern void YAP_UserCPredicate(const char *, YAP_UserCPred,
YAP_Arity arity);
/* extern void UserCPredicateWithArgs(const char *name, int *fn(), unsigned int
* arity)
*/
X_API extern void YAP_UserCPredicateWithArgs(const char *, YAP_UserCPred,
YAP_Arity, YAP_Term);
2018-11-04 10:55:58 +00:00
X_API extern void YAP_UserBackCPredicate(const char *name, YAP_UserCPred init,
YAP_UserCPred cont, YAP_Arity arity,
YAP_Arity extra);
2017-11-29 13:47:57 +00:00
X_API extern void YAP_UserBackCutCPredicate(const char *name,
2018-11-04 10:55:58 +00:00
YAP_UserCPred init,
2017-11-29 13:47:57 +00:00
YAP_UserCPred cont,
2018-11-04 10:55:58 +00:00
YAP_UserCPred cut, YAP_Arity arity,
YAP_Arity extra);
2015-07-06 12:01:55 +01:00
2017-09-06 01:16:36 +01:00
X_API extern YAP_Term YAP_ReadBuffer(const char *s, YAP_Term *tp);
2015-07-06 12:01:55 +01:00
2018-07-03 00:54:34 +01:00
extern YAP_Term YAP_MkcharPTerm(char *s);
2014-04-28 11:47:09 +01:00
}
2014-05-04 22:31:22 +01:00
class YAPEngine;
2014-04-28 11:47:09 +01:00
class YAPAtom;
class YAPFunctor;
class YAPApplTerm;
class YAPPairTerm;
2014-04-28 11:47:09 +01:00
class YAPQuery;
2015-02-09 01:52:10 +00:00
class YAPModule;
class YAPError;
class YAPPredicate;
2014-04-28 11:47:09 +01:00
2015-02-09 01:52:10 +00:00
#include "yapa.hh"
2014-05-04 22:31:22 +01:00
2015-02-09 01:52:10 +00:00
#include "yapie.hh"
2014-04-28 11:47:09 +01:00
2015-02-09 01:52:10 +00:00
#include "yapt.hh"
2014-04-28 11:47:09 +01:00
2015-02-09 01:52:10 +00:00
#include "yapdb.hh"
2014-04-28 11:47:09 +01:00
2015-02-09 01:52:10 +00:00
#include "yapq.hh"
2014-04-29 11:45:19 +01:00
2014-05-04 22:31:22 +01:00
/**
2014-06-11 19:27:54 +01:00
* @}
2014-05-04 22:31:22 +01:00
*
*/