[property_tree] number of sections in an inifile
Hi: If I have defined: boost::property_tree::ptree IniTree; What is the correct way to determine how many sections there are in an ini file. Should I use count, max_size, m_children or size? Any help appreciated. Cheers Sean.
On 22.03.2012, at 15:48, Sean Farrow wrote:
Hi: If I have defined: boost::property_tree::ptree IniTree; What is the correct way to determine how many sections there are in an ini file. Should I use count, max_size, m_children or size?
m_children is private. count() takes an argument. max_size(), according to the Container concept, returns how many elements (children, in the case of ptree) there could possibly be. size() returns how many there are. size() is the right answer. Sebastian
Can I know one element under a parent node existence?
If my xml file's content like this:
<?xml version="1.0" encoding="utf-8"?>
<loader value="../../../asset/art/demo25Dv1.swf"/>
<video width="1280" height="720"/>
<touch>
participants (3)
-
naive231
-
Sean Farrow
-
Sebastian Redl