Tanl Linguistic Pipeline |
00001 /* 00002 ** Tanl 00003 ** text/less.h 00004 ** ---------------------------------------------------------------------- 00005 ** Copyright (c) 2000 Ideare SpA. All rights reserved. 00006 ** Copyright (c) 2000 Giuseppe Attardi (attardi@di.unipi.it). 00007 ** ---------------------------------------------------------------------- 00008 ** 00009 ** This file is part of Tanl. 00010 ** 00011 ** Tanl 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 ** Tanl 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 ** This file is part of Tanl. 00025 ** 00026 ** Tanl is free software; you can redistribute it and/or modify it 00027 ** under the terms of the GNU General Public License, version 3, 00028 ** as published by the Free Software Foundation. 00029 ** 00030 ** Tanl is distributed in the hope that it will be useful, 00031 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00032 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00033 ** GNU General Public License for more details. 00034 ** 00035 ** You should have received a copy of the GNU General Public License 00036 ** along with this program. If not, see <http://www.gnu.org/licenses/>. 00037 ** ---------------------------------------------------------------------- 00038 */ 00039 00040 #ifndef Tanl_Text_less_H 00041 #define Tanl_Text_less_H 00042 00043 // Settings 00044 #include "include/config.h" 00045 00046 // standard 00047 #include <cstring> 00048 #include <functional> 00049 00050 namespace std 00051 { 00062 template <> struct less<char const*> : 00063 std::binary_function<char const*, char const*, bool> 00064 { 00065 result_type 00066 operator ()(first_argument_type a, second_argument_type b) const { 00067 return ::strcmp(a, b) < 0; 00068 } 00069 }; 00070 } 00071 00072 #endif /* Tanl_Text_less_H */