From: Marc D. <bdu...@gm...> - 2004-12-25 21:31:58
|
On Saturday 25 Dec 2004 20:10, stephan beal wrote: > Hi, Marc! > > A question about your Prefs support: > > i want to start on the App module, and will need to implement these > features: > - argv parser. (ArgvParser class) > - OO access to environment. (Environment class) > - per-app config files. (AppConfig? class) Yes, AppConfig is basically Prefs. > i have all of that, but i need to port it from eshell. The problem is > that i've built up lots of deps on other code of mine, and now need to > figure out which parts P has and which ones i need to bring over. > > So, my question is: do you have a class which offers generic properties > support. i mean, a map-like class which stores key/val pairs? That > support is really the core to the App module, because the Environment > and ArgvParser currently extend a type which provides that > functionality. Also, such a type is inherently useful as a simple > config file. The old P::Config was simply a map<string, string>. Christian and I then decided that we would need a list, because we wanted to keep the order of a config file after loading/saving. Also I wanted to get away from string as the value type so we have now a list<Entry*> and ValueEntry derived from Entry for all streamables. Prefs knows Sections which have a list<Entry*> and a list<Section*> to form a tree structure. > So, if you've got such a type, please get it into P2 CVS, or let me know > where to find it. If not i'll port in my PropertyStore type, which uses > templatizes get()/set() functions to do lexical casting, which allows > us to store any i/ostreamable type. IIRC you already have a type for > this? If so i will rewrite around that one. Can I look at your PropertyStore. It should be possible to fuse that with Prefs in some way. I can see that such a type would not only be useful for Prefs/AppConfig. > > See ya! take care! |