X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvalue.cpp;h=6d5e0320fb23c6bd8d8e7fbaf95dd32fdb2448ed;hb=52b69f7841d3b2ca0bb83c04214f30c7d1c6a615;hp=8cb1af0bab89862c3999a60fbd65c375243627fb;hpb=5453824394771ca21de32088a2842486b63e6f6d;p=libs%2Fdatafile.git 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 {