DeSR Dependency Parser |
00001 /* 00002 ** IXE C++ Library 00003 ** ixe/conf/conf_set.cpp 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2000 Ideare SpA. 00006 ** Copyright (c) 2000 Giuseppe Attardi (attardi@di.unipi.it). 00007 ** ---------------------------------------------------------------------- 00008 ** 00009 ** This file is part of DeSR. 00010 ** 00011 ** DeSR is free software; you can redistribute it and/or modify it 00012 ** under the terms of the GNU General Public License, version 3, 00013 ** as published by the Free Software Foundation. 00014 ** 00015 ** DeSR is distributed in the hope that it will be useful, 00016 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 ** GNU General Public License for more details. 00019 ** 00020 ** You should have received a copy of the GNU General Public License 00021 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00022 ** ---------------------------------------------------------------------- 00023 */ 00024 00025 // standard 00026 #include <stdlib.h> 00027 00028 // local 00029 #include "conf/conf_set.h" 00030 00031 namespace IXE { 00032 00033 //============================================================================= 00039 //============================================================================= 00040 00041 template <> 00042 void conf_set<std::string>::parseValue(char const*& line) { 00043 for (register char const *s; (s = next_token_line(line, " \r\t")); ) 00044 this->value.insert(std::string(s, line - s)); 00045 } 00046 00047 template <> 00048 void conf_set<int>::parseValue(char const*& line) { 00049 for (register char const *s; (s = next_token_line(line, " \r\t")); ) 00050 this->value.insert(atoi(s)); 00051 } 00052 00053 } // namespace IXE