home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.eiffel
- Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
- From: sakkinen@jyu.fi (Markku Sakkinen)
- Subject: Re: Eiffel internals
- Message-ID: <1992Nov18.140905.23486@jyu.fi>
- Keywords: id of the caller..
- Organization: University of Jyvaskyla, Finland
- References: <Nov.17.18.57.56.1992.26484@paul.rutgers.edu>
- Date: Wed, 18 Nov 1992 14:09:05 GMT
- Lines: 40
-
- In article <Nov.17.18.57.56.1992.26484@paul.rutgers.edu> partha@paul.rutgers.edu (nowhere_man) writes:
- >
- >I might need this for my work.Suppose class C declares x of class type
- >D, creates it and invokes x.m, where m is a method properly defined in
- >class D. Now is there any way to find out at the callee (ie in class
- >D) the (pointer to the) object of type C that calls the method m?
- > ...
-
- Sorry, I am not actually helping you ...
-
- This is not such a bad idea in principle. At least I myself have
- sometimes thought that a facility for the supplier object to know
- the identity of its client could be useful at times.
- Somebody may even have suggested some mechanism for that in public
- (perhaps Mario Wolczko from Manchester University?).
-
- An official client-identification facility would suit Eiffel
- particularly well, given that the language already has selective
- export declarations (a class may restrict the allowed client classes
- for each feature separately). It should be declared in the feature
- declaration, and the routine would then have available an identifier
- 'Client', similarly to 'Current'.
-
- If the client's identity were automatically available to all features,
- it might make sense to have also another identifier, 'External_client',
- for the uppermost feature call on the call stack that was made through
- a variable, not simply to Current.
-
- Well, a rather loose idea. Please develop further or shoot it down
- (the latter being my own favourite hobby, of course).
-
- ----------------------------------------------------------------------
- Markku Sakkinen (sakkinen@jytko.jyu.fi)
- SAKKINEN@FINJYU.bitnet (alternative network address)
- Department of Computer Science and Information Systems
- University of Jyvaskyla (a's with umlauts)
- PL 35
- SF-40351 Jyvaskyla (umlauts again)
- Finland
- ----------------------------------------------------------------------
-