> > On 2012-08-07 at 08:18:32 [+0200], Fredrik Modèen <fredrik@xxxxxxxxx> > wrote: >> >> > On Mon, Aug 6, 2012 at 6:00 PM, François Revol <revol@xxxxxxx> wrote: >> >> >> >> Another option is to serialize BMessage to text, as ThemeManager >> does, >> >> but the code in there is not really robust. >> >> The format used comes from the format Dano0 used when >> PrintToStream()ing >> >> messages, and is actually quite alike to the driver setting syntax, >> >> maybe we could have a common framework doing both ? >> > >> > Having looked at the ThemeManager files, I will say they do look quite >> > nice and are very readable, certainly much more than dumped BMessages >> > ;) >> > >> > If those classes could be cleaned up and made more robust and maybe >> > combined with the driver settings stuff, it would probably be pretty >> > good. >> François : sound's that good? >> >> Where should it be located? > > The real question is: Do you really need it? Do your settings files have > to > be human-readable? No not realy.. But if I use BMessage I need to store some part as [device_id]_[name of settings]. No I have two way's of reading this. 1. look at what devices are connected and read BMessage that has [device_id]_[name of settings] 2. Read all BMessages and store them in a Dicinary type (does c++ have one?) and in that Dicinary read out [device_id]_[name of settings] So whitch one are preferd? 1 takes less memmory -- MVH Fredrik Modèen