Tanl Linguistic Pipeline |
00001 /* 00002 ** IXE 00003 ** conf/conf_float.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2007 Giuseppe Attardi (attardi@di.unipi.it). 00006 ** ---------------------------------------------------------------------- 00007 ** 00008 ** This file is part of IXE. 00009 ** 00010 ** IXE is free software; you can redistribute it and/or modify it 00011 ** under the terms of the GNU General Public License, version 3, 00012 ** as published by the Free Software Foundation. 00013 ** 00014 ** IXE is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 ** GNU General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU General Public License 00020 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00021 ** ---------------------------------------------------------------------- 00022 */ 00023 00024 #ifndef IXE_conf_float_H 00025 #define IXE_conf_float_H 00026 00027 // Settings 00028 #include "platform.h" 00029 00030 // system 00031 #include <string> 00032 00033 // local 00034 #include "conf/conf.h" 00035 00036 namespace IXE { 00037 00046 template <> class conf<float> : public VarDefault<float> 00047 { 00048 public: 00049 conf(char const *name, 00050 float default_value = 0.0); 00051 00052 conf<float>& operator =(float new_value); 00053 00054 conf<float>& operator =(char const* s) { 00055 parseValue(s); 00056 return *this; 00057 } 00058 00059 protected: 00060 virtual void parseValue(char const*& line); 00061 }; 00062 00063 } // namespace IXE 00064 00065 #endif /* IXE_conf_float_H */