yat  0.8.3pre
TypeInfo.h
00001 #ifndef _theplu_yat_utility_type_info_
00002 #define _theplu_yat_utility_type_info_
00003 
00004 // $Id: TypeInfo.h 2119 2009-12-12 23:11:43Z peter $
00005 
00006 /*
00007   Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
00008   Copyright (C) 2009 Peter Johansson
00009 
00010   This file is part of the yat library, http://dev.thep.lu.se/yat
00011 
00012   The yat library is free software; you can redistribute it and/or
00013   modify it under the terms of the GNU General Public License as
00014   published by the Free Software Foundation; either version 3 of the
00015   License, or (at your option) any later version.
00016 
00017   The yat library is distributed in the hope that it will be useful,
00018   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00020   General Public License for more details.
00021 
00022   You should have received a copy of the GNU General Public License
00023   along with yat. If not, see <http://www.gnu.org/licenses/>.
00024 */
00025 
00026 #include <string>
00027 #include <typeinfo>
00028 
00029 namespace theplu {
00030 namespace yat {
00031 namespace utility {
00032 
00036   class TypeInfo
00037   {
00038   public:
00042     // For STL container usage
00043     TypeInfo(void);
00044 
00048     // For convenience we allow implicit conversion from type_info to
00049     // TypeInfo.
00050     TypeInfo(const std::type_info&);
00051 
00055     const std::type_info& get(void) const;
00056 
00060     std::string name(void) const;
00061 
00065     TypeInfo& operator=(const TypeInfo&);
00066 
00067   private:
00068     // Using compiler generated copy constructor
00069     // TypeInfo(const TypeInfo&);
00070     // Using compiler generated assignment operator
00071     // TypeInfo(const TypeInfo&);
00072 
00073     const std::type_info* info_;
00074   };
00075 
00082   bool operator==(const TypeInfo&, const TypeInfo&);
00083 
00089   bool operator!=(const TypeInfo&, const TypeInfo&);
00090 
00097   bool operator<(const TypeInfo& lhs, const TypeInfo& rhs);
00098 
00104   bool operator<=(const TypeInfo&, const TypeInfo&);
00105 
00111   bool operator>(const TypeInfo&, const TypeInfo&);
00112 
00118   bool operator>=(const TypeInfo&, const TypeInfo&);
00119 
00120 }}} // of namespace utility, yat, and theplu
00121 
00122 #endif

Generated on Thu Dec 20 2012 03:12:58 for yat by  doxygen 1.8.0-20120409