DeSR Dependency Parser |
00001 /* 00002 ** IXE C++ Library 00003 ** ixe/conf/conf_PatternSet.h 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 #ifndef IXE_conf_PatternSet_H 00026 #define IXE_conf_PatternSet_H 00027 00028 // local 00029 #include "conf/conf.h" 00030 #include "conf/PatternSet.h" 00031 00032 namespace IXE { 00033 00040 template <> 00041 class conf<PatternSet> : public Var<PatternSet> { 00042 public: 00043 conf(char const* name) : Var<PatternSet>(name) { } 00044 00045 typedef PatternSet::iterator iterator; 00046 typedef PatternSet::const_iterator const_iterator; 00047 00048 protected: 00049 virtual void parseValue(char const*& line) { 00050 register char const* s; 00051 while (s = next_token_line(line, " \r\t")) 00052 value.insert(s, line -s); // PatternSet does strdup() 00053 } 00054 virtual void reset() { value.clear(); } 00055 }; 00056 00057 } // namespace IXE 00058 00059 #endif /* IXE_conf_PatternSet_H */