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

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

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


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.  At the present time I create 
entries such as 

[filters]
name1=<name of filter1>
rule1=<rule of filter1>
name2=<name of filter2>
rule2=<rule of filter2>
name3=<name of filter3>
rule3=<rule of filter3>

I created a bunch of custom function to read / write and ensure uniqueness...  
I was wondering if there was a more generic system such as 

	uint index = -1;
	while(cfg->readEntry("name", &index)) {
		// handle
	}

Where the object would 
- - increase the index
- - locate the entry with name%d, index

Is there such things?

- -- 

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

iD8DBQE9RtkjfuKOJNEyL1URAoqOAJ4jAbF30Gaa3w1ySmteX1KzJZx/lgCfdmOB
khrm7VsCnDScsKxG9siw+UA=
=1lqw
-----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