X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fvalue.cpp;h=6d5e0320fb23c6bd8d8e7fbaf95dd32fdb2448ed;hp=8cb1af0bab89862c3999a60fbd65c375243627fb;hb=a7da782db1fda2dade2bf104066ae4cf0a9aec48;hpb=5453824394771ca21de32088a2842486b63e6f6d diff --git a/source/value.cpp b/source/value.cpp index 8cb1af0..6d5e032 100644 --- a/source/value.cpp +++ b/source/value.cpp @@ -4,47 +4,11 @@ Copyright © 2006 Mikko Rasa, Mikkosoft Productions Distributed under the LGPL */ #include -#include #include "value.h" namespace Msp { namespace Parser { -/*template<> -unsigned Value::get() 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() const -{ - if(type!=INTEGER) - throw TypeError("Value is not an integer"); - return strtoul(data); -} - -template<> -unsigned Value::get() const -{ - if(type!=INTEGER) - throw TypeError("Value is not an integer"); - return strtoul(data); -} - -template<> -float Value::get() const -{ - if(type!=FLOAT && type!=INTEGER) - throw TypeError("Value is not a float"); - return strtod(data); -}*/ - template<> std::string Value::get() const {