diff options
Diffstat (limited to 'slicer/xml')
-rw-r--r-- | slicer/xml/Jamfile.jam | 7 | ||||
-rw-r--r-- | slicer/xml/serializer.cpp | 6 | ||||
-rw-r--r-- | slicer/xml/serializer.h | 5 | ||||
-rw-r--r-- | slicer/xml/testSpecifics.cpp | 1 | ||||
-rw-r--r-- | slicer/xml/xmlExceptions.ice | 13 |
5 files changed, 22 insertions, 10 deletions
diff --git a/slicer/xml/Jamfile.jam b/slicer/xml/Jamfile.jam index 76b97af..28e8aab 100644 --- a/slicer/xml/Jamfile.jam +++ b/slicer/xml/Jamfile.jam @@ -1,4 +1,6 @@ import testing ; +lib pthread ; +lib Ice ; lib boost_system ; lib boost_filesystem ; lib boost_utf : : <name>boost_unit_test_framework ; @@ -7,14 +9,18 @@ lib adhocutil : : : : <include>/usr/include/adhocutil ; lib slicer-xml : [ glob *.cpp : test*.cpp ] + [ glob *.ice ] : <include>.. <library>boost_system <library>boost_filesystem + <library>pthread + <library>Ice <library>IceUtil <library>../..//libxmlpp <library>adhocutil <library>../slicer//slicer + <implicit-dependency>../slicer//slicer : : <library>../..//libxmlpp ; @@ -23,6 +29,7 @@ run testSpecifics.cpp : : : <define>BOOST_TEST_DYN_LINK <library>slicer-xml + <implicit-dependency>slicer-xml <library>boost_utf <library>../test//slicer-test <library>../test//common diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index c6c6c5f..c1e4023 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -1,4 +1,5 @@ #include "serializer.h" +#include <xmlExceptions.h> #include <slicer/metadata.h> #include <libxml++/document.h> #include <libxml++/parsers/domparser.h> @@ -19,11 +20,6 @@ namespace Slicer { const std::string md_bare = "xml:bare"; const auto defaultElementCreator = boost::bind(&xmlpp::Element::add_child, _1, _2, Glib::ustring()); - BadBooleanValue::BadBooleanValue(const Glib::ustring &) : - std::invalid_argument("Bad boolean value") - { - } - static const Glib::ustring TrueText("true"); static const Glib::ustring FalseText("false"); diff --git a/slicer/xml/serializer.h b/slicer/xml/serializer.h index 054b308..cdb20f5 100644 --- a/slicer/xml/serializer.h +++ b/slicer/xml/serializer.h @@ -6,11 +6,6 @@ #include <visibility.h> namespace Slicer { - class BadBooleanValue : public std::invalid_argument { - public: - BadBooleanValue(const Glib::ustring &); - }; - class DLL_PUBLIC XmlSerializer : public Serializer { protected: typedef boost::function<xmlpp::Element *(xmlpp::Element *, const Glib::ustring &)> ElementCreator; diff --git a/slicer/xml/testSpecifics.cpp b/slicer/xml/testSpecifics.cpp index 001cfb0..d20ea09 100644 --- a/slicer/xml/testSpecifics.cpp +++ b/slicer/xml/testSpecifics.cpp @@ -4,6 +4,7 @@ #include "serializer.h" #include <libxml++/parsers/domparser.h> #include <types.h> +#include <xmlExceptions.h> template <typename T, typename ... P> T diff --git a/slicer/xml/xmlExceptions.ice b/slicer/xml/xmlExceptions.ice new file mode 100644 index 0000000..e03fbe7 --- /dev/null +++ b/slicer/xml/xmlExceptions.ice @@ -0,0 +1,13 @@ +#ifndef SLICER_XML +#define SLICER_XML + +#include <common.ice> + +module Slicer { + exception BadBooleanValue extends DeserializerError { + string text; + }; +}; + +#endif + |