]> git.tdb.fi Git - libs/datafile.git/blob - source/value.cpp
Drop the commented out old conversion functions
[libs/datafile.git] / source / value.cpp
1 /*
2 This file is part of libmspparser
3 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
5 */
6 #include <msp/error.h>
7 #include "value.h"
8
9 namespace Msp {
10 namespace Parser {
11
12 template<>
13 std::string Value::get<std::string>() const
14 {
15         if(type!=STRING)
16                 throw TypeError("Value is not a string");
17         return data;
18 }
19
20 template<>
21 const std::string &Value::get<const std::string&>() const
22 {
23         if(type!=STRING)
24                 throw TypeError("Value is not a string");
25         return data;
26 }
27
28 } // namespace Msp
29 } // namespace Parser