aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README24
1 files changed, 12 insertions, 12 deletions
diff --git a/README b/README
index 489103e..e500352 100644
--- a/README
+++ b/README
@@ -30,23 +30,23 @@ Frontend
~~~~~~~~
The graphical interface is implemented in C++ using the Win32 API (see
the c folder). The source code is spread across a small number of
-files. For an overview of the functions provided by each file, see
-defs.h. In summary:
+files. For an overview of the classes/functions provided by each file,
+see defs.h. In summary:
main.cpp Entry point and initialization. Contains the main event handler.
listview.cpp Creates and handles the shared aspects of the two list views.
episodelistview.cpp Defines the interface to the episode list view.
datalistview.cpp Defines the interface to the data list view.
+pl.cpp Interface to Prolog backend.
common.cpp Some useful functions that don't fit elsewhere.
-The frontend interacts with the Prolog backend via the SWI-Prolog API.
-Note, however, that most interaction is done through ten or so macros,
-defined in defs.h, that make the code easier to write -- and read,
-once you're used to it.
+The C++ frontend communicates with the Prolog backend via a couple of
+variadic printf-like functions defined in pl.cpp. For example,
-Building
-~~~~~~~~
-Episode Browser is built with swipl-ld, which is installed with
-SWI-Prolog. It is a wrapper around a C compiler and linker, which in
-Episode Browser's case happens to be GCC. The author personally uses
-the MinGW toolchain conveniently included with Strawberry Perl.
+ Pl("episode_data","episode_title","Is",i,&sz)
+
+calls the Prolog predicate episode_data:episode_title/2. The first
+argument is an integer input, denoted by an uppercase I. The second
+argument is a zero-terminated string output, denoted by a lowercase s.
+Given i = 100, the call puts the title of episode 100 into the buffer
+pointed at by sz. For more information, see pl.cpp.