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