boost-propertytree

    3熱度

    1回答

    好了,所以這裏的XML結構的一個樣本: <config> <Ignored> <Ignore name="Test A"> <Criteria> <value>actual value</value> </Criteria> </Ignore> <Ignore name="Test B"> <Criteria

    2熱度

    1回答

    : http://www.boost.org/doc/libs/1_41_0/doc/html/boost_propertytree/container.html 「可能有多個孩子中的一個節點相同的密鑰值。然而,這些孩子並不一定順序通過查找返回的迭代。可能指的是其中任何一種,並且對其他同名孩子的相對地位沒有保證。「 示例XML: <library> <book><title>Title_

    1熱度

    3回答

    我已經安裝了boost_1_41_0並嘗試按照xml解析的一些教程: #include <boost/property_tree/ptree.hpp> int main(){ using boost::property_tree::ptree; ptree pt; cout<<"Here is an XML test!\n"; return 0; }

    2熱度

    1回答

    我加載一個boost :: property_tree :: ptree中從一個XML文件,這看起來有點像這樣: <bla> <foo> <element id="1" type="..." path="..."/> <element id="2" type="..." path="..."/> <element id="3" type="..." p

    30熱度

    4回答

    我正在嘗試編寫XML解析器,將XML文件解析爲boost::property_tree,並且遇到了此問題。我如何檢查(快速)某個財產的孩子是否存在? 很明顯,我可以迭代所有使用BOOST_FOREACH的孩子 - 但是,沒有更好的解決方案嗎?

    1熱度

    1回答

    考慮下面的例子: #include <boost\property_tree\ptree.hpp> #include <boost/any.hpp> typedef boost::property_tree::ptree PT; struct Foo { int bar; int egg; Foo(): bar(), egg() {} }; int

    15熱度

    2回答

    我已閱讀boost :: property_tree的文檔,但沒有找到更新或合併ptree與另一ptree的方法。我該怎麼做呢? 鑑於下面的代碼,update_ptree函數將如何看起來像? #include <iostream> #include <boost/property_tree/ptree.hpp> using boost::property_tree::ptree; clas

    1熱度

    1回答

    我已經通過增強手冊和互聯網搜索了很多,因爲我相信它是一個相當標準的功能? 那麼我正在尋找「合併」屬性樹。 - 我注意到函數insert,我希望我可以將樹與這個合併? 下面是我試圖讓工作線: base.insert(base.get_child("BRANCH"), t); base和t是「屬性樹」,base具有作爲分支「分支」(許多之一)。現在我想插入t到這個分支? 更具體地說:如果我通過名稱

    0熱度

    1回答

    我使用屬性樹的多路負載XML的解析,爲我的應用程序 編輯一些設置,我創建了一個結構默認設置 struct default_settings { std::string imPath; std::string calPath; std::string solPath; void load(const std::string &filename);

    0熱度

    1回答

    目前自動型我有這樣的代碼: if(!variables["width"].defaulted()) { configTree.put(treeNames["width"], variables["width"].as<int>()); } if(!variables["height"].defaulted()) { configTree.put(treeNames["