[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Class Keydata - similar entries from multiple sections?
From: |
Wolfgang Alper |
Subject: |
Class Keydata - similar entries from multiple sections? |
Date: |
Wed, 9 May 2007 15:38:01 +0200 |
User-agent: |
KMail/1.9.4 |
Hello,
i am using commoncpp2-1.5.6.
How can i retrieve keys with the same name from a given section using the
Class Keydata?
Example:
[general]
port = 1234
host = www.myhost.com
[proxy]
port = 4321
host = www.proxy.com
running
load("/mydir/myfile/general");
and
load("/mydir/myfile/proxy]");
This leads to multiple port and host entries.
Of cause i can use getCount("port") and then iterate through the values, but
this assumes to know wether a section has a key "port".
Also i could use clrValue("port") to clear the value before loading a new
section, but this seems to be a bad workaround.
So how can i query like "general/host" to get the value of host in the
[general] section or "proxy/host" to get the host in the [proxy] section?
Thanks
Wolfgang
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Class Keydata - similar entries from multiple sections?,
Wolfgang Alper <=