plugins/base1/se.lu.thep.wenni/trunk/lib/c++_tools/utility/utility.h

Code
Comments
Other
Rev Date Author Line
69 11 Feb 06 jari 1 // $Id$
69 11 Feb 06 jari 2
95 05 Apr 06 jari 3 /*
95 05 Apr 06 jari 4   Copyright (C) 2005 Jari Häkkinen, Peter Johansson, Markus Ringnér
95 05 Apr 06 jari 5   Copyright (C) 2006 Jari Häkkinen
95 05 Apr 06 jari 6
95 05 Apr 06 jari 7   This file is part of the thep c++ tools library,
95 05 Apr 06 jari 8                                 http://lev.thep.lu.se/trac/c++_tools
95 05 Apr 06 jari 9
95 05 Apr 06 jari 10   The c++ tools library is free software; you can redistribute it
95 05 Apr 06 jari 11   and/or modify it under the terms of the GNU General Public License
824 26 Nov 08 jari 12   as published by the Free Software Foundation; either version 3 of
95 05 Apr 06 jari 13   the License, or (at your option) any later version.
95 05 Apr 06 jari 14
95 05 Apr 06 jari 15   The c++ tools library is distributed in the hope that it will be
95 05 Apr 06 jari 16   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
95 05 Apr 06 jari 17   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
95 05 Apr 06 jari 18   General Public License for more details.
95 05 Apr 06 jari 19
95 05 Apr 06 jari 20   You should have received a copy of the GNU General Public License
824 26 Nov 08 jari 21   along with WeNNI. If not, see <http://www.gnu.org/licenses/>.
95 05 Apr 06 jari 22 */
95 05 Apr 06 jari 23
69 11 Feb 06 jari 24 #ifndef _theplu_utility_utility_
69 11 Feb 06 jari 25 #define _theplu_utility_utility_ 
69 11 Feb 06 jari 26
69 11 Feb 06 jari 27 ///
69 11 Feb 06 jari 28 /// @file utility/utility.h
69 11 Feb 06 jari 29 ///
69 11 Feb 06 jari 30 /// Some useful functions are placed here
69 11 Feb 06 jari 31 ///
69 11 Feb 06 jari 32
69 11 Feb 06 jari 33 #include <string>
69 11 Feb 06 jari 34
69 11 Feb 06 jari 35 namespace theplu {
69 11 Feb 06 jari 36 namespace utility {
69 11 Feb 06 jari 37
69 11 Feb 06 jari 38
69 11 Feb 06 jari 39   ///
110 13 Jun 06 jari 40   /// @return true if string is a double
69 11 Feb 06 jari 41   ///
110 13 Jun 06 jari 42   bool is_double(const std::string&);
110 13 Jun 06 jari 43
110 13 Jun 06 jari 44
69 11 Feb 06 jari 45   ///
110 13 Jun 06 jari 46   /// @return true if string is a float
110 13 Jun 06 jari 47   ///
69 11 Feb 06 jari 48   bool is_float(const std::string&);
69 11 Feb 06 jari 49
69 11 Feb 06 jari 50   ///
110 13 Jun 06 jari 51   /// @return true if string is an int
69 11 Feb 06 jari 52   ///
69 11 Feb 06 jari 53   bool is_int(const std::string&);
69 11 Feb 06 jari 54
110 13 Jun 06 jari 55   ///
110 13 Jun 06 jari 56   /// @return true if string is "nan" (case-insensitive) 
110 13 Jun 06 jari 57   ///
110 13 Jun 06 jari 58   bool is_nan(const std::string& s);
69 11 Feb 06 jari 59
69 11 Feb 06 jari 60 }} // of namespace utility and namespace theplu
69 11 Feb 06 jari 61
69 11 Feb 06 jari 62 #endif