caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Protected methods
@ 2002-07-18 10:42 Alessandro Baretta
  2002-07-18 11:01 ` Gerd Stolpmann
  2002-07-20 22:48 ` Dmitry Bely
  0 siblings, 2 replies; 16+ messages in thread
From: Alessandro Baretta @ 2002-07-18 10:42 UTC (permalink / raw)
  To: Ocaml

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2002-07-22  4:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-18 10:42 [Caml-list] Protected methods Alessandro Baretta
2002-07-18 11:01 ` Gerd Stolpmann
2002-07-18 11:44   ` Alessandro Baretta
2002-07-19  8:50     ` Jacques Garrigue
2002-07-19 10:01       ` Alessandro Baretta
2000-07-20  0:46         ` Jacques Garrigue
2002-07-20  7:41           ` Alessandro Baretta
2002-07-20  1:31         ` Jacques Garrigue
2002-07-20  7:48           ` Alessandro Baretta
2002-07-20 22:48 ` Dmitry Bely
2002-07-20 23:08   ` Brian Smith
2002-07-22  3:37     ` OCaml's OO design " Jacques Garrigue
2002-07-22  4:20       ` John Prevost
2002-07-20 23:54   ` Alessandro Baretta
2002-07-21  7:52     ` Dmitry Bely
2002-07-21 13:14       ` Alessandro Baretta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).