[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: multiple entries inside KSimpleConfig
From:       Yannick Koehler <yannick.koehler () colubris ! com>
Date:       2002-07-30 19:40:36
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On July 30, 2002 02:51 pm, Frerich Raabe wrote:
> On Tuesday 30 July 2002 20:21, Yannick Koehler wrote:
> > What's the best way to save many similar entries?  I have the following
> >
> > 	filter {
> > 		char *name;
> > 		char *rule;
> > 	}
> >
> > The name is fixed length, the rule is unknown.
>
> I'd declare operator<< and operator>> for that class so that you can easily
> store and retrieve objects from a QDataStream. Reading that file becomes a
> matter of
>
> while ( !stream.eof() )
> 	filter << stream;

But doing this will not correctly handle case were the end-user edit the 
config file by end and do a mistake by incorrectely ordering the tags.

- -- 

Yannick Koehler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9Ruu0fuKOJNEyL1URAoOkAJ46UQz7hi6Gjcft1WSZMEc6wZcJnwCeIZkQ
rCm4bB6mAGAaaGyAjdD3Bso=
=KTHz
-----END PGP SIGNATURE-----


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic