Hello,

I'm having some problems to use interfaces in Jess. I had make a search in the mailing list, and although there were some messages over the topic, i still was not able to really understand how the process works. The problem is basic: I have a set of classes C, and a respective set of interfaces I. I'm creating objects of classes C and adding to the working memory. I would like use the interfaces I to access this objects (in Jess). How?

Solutions:
a) should i declare the classes, and work with the classes, leaving the interfaces behind; b) declare the interfaces as (deftemplate I_name (declare (from-class C_name)); Doesn't work, because when i try to match in a rule, I_name is not the same as C_name, then Jess don't match c) have a combination of declarations of interfaces and classes, like Russ did in a previous message
               "r.eval("(defclass IInterface1 IInterface1)");
r.eval("(defclass IInterface2 IInterface2 extends IInterface1)"); r.eval("(defclass AbstractClassA AbstractClassA extends IInterface2)");
               r.eval("(defclass ClassB ClassB extends AbstractClassA)");
               r.eval("(defclass ClassC ClassC extends AbstractClassA)");
r.eval("(defclass ClassD ClassD extends IInterface2)");" , which i have tried but haven't worked.

Any ideas?


Joao

-unclassified


------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------

begin:vcard
fn;quoted-printable:Jo=C3=A3o Mour=C3=A3o
n;quoted-printable;quoted-printable:Mour=C3=A3o;Jo=C3=A3o
org:Thales;Above Water Systems
adr:;;;Hengelo;;;Netherlands
email;internet:[email protected]
title:THALES NETHERLANDS B.V.
tel;work:2640
note:-unclassified mail-
version:2.1
end:vcard

Reply via email to