From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA07897; Thu, 18 Jul 2002 12:35:08 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA07893 for ; Thu, 18 Jul 2002 12:35:07 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a159.tin.it [62.211.4.159]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6IAZ6H00333 for ; Thu, 18 Jul 2002 12:35:06 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id DEB8C2724F for ; Thu, 18 Jul 2002 12:42:17 +0200 (CEST) Message-ID: <3D369B89.1030000@baretta.com> Date: Thu, 18 Jul 2002 12:42:17 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: [Caml-list] Protected methods Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I'm trying to get the semantics of protected methods of C++. I have a class with a method that is not meaningful for the outside world, but different instances of this class should be able to invoke this method on one another. I need something like the following pseudocode: class a = object method protected m = ... method m2 (obj:a) = a # m end I understand this can be obtained by creating a container module for class a and restricting the type of a through the module signature. I read the manual but was unable to figure out the syntax to do this. Would anyone be so kind as to lend a hand? Thank you very much. Alex ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners