• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

1.6 Overview
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • A C++ interface to SWI-Prolog
        • A C++ interface to SWI-Prolog
          • Overview
            • Design philosophy of the classes
            • Summary of files
            • Summary of classes
            • Wrapper functions
            • Naming conventions, utility functions and methods
            • PlTerm class
            • PlTermScoped class (experimental)
            • Blobs
            • Limitations of the interface
            • Linking embedded applications using swipl-ld

1.6.2 Summary of files

The following files are provided:

  • SWI-cpp2.h - Include this file to get the C++ API. It automatically includes SWI-cpp2-plx.h and SWI-cpp2.cpp, unless the macro _SWI_CPP2_CPP_SEPARATE is defined, in which case you must compile SWI-cpp2.cpp separately.

  • SWI-cpp2.cpp - Contains the implementations of some methods and functions. If you wish to compile this separately, you must define the macro _SWI_CPP2_CPP_SEPARATE before your include for SWI-cpp2.h.

  • SWI-cpp2-plx.h - Contains the wrapper functions for the most of the functions in SWI-Prolog.h. This file is not intended to be used by itself, but is #included by SWI-cpp2.h.

  • SWI-cpp2-atommap.h - Contains a utility class for mapping atom-to-atom or atom-to-term, which is useful for naming long-lived blobs instead of having to pass them around as arguments.

  • test_cpp.cpp, test_cpp.pl - Contains various tests, including some longer sequences of code that can help in understanding how the C++ API is intended to be used. In addition, there are test_ffi.cpp, test_ffi.pl, which often have the same tests written in C, without the C++ API.

ClioPatria (version V3.1.1-51-ga0b30a5)