2 #include <boost/lexical_cast.hpp>
3 #include <boost/algorithm/string.hpp>
5 #include "exceptions.h"
8 using namespace libdcp;
11 Fraction::Fraction (string s)
14 split (b, s, is_any_of (" "));
16 throw XMLError ("malformed fraction " + s + " in XML node");
18 numerator = lexical_cast<int> (b[0]);
19 denominator = lexical_cast<int> (b[1]);