#include "convert.h"
+#include "support/docstring.h"
+
#include <boost/lexical_cast.hpp>
#include <string>
+using lyx::docstring;
+
using boost::lexical_cast;
using std::string;
}
+template<>
+docstring convert<docstring>(int i)
+{
+ return lyx::from_ascii(lexical_cast<string>(i));
+}
+
+
template<>
string convert<string>(unsigned int ui)
{
}
+template<>
+docstring convert<docstring>(unsigned int ui)
+{
+ return lyx::from_ascii(lexical_cast<string>(ui));
+}
+
+
template<>
string convert<string>(unsigned long ul)
{
}
+template<>
+docstring convert<docstring>(unsigned long ul)
+{
+ return lyx::from_ascii(lexical_cast<string>(ul));
+}
+
+
+template<>
+string convert<string>(long l)
+{
+ return lexical_cast<string>(l);
+}
+
+
+template<>
+docstring convert<docstring>(long l)
+{
+ return lyx::from_ascii(lexical_cast<string>(l));
+}
+
+
template<>
string convert<string>(float f)
{
{
return lexical_cast<string>(d);
}
+
+
+template<>
+int convert<int>(string const s)
+{
+ return strtol(s.c_str(), 0, 10);
+}
+
+
+template<>
+unsigned int convert<unsigned int>(string const s)
+{
+ return strtoul(s.c_str(), 0, 10);
+}
+
+
+template<>
+double convert<double>(string const s)
+{
+ return strtod(s.c_str(), 0);
+}
+
+
+template<>
+int convert<int>(char const * cptr)
+{
+ return strtol(cptr, 0, 10);
+}
+
+
+template<>
+double convert<double>(char const * cptr)
+{
+ return strtod(cptr, 0);
+}