2 This file is part of libmspparser
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
7 #include <msp/strconv.h>
14 unsigned Value::get<unsigned long>() const
17 throw TypeError("Value is not an integer");
19 unsigned long result=strtoul(data);
25 unsigned Value::get<unsigned>() const
28 throw TypeError("Value is not an integer");
33 unsigned Value::get<unsigned short>() const
36 throw TypeError("Value is not an integer");
41 float Value::get<float>() const
43 if(type!=FLOAT && type!=INTEGER)
44 throw TypeError("Value is not a float");
49 std::string Value::get<std::string>() const
52 throw TypeError("Value is not a string");
57 const std::string &Value::get<const std::string&>() const
60 throw TypeError("Value is not a string");