From Art.Huston@marcam.com Thu Dec 12 10:47:23 1996 Received: from netmon.marcam.com (root@netmon.marcam.com [192.77.205.10]) by amber.ccs.neu.edu (8.8.4/8.7.3) with ESMTP id KAA20707 for ; Thu, 12 Dec 1996 10:47:22 -0500 (EST) From: Art.Huston@marcam.com Received: from ccmail.marcam.com (ccmail.marcam.com [165.217.25.60]) by netmon.marcam.com (8.7.5/8.7.3) with SMTP id KAA05017 for ; Thu, 12 Dec 1996 10:47:21 -0500 (EST) Received: from ccMail by ccmail.marcam.com (IMA Internet Exchange v1.04) id 2b028aa0; Thu, 12 Dec 96 10:45:46 -0500 Mime-Version: 1.0 Date: Thu, 12 Dec 1996 10:46:21 -0500 Message-ID: <2b028aa0@ccmail.marcam.com> Subject: Re: questions To: Karl Lieberherr Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Description: cc:Mail note part Status: R See my answers below. ______________________________ Reply Separator _________________________________ Subject: questions Author: Karl Lieberherr at SMTPGATE Date: 12/12/96 8:35 AM Art: You write: A ContainerClass must implement the following methods in order to be used in a Re petitionClass: void addElement(RepeatedPartType); synchronized Enumeration elements(); Why is addElement not synchronized? If two elements are added simultaneously, couldn't one be lost? You are correct. I accidentally omitted "synchronized" from the addElement declaration. These signatures come from the Vector class in java.util, with the exception that it uses Object. This is okay, since Object is a super-class of all objects, and therefore of RepeatedPartType. I will fix the documentation and put a new copy in /proj/asl/lieber/f96/com3360/ahuston. Shouldn't all traversals in DemJava also be synchronized? --------- In /proj/asl/lieber/f96/com3360/ahuston/example please can you put in all the code generated by the modified Demeter/Java, specifically the *.java files. This serves as a good example. Good idea. I'll do it. --------- You write: if (o instanceof repeatedpartype) { repeatedparttype repeatedpartpartname = (Value) o; repeatedpartname.traversal_name(visitorargname); } What is Value? I had copied an actual traversal over a RepetitionClass containing Value. I will change it to "repeatedparttype". -------- Can you add a second example where the user defines his own container class with the required interface and uses it in a repetition class? -------- Hmm. I have an idea about extending a HashTable to be a ContainerClass to store a list of employees. It should be straight-forward, and a good example as well. I can't do it today because I have work, the final exam, and my son's Christmas concert tonight. But I think I can do it by Monday. Please can you give me step-by-step instructions how I need to change my set-up to run your new version of Demeter/Java. I did not copy any of the object code or executables to /proj/asl/lieber because I did not want to use too much disk space. Was this a mistake? If so, I can copy it. For now, you should add /proj/demsys/com3360/ahuston/project/bin to your PATH so it appears before /proj/demsys/demjava/bin. I believe you have execute privileges. I deleted the executable to save space, so I am rebuilding it now. I'll send email when everything is ready. -- Karl Thanks for the comments. See you tonight. Art