From: Christian P. <cp...@se...> - 2004-12-26 17:20:18
|
Am Samstag 25 Dezember 2004 21:33 schrieb Marc Duerner: > 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) Environment should use P::System::ProcessEnv for accessing process environment. Transition of System::ProcessEnv is on the way. > 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. I would like to also keep the simple key/value based P::Config. Not all apps need such a complex Prefs system. > > 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! > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > pclasses-devel mailing list > pcl...@li... > https://lists.sourceforge.net/lists/listinfo/pclasses-devel |