Distributed under the LGPL
*/
#include <msp/error.h>
-#include <msp/strconv.h>
#include "value.h"
namespace Msp {
namespace Parser {
-/*template<>
-unsigned Value::get<unsigned long>() const
-{
- if(type!=INTEGER)
- throw TypeError("Value is not an integer");
- errno=0;
- unsigned long result=strtoul(data);
- if(errno==ERANGE
- return result;
-}
-
-template<>
-unsigned Value::get<unsigned>() const
-{
- if(type!=INTEGER)
- throw TypeError("Value is not an integer");
- return strtoul(data);
-}
-
-template<>
-unsigned Value::get<unsigned short>() const
-{
- if(type!=INTEGER)
- throw TypeError("Value is not an integer");
- return strtoul(data);
-}
-
-template<>
-float Value::get<float>() const
-{
- if(type!=FLOAT && type!=INTEGER)
- throw TypeError("Value is not a float");
- return strtod(data);
-}*/
-
template<>
std::string Value::get<std::string>() const
{