summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-04-28 19:18:10 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-04-28 19:18:10 +0100
commit025468f858ab05b15e4b02bf7b59297f90b036e7 (patch)
tree5ed36bdbdc9d33a90519235bcbb951a138cbb437
parentDon't rely on constructor/destructor order in templates, GCC runs them backwa... (diff)
downloadslicer-025468f858ab05b15e4b02bf7b59297f90b036e7.tar.bz2
slicer-025468f858ab05b15e4b02bf7b59297f90b036e7.tar.xz
slicer-025468f858ab05b15e4b02bf7b59297f90b036e7.zip
Upgrade to libxml++3slicer-1.4.6
-rw-r--r--Jamroot.jam8
-rw-r--r--slicer/xml/serializer.cpp14
-rw-r--r--slicer/xml/serializer.h2
3 files changed, 12 insertions, 12 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index fc23554..3e015d5 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -38,7 +38,7 @@ build-project slicer ;
# Some useful aliases
-lib xml++-2.6 ;
+lib xml++-3.0 ;
lib xml2 ;
lib glibmm-2.4 ;
lib gobject-2.0 ;
@@ -46,8 +46,8 @@ lib glib-2.0 ;
lib sigc-2.0 ;
alias libxmlpp : : : :
- <include>/usr/include/libxml++-2.6
- <include>/usr/lib/libxml++-2.6/include
+ <include>/usr/include/libxml++-3.0
+ <include>/usr/lib/libxml++-3.0/include
<include>/usr/include/libxml2
<include>/usr/include/glibmm-2.4
<include>/usr/lib/glibmm-2.4/include
@@ -55,7 +55,7 @@ alias libxmlpp : : : :
<include>/usr/lib/glib-2.0/include
<include>/usr/include/sigc++-2.0
<include>/usr/lib/sigc++-2.0/include
- <library>xml++-2.6
+ <library>xml++-3.0
<library>xml2
<library>glibmm-2.4
<library>gobject-2.0
diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp
index 08101ba..4c0c7c2 100644
--- a/slicer/xml/serializer.cpp
+++ b/slicer/xml/serializer.cpp
@@ -23,7 +23,7 @@ namespace Slicer {
const std::string md_elements = "xml:elements";
const std::string keyName = "key";
const std::string valueName = "value";
- const auto defaultElementCreator = boost::bind(&xmlpp::Element::add_child, _1, _2, Glib::ustring());
+ const auto defaultElementCreator = boost::bind(&xmlpp::Element::add_child_element, _1, _2, Glib::ustring());
static const Glib::ustring TrueText("true");
static const Glib::ustring FalseText("false");
@@ -169,13 +169,13 @@ namespace Slicer {
class XmlContentValueTarget : public XmlValueTarget {
public:
XmlContentValueTarget(xmlpp::Element * p) :
- XmlValueTarget(boost::bind(&xmlpp::Element::set_child_text, p, _1))
+ XmlValueTarget(boost::bind(&xmlpp::Element::set_first_child_text, p, _1))
{
}
};
void
- XmlDeserializer::DocumentTreeIterateDictAttrs(const xmlpp::Element::AttributeList & attrs, ModelPartPtr dict)
+ XmlDeserializer::DocumentTreeIterateDictAttrs(const xmlpp::Element::const_AttributeList & attrs, ModelPartPtr dict)
{
for (const auto & attr : attrs) {
auto emp = dict->GetAnonChild();
@@ -304,14 +304,14 @@ namespace Slicer {
mp->GetValue(new XmlContentValueTarget(n));
}
else if (hp && metaDataFlagSet(hp->GetMetadata(), md_attributes)) {
- ModelTreeIterateDictAttrs(n->add_child(name), mp);
+ ModelTreeIterateDictAttrs(n->add_child_element(name), mp);
}
else if (hp && metaDataFlagSet(hp->GetMetadata(), md_elements)) {
- ModelTreeIterateDictElements(n->add_child(name), mp);
+ ModelTreeIterateDictElements(n->add_child_element(name), mp);
}
else {
if (hp && metaDataFlagSet(hp->GetMetadata(), md_bare)) {
- ModelTreeProcessElement(n, mp, boost::bind(&xmlpp::Element::add_child, _1, name, Glib::ustring()));
+ ModelTreeProcessElement(n, mp, boost::bind(&xmlpp::Element::add_child_element, _1, name, Glib::ustring()));
}
else {
ModelTreeProcessElement(ec(n, name), mp, defaultElementCreator);
@@ -334,7 +334,7 @@ namespace Slicer {
{
dict->OnEachChild([element](const auto &, const auto & mp, const auto &) {
mp->GetChild(keyName)->GetValue(new XmlValueTarget([&mp,element](const auto & name) {
- ModelTreeProcessElement(element->add_child(name), mp->GetChild(valueName), defaultElementCreator);
+ ModelTreeProcessElement(element->add_child_element(name), mp->GetChild(valueName), defaultElementCreator);
}));
});
}
diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h
index 5b56ad1..5521dc4 100644
--- a/slicer/xml/serializer.h
+++ b/slicer/xml/serializer.h
@@ -54,7 +54,7 @@ namespace Slicer {
static void DocumentTreeIterate(const xmlpp::Node * node, ModelPartPtr mp);
static void DocumentTreeIterateElement(const xmlpp::Element * element, ModelPartPtr mp, ChildRefPtr c);
static void DocumentTreeIterate(const xmlpp::Document * doc, ModelPartPtr mp);
- static void DocumentTreeIterateDictAttrs(const xmlpp::Element::AttributeList & attrs, ModelPartPtr dict);
+ static void DocumentTreeIterateDictAttrs(const xmlpp::Element::const_AttributeList & attrs, ModelPartPtr dict);
static void DocumentTreeIterateDictElements(const xmlpp::Element * parent, ModelPartPtr dict);
};