Re: Order of cluster searching with ace file (recent snapshot)
José Bollo <[email protected]> Wed, 13 Dec 2006 23:50:04 +0100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
Le Mercredi 13 D=E9cembre 2006 17:39, Cyril ADRIAN a =E9crit=A0: > Hi Dominique, > > On 12/13/06, Colnet Dominique <[email protected]> wrote: > > You just have to use a long distance (i.e. in a deep directory). > > I think I have found an example where distance is not enough: what if > you have two libraries, say "banking" and "address book", that have a > class PERSON (one pointing to their bank accounts; the other having > the person's address), and you want to use both? One solution is to > bridge both but I don't find it ideal since you need quite a complex > setting: > > root/root.e -- uses BANK_PERSON and ADDRESS_BOOK_PERSON > + bridge_bank/bank_person.e -- facade of bank's PERSON > > | + bank/person.e > > + bridge_address_book/address_book_person.e -- facade of address book's > PERSON + address_book/person.e > > I don't find it ideal because the library's code needs to be nested > *inside* the application tree :-( > > Any ideas? maybe. If only the loadpath.se were used, it could be simple to use it to=20 hierarchically search the classes.=20 =46or your example, in the subdirectory root/bridge_bank, the file loadpath= =2Ese=20 would contain: . ./bank And in the subdirectory root/bridge_address_book, the file loadpath.se woul= d=20 contain: . ./address_book Then for the classes in the subdirectory root/bridge_address_book, the used= =20 classes would be searched first from root/bridge_address_book, then from=20 root/bridge_address_book/adress_book and then from previously stacked=20 loadpath including the defaults one. The nested hierarchical scope of search would be depending of where is the= =20 currently compiled class. jos=E9