external_class(+name_of_library, +list_of_classes)

This Prolog compile directive declares that one or more Prolog classes are external classes. The implementation of an external class is contained in an external library. For more information about creating external libraries see external Prolog clauses and classes.

see also: external/2 predicate indicators discontiguous/1 ensure_loaded/1 include/1 initialization/1 multifile/1 not_redo/1 private/0 private/1 public/0 public/1

Examples
external_class( 'test.dll', [test] ). there is an external class named 'test' and it is implemented in the external library 'test.dll'
external_class( 'oo.dll', [myClass, derivedClass]). the classes 'myClass' and 'derivedClass' are declared external and their implementation is in the file 'oo.dll'.

 

Exceptions
first argument is a variable an instantiation_error. exception is thrown
first argument is a list or an empty list a type_error(atom, Argument) exception is thrown
the list of classes argument is not a list a type_error(list, List) exception is thrown
an element E of the list of class names is not an atom a type_error(atom, Element) exception is thrown

 

 

info@trinc-prolog.com