- Hiding abstract methods

From: CFB Software <"CFB>
Date: Thu, 14 Jun 2007 23:28:21 +0930

----boundary-LibPST-iamunique-2076088874_-_-
Content-type: text/plain

Hi Doug,

I don't know if I can help but as nobody else has responded yet I'm
willing to give it a try. I'm interested in learning more about the
finer details of issues like this. However, I'm not sure from your
desription that I understand exactly what you are trying to do. Would it
be possible for you to show complete minimal examples of:

a) What you would like the code to look like

b) How you think it needs to be written to make it acceptable to
Blackbox

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp

> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of Douglas G. Danforth
> Sent: Wednesday, 13 June 2007 10:22 AM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Hiding abstract methods
>
>
> Folks,
>
> I have a conceptual problem on which I would like your advice.
>
> I have an ABSTRACT type A and two concrete types C1 and
> C2 which are extensions of A.
>
> TYPE
> A* = POINTER TO ABSTRACT RECORD END;
> C1* = POINTER TO RECORD(A) END;
> C2* = POINTER TO RECORD(A) END;
>
> I would like to export A (as shown with the '*'') but within the
> module M where A is defined I *do not want* to export its
> methods. I want them to be completely hidden so that the user
> of M only needs to create the instance Ci (and fill its
> fields (not shown))
> and pass Ci to the module M in which the specific methods
> appropriate to Ci
> are specified (but also not exported). Within M, procedures take 'a'
> (an instance of A which is either C1 or C2) and operates on it without
> knowledge of its concrete form. The methods of A are simply called
> and the concrete forms of those methods as C1 or C2 are actually
> run.
>
> Unfortunately, it seems that this scheme of things is not possible in
> BlackBox.
> I am forced to export the methods of A and also the methods of C1 and
> the methods of C2, greatly cluttering the interface to M when
> none of that
> information will be used by the person operating with M.
> Only the existence
> of A and the extensions C1 and C2 are needed.
>
> Is there a clean way to hide all of these methods?
>
> -Doug Danforth
>
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

----boundary-LibPST-iamunique-2076088874_-_-
Content-type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biBccGFyDQo+IEJsYWNr
Qm94LlxwYXINCj4gSSBhbSBmb3JjZWQgdG8gZXhwb3J0IHRoZSBtZXRob2RzIG9mIEEgYW5kIGFs
c28gdGhlIG1ldGhvZHMgb2YgQzEgYW5kXHBhcg0KPiB0aGUgbWV0aG9kcyBvZiBDMiwgZ3JlYXRs
eSBjbHV0dGVyaW5nIHRoZSBpbnRlcmZhY2UgdG8gTSB3aGVuIFxwYXINCj4gbm9uZSBvZiB0aGF0
XHBhcg0KPiBpbmZvcm1hdGlvbiB3aWxsIGJlIHVzZWQgYnkgdGhlIHBlcnNvbiBvcGVyYXRpbmcg
d2l0aCBNLiAgXHBhcg0KPiBPbmx5IHRoZSBleGlzdGVuY2VccGFyDQo+IG9mIEEgYW5kIHRoZSBl
eHRlbnNpb25zIEMxIGFuZCBDMiBhcmUgbmVlZGVkLlxwYXINCj4gXHBhcg0KPiBJcyB0aGVyZSBh
IGNsZWFuIHdheSB0byBoaWRlIGFsbCBvZiB0aGVzZSBtZXRob2RzP1xwYXINCj4gXHBhcg0KPiAt
RG91ZyBEYW5mb3J0aFxwYXINCj4gXHBhcg0KPiAtLS0gQmxhY2tCb3hccGFyDQo+IC0tLSBzZW5k
IHN1YmplY3QgSEVMUCBvciBVTlNVQlNDUklCRSB0byBibGFja2JveEBvYmVyb24uY2hccGFyDQpc
cGFyDQotLS0gQmxhY2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJ
QkUgdG8gYmxhY2tib3hAb2Jlcm9uLmNoXHBhcg0KfQ==


----boundary-LibPST-iamunique-2076088874_-_---
Received on Thu Jun 14 2007 - 15:58:21 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:32 UTC