How to break module into multiple file.
Matthew Ong
ongbp at yahoo.com
Thu May 12 07:11:20 PDT 2011
Hi Adam,
Ok. Just to be very clear here. Please help to validate.
>Common interfaces for both HashMap, LinkedList and hashlist.
>But they should be all be in different source file(HashMap.d, >LinkedList.d,
HashList.d)..
To have import for:
module CornerCube.Collections
class HashMap{...}
I would have to layout as:
MyLib/Collection.d << HashMap, LinkedList, HashList within this file
The single Collection.d works for me but hard to maintain manually.
For this one I use import MyLib.Collection;
or
MyLib/Collections/HashMap.d << Single class file. but module Corner
CornerCube/Collection/LinkedList.d
CornerCube/Collection/HashList.d
This one I have error.
import MyLib.Collection;
This also I have error.
import MyLib.Collection.LinkedList;
import MyLib.Collection.HashList;
// Some sort of recursive import...
How do I import them within the calling class?
More information about the Digitalmars-d-learn
mailing list